Ok, I'm stumped...
I have read around on the forums for the answer to this, and I cannot find it.
I have the MAX6954 setup on a SPI collection on the UNO R3.
I have modified the digitalPot example, so that I could use the easy way to write the address and the command.
At the moment I want to send the command to test all the segments of the 16- segment displays.
Withthe help of Mixed-signal and digital signal processing ICs | Analog Devices, I have got the following code
// inslude the SPI library:
#include <SPI.h>
// set pin 10 as the slave select for the digital pot:
const int slaveSelectPin = 10;
void setup() {
// set the slaveSelectPin as an output:
pinMode (slaveSelectPin, OUTPUT);
// initialize SPI:
SPI.begin();
digitalPotWrite(0x07, 0x01);
}
void loop() {
digitalPotWrite(0x07, 0x01);
digitalPotWrite(0x02, 0xff);
}
int digitalPotWrite(int address, int value) {
// take the SS pin low to select the chip:
digitalWrite(slaveSelectPin,LOW);
// send in the address and value via SPI:
SPI.transfer(address);
SPI.transfer(value);
// take the SS pin high to de-select the chip:
digitalWrite(slaveSelectPin,HIGH);
}
I have tried playing with SPI.setBitOrder() and set MSBFIRST, and LSBFIRST
I have also played with SPI.setMode(), and gone through all of the options...
All of which give nothing on the display., although I have noticed that the mode 3 gives the led on pin 13 lit all of the time dimley.
Has anyone got any ideas on this one?
Everything appears to be wired correcly.
I have also added an LED to the DOUT and it looks like there is output coming through the registers.
I have a serial dump of the address and values which gives me
7 -1
2 - 255
is there any way I can se the binary representation of what is being transfered?
Many thanks
Jimmy