I am trying to use the AD5231 Digital potentiometer in a school project. However, I am having a lot of trouble with it. It's supposed to be connected to raspberry pi (model 2 B+) and I've trying to speak to it via SPI
I was wondering if anyone can help me with this. This is the following code I am using to try and speak to the device (I'm using Python)
spi = spidev.SpiDev()
spi.open(0,0)
spi.max_speed_hz = 10000
spi.writebytes([0xC0, 0x00, 0x00])
However, no matter what I do, I am constantly reading 75kohms from terminal A to terminal B, where B is grounded and A is a NC. I'm not sure whether I should be feeding any voltage to the wiper resistance. The rest of the hardware should be set up properly as I have redone it a few times to make sure.
C0
will left shift the RDAC data by 1 position (increasing the resistance). but if you are using a 10k device, 7.5k will already have the msb set and little will occur. Try using codeB0
to actually set an arbitrary value. You could also try command01
which will restore the EEMEM contents which (if unchanged from factory) will set it up for midscale. \$\endgroup\$