This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADC3661: Register load sequence to configure ADC3661

Part Number: ADC3661

Hi Team,

Our customer needs help with ADC3661 configuration. Please see the details of his inquiry below.

I need register load sequence to configure ADC3661 analog to digital converter to 2-wire interface in bypass mode.

I can copy the values of the registers that I tried to change to achieve the desired configuration (2-wire interface in bypass mode)

ads3661 registers write.txt
					if(adc_reset == 1'b0)
						begin
							//load //0x07 register value=0x4B
							if (cnt <= 24)
								begin
									c_spi_cs <= 1'b0;
									c_spi_config_done <= 1'b0;
									
									configreg7 = configreg7 << 1;
									c_spi_sdo = configreg7[24];						
								end
								
							// wait	
							if (cnt > 24 && cnt<= 28)
								begin
									c_spi_cs <= 1'b1;
									c_spi_sdo = 1'b1;
									c_spi_config_done <= 1'b0;
								end
								
							// load	0x13 register value=0x00
							if (cnt > 28 && cnt<= 52)
								begin
									c_spi_cs <= 1'b0;
									c_spi_config_done <= 1'b0;
									
									configreg19r = configreg19r << 1;
									c_spi_sdo = configreg19r[24];
								
								end
							// wait 1 ms
							if (cnt > 52 && cnt<= 556)
								begin
									c_spi_cs <= 1'b1;
									c_spi_sdo = 1'b1;
									c_spi_config_done <= 1'b0;
								end
							
							// load 0x13 register value=0x01
							if (cnt > 556 && cnt<= 580)
								begin
									c_spi_cs <= 1'b0;
									c_spi_config_done <= 1'b0;
									
									configreg19s = configreg19s << 1;
									c_spi_sdo = configreg19s[24];
								end
							
							// wait
							if (cnt > 580 && cnt<= 584)
								begin
									c_spi_cs <= 1'b1;
									c_spi_sdo = 1'b1;
									c_spi_config_done <= 1'b0;
								end
							
							// load 0x19 register value=0x10
							if (cnt > 584 && cnt<= 608)
								begin
									c_spi_cs <= 1'b0;
									c_spi_config_done <= 1'b0;
									
									configreg25 = configreg25 << 1;
									c_spi_sdo = configreg25[24];
								end
							
							// wait
							if (cnt > 608 && cnt<= 612)
								begin
									c_spi_cs <= 1'b1;
									c_spi_sdo = 1'b1;
									c_spi_config_done <= 1'b0;
								end
								
							// load 0x1B register value=0x88
							if (cnt > 612 && cnt<= 636)
								begin
									c_spi_cs <= 1'b0;
									c_spi_config_done <= 1'b0;
									
									configreg27 = configreg27 << 1;
									c_spi_sdo = configreg27[24];
								end
							
							// wait
							if (cnt > 636 && cnt<= 640)
								begin
									c_spi_cs <= 1'b1;
									c_spi_sdo = 1'b1;
									c_spi_config_done <= 1'b0;
								end
								
							// load reference selection buffer 0x0E register value=0x0E
							if (cnt > 640 && cnt <= 664)
								begin
									c_spi_cs <= 1'b0;
									c_spi_config_done <= 1'b0;
									
									configreg14 = configreg14 << 1;
									c_spi_sdo = configreg14[24];
								end

That is a piece of Verilog code that loads registers. I know that the SPI interface from the FPGA works correctly because I can decode SPI traffic using a logic analyzer.

Also, I put in comments value of the registers and how long I wait.

The spi clock frequency is 500kHz (that is well in the range given by the datasheet).

Also, I noticed some typos in the datasheet where the detailed information about registers is provided.

digitizer ADS3661 register values.txt
							configreg7 = 25'b0_0000_0000_0000_0111_0100_1011;  //0x07 register value=0x4B
							configreg19s = 25'b0_0000_0000_0001_0011_0000_0000; // 0x13 register value=0x00
							configreg19r = 25'b0_0000_0000_0001_0011_0000_0001; // 0x13 register value=0x01
							configreg14 = 25'b0_0000_0000_0000_1110_0000_1000; // 0x0E register value=0x0E
							configreg7_IF_en = 25'b0_0000_0000_0000_0111_0100_1011; //0x07 register value=4B
							configreg25 = 25'b0_0000_0000_0001_1001_0001_0000; //0x19 register value=0x10
							configreg27 = 25'b0_0000_0000_0001_1011_1000_1000; // 0x1B register value=0x88

Binary values of the registers

The error is in Table 8-26 Description for Bits5-6 (MAPPER EN bit (D6)) it should be D7.

Also, When the register write is in progress should be a sample clock running (pins 6 and 7) I tried both ways but it did not produce any difference. I am aware of the calibration requirement which takes of 200000 cycles of the sample clock.

Also, we want to use the internal reference which is visible from the register writes

The REFBUF pin is pulled up to AVDD and we use a differential sample clock with connections described in the datasheet on page 33.

Regards,

Danilo

  • Hello,

    I setup an EVM in our lab exported the required register writes for the ADC3661 to run in 2w, 16b, bypass mode. 

    Are you using a ADC3661EVM? Can you describe how you concluded that Bits5-6 (MAPPER EN bit (D6)) should be D7? 

    Regards, Amy 

    ADC3661-2W-Bypass-16b.txt
    0x7	0x4b
    0x8	0x0
    0x9	0x0
    0xd	0x0
    0xe	0x0
    0x11	0x0
    0x13	0x0
    0x14	0x0
    0x15	0x0
    0x16	0x0
    0x19	0x10
    0x1a	0x0
    0x1b	0x0
    0x1e	0x0
    0x20	0x0
    0x21	0xf0
    0x22	0xf
    0x24	0x0
    0x25	0x0
    0x26	0x0
    0x27	0x0
    0x2a	0x0
    0x2b	0x0
    0x2c	0x0
    0x2d	0x0
    0x2e	0x0
    0x31	0x0
    0x32	0x0
    0x33	0x0
    0x34	0x0
    // Bit Mapping Registers 0x39 to 0x88. For future development.
    0x39	0x46
    0x3a	0x4c
    0x3b	0x4e
    0x3c	0x54
    0x3d	0x56
    0x3e	0x5c
    0x3f	0x5e
    0x40	0x64
    0x41	0x66
    0x42	0x6c
    0x43	0x6
    0x44	0xc
    0x45	0xe
    0x46	0x14
    0x47	0x16
    0x48	0x1c
    0x49	0x1e
    0x4a	0x24
    0x4b	0x26
    0x4c	0x2c
    0x4d	0x47
    0x4e	0x4d
    0x4f	0x4f
    0x50	0x55
    0x51	0x57
    0x52	0x5d
    0x53	0x5f
    0x54	0x65
    0x55	0x67
    0x56	0x6d
    0x57	0x7
    0x58	0xd
    0x59	0xf
    0x5a	0x15
    0x5b	0x17
    0x5c	0x1d
    0x5d	0x1f
    0x5e	0x25
    0x5f	0x27
    0x60	0x2d
    0x61	0x42
    0x62	0x48
    0x63	0x4a
    0x64	0x50
    0x65	0x52
    0x66	0x58
    0x67	0x5a
    0x68	0x60
    0x69	0x62
    0x6a	0x68
    0x6b	0x2
    0x6c	0x8
    0x6d	0xa
    0x6e	0x10
    0x6f	0x12
    0x70	0x18
    0x71	0x1a
    0x72	0x20
    0x73	0x22
    0x74	0x28
    0x75	0x43
    0x76	0x49
    0x77	0x4b
    0x78	0x51
    0x79	0x53
    0x7a	0x59
    0x7b	0x5b
    0x7c	0x61
    0x7d	0x63
    0x7e	0x69
    0x7f	0x3
    0x80	0x9
    0x81	0xb
    0x82	0x11
    0x83	0x13
    0x84	0x19
    0x85	0x1b
    0x86	0x21
    0x87	0x23
    0x88	0x29
    0x8f	0x0
    0x92	0x0
    

  • Hi Amy,

    Thank you for your response. Please see the comment of our customer below.

    I did not include the log in my last email. Below is the  app log when I try to do simulated configuration that I described in my previous email. Once again, I do not have the kit I am using a custom board with the FPGA. Also, to eliminate additional questions the ADC digital interface works with default configuration (1-wire). In that case we do not need to do any change to register settings.

    dev, Dummy write : 38 = 0
    dev, Dummy write : 38 = 0
    dev, Dummy write : 38 = 0
    dev, Dummy write : 38 = 0
    dev, Dummy write : 7 = 75
    dev, Dummy write : 7 = 75
    dev, Dummy write : 19 = 1
    dev, Dummy write : 19 = 0
    dev, Dummy write : 7 = 75
    dev, Dummy write : 25 = 18
    dev, Dummy write : 31 = 80
    dev, Dummy write : 31 = 80
    dev, Dummy write : 10 = 8
    dev, Dummy write : 11 = 0
    dev, Dummy write : 12 = 0
    dev, Dummy write : 24 = 16
    dev, Dummy write : 25 = 18
    dev, Dummy write : 32 = 0
    dev, Dummy write : 33 = 252
    dev, Dummy write : 34 = 15
    dev, Dummy write : 25 = 18
    dev, Dummy write : 25 = 18
    dev, Dummy write : 27 = 136
    dev, Dummy write : 27 = 136
    dev, Dummy write : 36 = 0
    dev, Dummy write : 36 = 0
    dev, Dummy write : 36 = 0
    dev, Dummy write : 36 = 0
    dev, Dummy write : 39 = 0
    dev, Dummy write : 46 = 0
    dev, Dummy write : 39 = 0
    dev, Dummy write : 46 = 0
    dev, Dummy write : 37 = 0
    dev, Dummy write : 37 = 0
    dev, Dummy write : 37 = 0
    dev, Dummy write : 42 = 0
    dev, Dummy write : 43 = 0
    dev, Dummy write : 44 = 0
    dev, Dummy write : 45 = 0
    dev, Dummy write : 49 = 0
    dev, Dummy write : 50 = 0
    dev, Dummy write : 51 = 0
    dev, Dummy write : 52 = 0
    dev, Dummy write : 38 = 32
    dev, Dummy write : 38 = 34
    dev, Dummy write : 38 = 2
    dev, Dummy write : 38 = 0
    Error in reading from Reg programmer
    dev, Dummy read : 7 = 75
    dev, Dummy write : 7 = 75
    dev, Dummy write : 37 = 0
    dev, Dummy write : 42 = 0
    dev, Dummy write : 43 = 0
    dev, Dummy write : 44 = 0
    dev, Dummy write : 45 = 0
    dev, Dummy write : 49 = 0
    dev, Dummy write : 50 = 0
    dev, Dummy write : 51 = 0
    dev, Dummy write : 52 = 0
  • Hi Danilo,

    I have a couple questions:

    1. Has the customer confirmed that they can read / write to registers?

    2. If register read / write is working, try testing a power down register write (reg. 0x08) and observe a corresponding change in voltage on power supply to confirm the write is indeed communicating with the part.

    3. Does the customer have 1-w mode working?

    4. Please try the provided register writes above to run in 2w, 16b, bypass mode. I tested and confirm these work on one of our lab EVM's. 

    Regards, Amy

  • Hi Amy,

    Please see this update from our customer earlier before your response. I'm still waiting for his answers to your questions above.

    Please look at the datasheet on the page where the table that I mentioned is and my explanation.  There is a discrepancy regarding the MAPPER EN.
    "The error is in Table 8-26 Description for Bits 5-3 (MAPPER EN bit (D6)) it should be D7".
    "Sets the output resolution using the bit mapper. MAPPER EN bit
    (D6) needs to be enabled when operating in bypass mode..
    000: 18 bit
    001: 16 bit
    010: 14 bit
    all others, n/a"

    I am using a custom board with the FPGA . No evaluation kit is used in this project.
    I simply need the register write sequence and also information about the required timing. I tried to use the EVM application to see what register writes are required but it seems that the app is trying to write some registers that are not described in the datasheet.
    this the app log output when I try to configure ADC3661/2 to 2-wire, 16-bit bypass mode.
    in case you did not receive the attachment, I am sending again that Verilog code where you can write sequence

    ads3661 registers write (1).txt
    					if(adc_reset == 1'b0)
    						begin
    							//load //0x07 register value=0x4B
    							if (cnt <= 24)
    								begin
    									c_spi_cs <= 1'b0;
    									c_spi_config_done <= 1'b0;
    									
    									configreg7 = configreg7 << 1;
    									c_spi_sdo = configreg7[24];						
    								end
    								
    							// wait	
    							if (cnt > 24 && cnt<= 28)
    								begin
    									c_spi_cs <= 1'b1;
    									c_spi_sdo = 1'b1;
    									c_spi_config_done <= 1'b0;
    								end
    								
    							// load	0x13 register value=0x00
    							if (cnt > 28 && cnt<= 52)
    								begin
    									c_spi_cs <= 1'b0;
    									c_spi_config_done <= 1'b0;
    									
    									configreg19r = configreg19r << 1;
    									c_spi_sdo = configreg19r[24];
    								
    								end
    							// wait 1 ms
    							if (cnt > 52 && cnt<= 556)
    								begin
    									c_spi_cs <= 1'b1;
    									c_spi_sdo = 1'b1;
    									c_spi_config_done <= 1'b0;
    								end
    							
    							// load 0x13 register value=0x01
    							if (cnt > 556 && cnt<= 580)
    								begin
    									c_spi_cs <= 1'b0;
    									c_spi_config_done <= 1'b0;
    									
    									configreg19s = configreg19s << 1;
    									c_spi_sdo = configreg19s[24];
    								end
    							
    							// wait
    							if (cnt > 580 && cnt<= 584)
    								begin
    									c_spi_cs <= 1'b1;
    									c_spi_sdo = 1'b1;
    									c_spi_config_done <= 1'b0;
    								end
    							
    							// load 0x19 register value=0x10
    							if (cnt > 584 && cnt<= 608)
    								begin
    									c_spi_cs <= 1'b0;
    									c_spi_config_done <= 1'b0;
    									
    									configreg25 = configreg25 << 1;
    									c_spi_sdo = configreg25[24];
    								end
    							
    							// wait
    							if (cnt > 608 && cnt<= 612)
    								begin
    									c_spi_cs <= 1'b1;
    									c_spi_sdo = 1'b1;
    									c_spi_config_done <= 1'b0;
    								end
    								
    							// load 0x1B register value=0x88
    							if (cnt > 612 && cnt<= 636)
    								begin
    									c_spi_cs <= 1'b0;
    									c_spi_config_done <= 1'b0;
    									
    									configreg27 = configreg27 << 1;
    									c_spi_sdo = configreg27[24];
    								end
    							
    							// wait
    							if (cnt > 636 && cnt<= 640)
    								begin
    									c_spi_cs <= 1'b1;
    									c_spi_sdo = 1'b1;
    									c_spi_config_done <= 1'b0;
    								end
    								
    							// load reference selection buffer 0x0E register value=0x0E
    							if (cnt > 640 && cnt <= 664)
    								begin
    									c_spi_cs <= 1'b0;
    									c_spi_config_done <= 1'b0;
    									
    									configreg14 = configreg14 << 1;
    									c_spi_sdo = configreg14[24];
    								end

    digitizer ADS3661 register values (1).txt
    							configreg7 = 25'b0_0000_0000_0000_0111_0100_1011;  //0x07 register value=0x4B
    							configreg19s = 25'b0_0000_0000_0001_0011_0000_0000; // 0x13 register value=0x00
    							configreg19r = 25'b0_0000_0000_0001_0011_0000_0001; // 0x13 register value=0x01
    							configreg14 = 25'b0_0000_0000_0000_1110_0000_1000; // 0x0E register value=0x0E
    							configreg7_IF_en = 25'b0_0000_0000_0000_0111_0100_1011; //0x07 register value=4B
    							configreg25 = 25'b0_0000_0000_0001_1001_0001_0000; //0x19 register value=0x10
    							configreg27 = 25'b0_0000_0000_0001_1011_1000_1000; // 0x1B register value=0x88

    Regards

    Danilo

  • Hi Danilo,

    I see the datasheet error now, thank you for catching that and letting us know.

    Please let me know if the customer continues to run into issues based on the questions I provided above.

    Regards, Amy