Post Go back to editing

AD5272 accessing and programming issues


I am trying to access AD5272 I2C programmable resistor but have communication issues. I found that, comparing to AD5259 datasheet, the datasheet of the AD5272 is quite unusable, unreadable and even with the wrong data containing. Unfortunately, no software samples are provided.

The chip itself is connected to an Arduino-like board to I2C pins. The address of AD5272 is 0x2C and the chip is visible on I2C bus.

If I understood correctly, the chip should have disabled RDAC write-protect (thus, I should write 0b10 to the Control register).

After that step, I have tried to write the random value to the RDAC.

The next step is to read back the RDAC value, just for checking.

But, I am missing some points obviously, because I can read back the same value, or it seems that I can't even write to RDAC. Unfortunately, I have no evaluation board available thus no having opportunity to sniff some valid data on the bus.

Here is my code, hope it is well explained so you will be able to give me some suggestions.



//Unlocking *******************************************************************************

Wire.beginTransmission(0x2C); // transmit to device with address 0x2C
Wire.write(0b00011100); // Write contents of the serial register data to the control register.
Wire.write(0b00000010); // sends instruction byte for unlocking
Wire.endTransmission(); // stop transmitting

//Writing to RDAC procedure *******************************************************************************
Wire.beginTransmission(0x2C); // transmit to device 0x2C
Wire.write(0b00000100); //Write contents of serial register data to RDAC. 
Wire.write(0b0000111); // write 7 to RDAC (random number) 
Wire.endTransmission(); // stop transmitting


//Reading from RDAC procedure ***************************************************************************

Wire.beginTransmission(0x2C); // transmit to device 0x2C
Wire.write (0b00001000); // sends instruction byte for RDAC reading 
Wire.write (0b00000000); //doesn't care actually
Wire.endTransmission(); // stop transmitting

//Picking up the response, containing 2 bytes RDAC readback*********************************

Wire.requestFrom (0x2c, 2); 
if(Wire.available() == 2){ 
c = (); // receive a byte as character 
Serial.print ("RDAC ="); // print the character 
Serial.print (c); // print the character 
Serial.println (" "); 

//Requesting control register content***************************************************
Wire.beginTransmission(0x2C); // transmit to device 0x2C
Wire.write (0b0100000); // sends instruction byte for reading 
Wire.write (0b00000000); //doesn't care
Wire.endTransmission(); // stop transmitting

Wire.requestFrom (0x2c, 2); 

if(Wire.available() == 2){ 
val = (); // receive a byte as character 
Serial.println (" "); 
Serial.print ("Register ="); // print the character 
Serial.print (val); // print the character 
Serial.println (" "); 

Top Replies

  • You can buy the Eval board for AD5272 to test the part. The link is

    Additionally, the linux drivers are available at the link

    Can you tell us, what is wrong in the AD5272 datasheet.

    I2C read and write commands are clearly mentioned in the datasheet on Pages 19 and 20. 

    Additionally, please share the schematic.

  • The datasheet contains a table that is not appropriate for the device described so it just confuses the reader unnecessary.

    Schematic is the most simple, Seeduino XIAO board connected directly to the AD5272, with ADDR pin tied to Vdd, so the I2C address is b101100. Pull-ups are 10k. I am testing every day a lot of devices on the same protoboard and no communication issues have been found for now.

    I would say that this is just a programming issue that I can't resolve without confirming that I do the programming job well or not.

    Can you comment/confirm the code I have attached?

    For now, I am just trying to write data to control register and read it back but I get only zeroes as an answer...

    A sample of code at the end of the datasheet  would be very useful, I guess...



  • Can you tell which table has the issues in the datasheet.?

    I am not familiar with the Seeduino board and its codings. However, your codes seem to be correct with respect to the I2C read and write commands to AD5272. Only missing in the code is to enable the update of wiper position.

    An example command list is provided in Table 13.

    You have not yet shared the schematic.

  • Here is the schematic. Vdd and RST are tied to 5V but that Is not visible here.

    Consider that I am working with Arduino.

    Thank you for confirming that the code is the one that should work.

    You said that I am missing the part of code that should enable the update of wiper position. I thought that the first part of my code is supposed to do that!?!? (//Unlocking ******).

    The table 13 you are referring to, describes SPI interface/commands and this device is only I2C capable, so, the mentioned table is absolutely unnecessary in this datasheet.


  • My apologies. I somehow missed reading the first code section. Thanks for bringing it to my notice.

    Table 13 shows the shift register contents as per Figure 2 that will be used to parsed into SDA data in I2C transactions. So, there is nothing wrong with the Table 13.

    What is VDD connected to? Is it same as 5V supply. 

    You need to confirm if the Arduino uC digital interface is 5V compatible. Also, have you confirmed if the SDA data during read back is correct.

  • Probably we are looking at different datasheets.(This is what I have in front of me: AD5272 ).

    Vdd is connected to 5V also. Same PSU. 

    Anyway, by using the logic sniffer I have found that my part of code responsible for receiving the answer form AD5272 was faulty. I have changed the code and now I have my test setup working.

    Thank you for your prompt response and confirmation.

  • The table 13 is for devices with SPI. Its not applicable for AD5272. I read it somewhere from AD.