I'm trying to get an Analog AD5235 digipot working. All I want to do is write a value to each of the 2 channels as a test...simple! But for some reason I can't get it to do anything. I've triple checked the wiring according to the data sheet. I'm using a Mega 2560.
I have A and B of each channel on the pot connected to +5V and GND and am measuring the voltage from the wiper. The basic code I have is essentially this:
Do you use the right pins for SPI according to the 2560 ?
The hardware of 2560 is described as :
SPI: 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS). These pins support SPI communication using the SPI library. The SPI pins are also broken out on the ICSP header, which is physically compatible with the Uno, Duemilanove and Diecimila.
Grag38:
Do you use the right pins for SPI according to the 2560 ?
The hardware of 2560 is described as :
SPI: 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS). These pins support SPI communication using the SPI library. The SPI pins are also broken out on the ICSP header, which is physically compatible with the Uno, Duemilanove and Diecimila.
Yes, I am using those pins and have also modified pins_arduino.h to set the correct variables to do so.
I actually appear to be getting activity, but when using an analog pot to vary the value sent to the digi pots the voltage appears to be going all over the place...fairly random, not a smooth up down. It will go from 0-5v and then reset, then do random stuff.
I know this is an old thread but for anybody trying to interface a 1024 Position (10-bit) Digital Potentiometer (AD5231 - AD5235), I wrote a tutorial here: