We are using the ad5274 device to control an LCD contrast pin. I have successfully instantiated the ad5274 linux driver. The driver exposes a couple of files in /sys/bus/i2c/devices/000-02c. The files of note are rdac0, otp0en, and otp0. I can't find any documentation that explains how someone is to use these files to program the ad5274 device. Any help?
Hi,
You can find the documentation here: Digital Potentiometer Linux Driver [Analog Devices Wiki]
If something is not clear or if there are any more questions, please let me know.
- Lars
Hi Lars,
I have this documentation but it really does not do much good. That document does not talk about otpOen and opt0 files. Additionally, the rdac0 files seems to write only 8 bit values to the 5274 device, but the rdac register is 16 bits.
-Mike
The AD5274 has 256 different programmable positions. These can be set via the rdac0 attribute. The opt0 attribute gives you access to the 50-TP memory which allows to set the power-on-reset position of the output. the opt0_en attribute first needs to be set to 1, before the opt0 attribute can be written.
The driver has been tested, that doesn't mean there are no bugs though.
What is the result that you get on readback? Is it the same each time or does it change?
Lars,
Have the Linux drivers been tested? I send values to the device using "echo 100 > rdac0". I have an oscilloscope connected to the I2c lines and see that data coming into and out of the device. But after sending 100 to rda0 I then "cat rdac0" and do not get back 100 as expected.