Hi All,
I am currently trying to interface with a 3 digit, 7 segment LED display. I am not having any success. Currently I have the display lighting up, it's just not doing what I want it to do. Here is the code I'm using and the data sheet for the display... Any suggestions?? I can use all the help I can get.
Thanks
#include <SPI.h>
const int ssPin = 10;
//1,2,3 are D.P's respectively
//0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
int dataArray[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
void setup() {
pinMode(ssPin, OUTPUT);
digitalWrite(ssPin, HIGH);
// pinMode(11, OUTPUT);
// pinMode(13, OUTPUT);
// digitalWrite(11, HIGH);
// digitalWrite(13, HIGH);
SPI.begin(); // Initialize SPI parameters
SPI.setBitOrder(MSBFIRST); // MSB to be sent first
SPI.setDataMode(SPI_MODE3); // Set for clock rising edge
SPI.setClockDivider(SPI_CLOCK_DIV64);
}
void loop()
{
digitalWrite(ssPin, LOW);
for (int x=0; x<35; x=x+1)
{
SPI.transfer(dataArray[x]);
}
digitalWrite (ssPin, HIGH);
}
led_test3.ino (946 Bytes)
LTM-8522HR.pdf (90.9 KB)