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: Can i read the device address from a register?

Part Number: ADS7128
Other Parts Discussed in Thread: C2000WARE, TMS320F280039C,

Hi, can i read the slave address from one of the ads7128 registers? I understand the slave address is set using the instructions from page 15 of the tech manual, but i'd like confirmation that the device recognizes the address i gave it. if so, which register is it stored in?

thanks,

james

  • Hi James,

    The ADS7128 reads the status of the ADDR pin on power-up.  There is no user accessible storage location for its own address so there is no way to verify it via a register read.

  • ok thank you Tom. i think i've found a way around reading the register value directly. that is, if i send a command at the 7128's address and i get the device to respond, then i know that the address is configured properly.

    with that said, are you familiar with the CCS/C2000Ware commands necessary to retrieve the values in the 7128's PIN_CFG register? 

    I'm following the the 7128 Data sheet on page 27, section 8.5.1.1 Single Register Read ,

    to attempt to have the 7128 send the PIN_CFG register contents back to my TMS320F280039C MCU, but am running into problems at the moment. below is a screenshot of the various commands i am trying to implement where SINGLE_REGISTER_READ = 0001 0000b and ADC_PIN_CFG_REGISTER_ADDRESS = 0x5  in accordance with the 7128 data sheet. line 75 is the 7bit slave address and the write bit(low).

    alternately, do you know of an easier way to determine that my 7128 is appropriately wired up to the I2C bus? 

  • Hi James,

    Unfortunately I am not familiar with the CCS/C2000Ware code, so I'm not sure what you need to do there.  You could try posting your query to the CCS or the C2000 e2e forums.  I assume you have a #define somewhere in a header that has the OPCODEs noted.  As far as the connections go, do you have pull-ups on the SDA and SCL lines to your ADS7128?  Do you have an 0-scope or logic analyzer to see if lines 74-78 are doing anything with SCL and SDA?

  • yes on both accords (resistors and o'scope). have verified I/O expanders on the same I2C bus so i'm fairly confident the issue isn't there.

    you dont know of a simple command to probe the ADCs to elicit some sort of response? understand this topic spans both the ADC and the CCS aspects of TI's product line and one person can't know it all.  

  • hi tom, rather can we discuss the relationship of the I2CMDR.STT and I2CMDR.STP bits with the I2CDXR register? I noticed that when i tried my own variation of i2c_ex1_loopback.c that when either I2CMDR.STT or I2CMDR.STP was set high, then i can update the contents of the I2CDXR register but nothing actually comes across the SDA line. 

    Do I need to cycle I2CMDR.STT(P) in order to shift bits out of the I2CXSR and onto the SDA line? 

  • Hi James,

    Here is a screen shot of reading the PIN_CFG register:

    I'm at address 0x10, so write single register read command (opcode 0x10), from the PIN_CFG register (address 0x05) and then read the contents.  In my case they are 0x00. 

  • thank you tom. yes, this is an exact reflection of what im trying to do. my primary concern though is how to do it. i think im writing the correct commands in the CCS IDE, but im not seeing any traffic some back in my I2C RX buffer indicating as much. 

    which software are you using to command the ADC via the I2C bus?  

  • I am using the software associated with the ADS7128 evaluation module.

  • i have a bp-ads7128 right next to me. can i access that software using the module? 

  • Yes you can!  Follow the instruction from the BP-ADS7128 Users Guide.