what is slave address for ADC121C021

Status
Not open for further replies.
Hi,

They are doing this without hardware.
Oh, I missed this. Thanks for pointing me this.

Klaus
 

I have given my best attempt I do not understand the register structure given in the datasheet. Figure 24. Register Structure page 16. It would be very big help o if you could help me to understand register structure. I cannot understand what value should be write to each register to read data stored in registers.
 

Hi,

you don´t need to write a register before you can read a register.


Do it as simple as can be:
Just read the conversion result register. Done.

Klaus
 


The register definitions are clearly stated in the tables.
The register structure is extremely simple it has a pointer register, which selects which register you will access.

Procedure is:

1. Write to pointer register (register initially powers up at 0x00).
  • master sends device address
  • master sends pointer value.
2a. Write register pointed to by the pointer register value written above.
  • master sends data to the selected register pointed to by the pointer register
2b. Read register pointed to by the pointer register value written above.
  • master sends the device address
  • master receives data from the selected register pointed to by the pointer register
 
Reactions: ansh11

    ansh11

    Points: 2
    Helpful Answer Positive Rating

But KlausSTs opnion is different from your opinion. He said we don't need to write register pointed to by the pointer register value where as you say " Write register pointed to by the pointer register value written above."
 

Hi,

Please keep the names of the datsheet to avoid confusion.
pointer --> for register address
register --> for data

For sure you need to transmit the pointer value.
As written in my posts and as written in the datsheet and as shown in Figure 30.
Typical Pointer Set Followed by Immediate Read of a 2-Byte ADC Register

So if your question is: "What is the pointer value to access the conversion data register?"
Then refer to datasheet page18 chapter "Address Pointer Register".
Look at the table:
Bits p7:3 are all zeroes, all the time.
P2:0 according table are "000" for the data conversin register. so all 8 bits are "0"
...resulting in byte value --> 0x00 = 0b00000000 = 0 = pointer_value

Klaus
 
Reactions: ansh11

    ansh11

    Points: 2
    Helpful Answer Positive Rating

The ADC121C021 has 8 internal data registers and one address pointer. All eight registers that are accessible through the I2C interface using the Address Pointer register. The address pointer determines which of the data registers is accessed by the I2C interface

as per datasheet I2C Write should be something like following
Code:
start, slave address(0x50), Address Pointer register(0x00), Conversion Result Register MSB(0x00), Conversion Result Register LSB(0x00), stop
start, slave address(0x50), Address Pointer register(0x01), Alert Status Register(0x00),  stop
start, slave address(0x50), Address Pointer register(0x02), Configuration Register(0x00), stop
start, slave address(0x50), Address Pointer register(0x04), VLOW Alert Limit Register MSB(0x00), VLOW Alert Limit Register LSB(0x00), stop
start, slave address(0x50), Address Pointer register(0x05), VHIGH Alert Limit Register MSB(0xFF),  VHIGH Alert Limit Register LSB(0xFF), stop
start, slave address(0x50), Address Pointer register(0x06), VMIN Lowest Conversion Registerstop MSB(0xFF), VMIN Lowest Conversion Register LSB(0xFF), stop
start, slave address(0x50), Address Pointer register(0x07), VMAX  Highest Conversion Register MSB (0x00), VMAX  Highest Conversion Register LSB (0x00),sto
 

Hi,

as per datasheet I2C Write should be something like following
...
Your lines are not detailed or better say it's not complete.
I don't know wheter you know this or not.
Missing:
R/W, ACK, Repeated_start ... and so on.

A more complete version is in post#15 ... and in the datasheet, of course.

Klaus
 

All registers have a purpose. However as stated several times, a typical application of the ADC chip is by just reading the result register. You didn't yet clarify what you want to achieve and if your application requires to access additional registers. I'm not sure if you thought about this point at all.
 

But KlausSTs opnion is different from your opinion. He said we don't need to write register pointed to by the pointer register value where as you say " Write register pointed to by the pointer register value written above."

Note I stated that
pointer register (register initially powers up at 0x00)

Looking at the datasheet page 17 Figure 24 and the tables at the top of page 18. A pointer register value olf 0b00000000 points to the register called "Conversion Result", which is what Klaus was referring to. You can read the conversion result register from powerup as the pointer already has a 0b00000000 in it.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…