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.

ADS7128: am i reading the correct register?

Part Number: ADS7128

on the ads7128, I'm applying .5V to to Ch2 (pin1) and my Vref is 3v3. I'll skip the math, but I'm expecting a bit pattern of (roughly) xxxx0010 | 01101100 where the lowest 8 (bold) are the LSBs and the leading eight are the MSBs (four of which are 'don't cares').

Are 0xA4 (RECENT_CH2_LSB Register) and 0xA5 (RECENT_CH2_MSB Register) the registers I should be reading? 0xA4 is described as "Lower 8 bits of the last conversion result for this analog input channel." I'm assuming the conversion happens automatically or do i need to give the ADS7128 a command to convert?

  • Hi James,

    Have a read over section 8.3.6 with regards to the RECENT_CHx registers.  From there, start with a simple manual conversion - refer to section 8.4.2 and figures 30 and 31.

  • thanks Tom, the problem is, i'm having a hard time just telling whether the ADS7128 is even reacting to the commands I think im giving it. Here is lengthy discussion im having with Manoj: https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1217294/tms320f280039c-q1-need-help-transmitting-bitstream-on-i2c-bus-to-ads7128/4598780#4598780

    is there a feedback test I can use to determine whether the ads7128 is understanding what im sending? im literally just trying to convert a .5V signal in a digital level based on 3v3 vref

  • Tom, I followed your advice. no joy though

    WRT 8.3.6, what i gather is that you're pointing me to "...only the first conversion for the selected AIN channels must be initiated by the host" 

    Then, I clicked on Manual Mode and jumped to the section here:

    My understanding is that I automatically satisfy steps 1 thru 3 since....

    1.  (Source: p24, section 8.4) and

    2.  (Source: p17, section 8.3.8)

    Therefore, I can jump straight to step 4: "Configure desired channel ID in MANUAL_CHID field"

    Using section 8.6.13 on pages 38 and 39, I find that I am interested in setting this field as 10b (which if I did the conversation right, is 0x2 in hex)

    ok cool, now on to step 5: "Host provides Conversion Start Frame on I2C Bus" This is where things get sticky for me since I cannot find anything in the doc that defines what a "conversion start frame is" Additionally, I am not alone. In short, Cynthia says I need to "write two [dummy data] frames once I've written to the MANUAL_CHID field" 

    Step 6: Host provides "conversion read frame on I2C Bus." Again, not defined anywhere, but I assume this means I need to tell the device to convert some data and send it to me (i.e., a read command). For example, read from register 0xA4 (the RECENT_CH2_LSB Register)

    with all that being said, this is what I've come up with, and still no joy: 

    Are there any glaring mistakes or incorrect assumptions?

  • I've updated my code..still no luck tho :/

  • Hi James,

    Maybe this will help.  Here is a screen capture showing the selection of CH0 for conversion:

    And then here is the read sequence, with 0.5V on CH0:

    The SW tool I'm using won't let me capture any less then 10 conversion results, but you can see the 0x2590, 0x2580, 0x25A0 results in the first three transactions.

  • thanks, but this didn't really address/answer any of the questions that I had. also, you're introducing RMS...which im not looking for. i simply want to convert a .5VDC AIN to a 12bit output with a Vref of 3v3. Maybe i ought to take another approach...is there anyone in your shop with familiarity programming these devices using TI CCS s/w?

  • Hi James,

    I see that Manoj has reached out to you.  Let me know how that goes.