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.

ADS7865 Configuration Register

Other Parts Discussed in Thread: ADS7865, ADS8364, ADS7862

Anyone used the ADS7865 with a microcontroller?  Having trouble writing the Configuration Register for the device. Although the CSn and WRn seem correct, and the data on the bus seems correct, the values do not get moved to the device.  Tried updating the DAC as a way of testing another aspect of the interface, and the DAC output never changes.  The test configuration sequence is as follows:

0x0105 = Reset
0x0103 = Prepare for DAC read-back
0x0800 = DAC Value read-back
0x0127 = Configuration
0x0104 = Prepare Sequence write
0x0F24 = Sequencer written
0x0106 = Prepare Sequence read
0x0800 = Sequencer read-back 1
0x0106 = Prepare Sequence read
0x0800 = Sequencer read-back 2
0x0106 = Prepare Sequence read
0x0800 = Sequencer read-back 3

The attempt to write a DAC value also fails:

0x0101 = Prepare for DAC write
0x0FFF = DAC Value Written
 ADC ADS7865 DAC Value:0x0800
No change is seen on the REFout , device pin 2.

The code sequence to write to the ADS7865 is as follows:

AD_CSn = 1;  // Disable ADC chip
AD_WRn = 1;  // Start with ADC control write disabled
AD_RDn = 1;  // ADC read disabled
Conv_n = 1;  // Ensure initialized to deasserted
 ADC_LSB_Tris = 0x00;  // Make Data[3..0] outputs
 ADC_MSB_Tris = 0x00;  // Make Data[11..4] outputs
 ADC_MSB = Value.MSB;  // Upper byte config
 ADC_LSB = Value.LSB;  // Lower nibble config

 AD_CSn = 0;  // Enable ADC chip
 AD_WRn = 0;  // Execute write
 Nop();
 AD_WRn = 1;  // Capture on rising edge
 AD_CSn = 1;  // Disable ADC chip

  • Hi Mike,

    I believe you are working with Jack on this issue.  I pointed him to a bit of code that I put together for  and ADS8364 a few years back on the MSP430 that may be useful for you - not really sure at the moment.  I've looked over your code and see nothing 'glaringly wrong', but if you can pass along some logic analyser plots, that may be useful.  Here is the code I pointed Jack to:

    http://focus.ti.com/analog/docs/litabsmultiplefilelist.tsp?literatureNumber=slaa150&docCategoryId=1&familyId=390

  • Thanks for the response.  Can't provide logic analyzer plots yet -- the board layout was "success oriented" and had the form factor for the final design, with no headers to easily connect a logic analyzer.  (The original design used the ADS7862, so how much problem could there be just going to the ADS7865?)  But since I'm stuck trying to get this working, it seems a board turn is in my future with easier access to all the signals.

    The way I've verified to myself that the pins are getting properly driven is by single-stepping my code, then looking at each pin with a voltmeter (with a really small probe).  The conversion won't work with the clock like this, but shouldn't the interface be static, and tolerate this approach?

    Jack noted that one issue is use of an 8-bit controller writing to the 12-bit device bus.  Can't really see that matters since the data are latched on the rising edge of WRn.  Or do you see some other impact?

    However, I'm not certain that I have interpreted the data sheet correctly with regard to the configuration register signals. Trying to write to the DAC seems a simple test of the control signals, but I can't even do that.  Could you confirm that Figure 35 in the ADS7865 data sheet correctly depicts writing and reading a DAC value? 

    Thanks again for the response.  Really appreciate the help.

  • Hi Mike -

    For the ADS7865, Figure 35 should do be correct.  I do not have an existing EVM for this device, so it would take me about 2 weeks to get a layout done and have some boards built.  If you can tolerate the wait, I can have someone get started on that Monday morning.   

  • Tom,

    That would be fantastic for you to build an EVM for this.  No way I could do the layout / print / build that fast.  I would deeply appreciate your effort.

    Thanks!