shakhandoo
Newbie level 1
Hi,
I'm running 4: 5x7 bi colored dot matrices from the MAX6952. I'm using the PIC18's SPI to interface with it. I sent some dummy bits, so I know my CLK and Dout work.
But the MAX6952 doesn't light up, and seems to be not receiving any data from my Dout. The MAX6952 can take 2 words (first byte for address and the second for function to perform) and then SS must be taken high.
Its not a hardware problem I've checked my connections multiple times.
Is there anyone who could help me? Or a way so the pins of MAX6952 can source and sink the LED matrix pins?
Thanks !!
Below is some of my code within my main function:
OpenSPI(SPI_FOSC_64, MODE_01, SMPMID);
// put code here to lihgt up LED displays
SPI_CLK = 0;
SPI_CS1 = 1;
SPI_CS2 = 1;
SPI_SDO = 0;
SPI_CS1 = 0;
SPI_CS2 = 0;
delay_ms(200);
putcSPI(0x04); // configuration address
delay_ms(200);
putcSPI(0b10001101); // configuration setup - normal operation
delay_ms(200);
SPI_CS1 = 1;
SPI_CS2 = 1;
SPI_CS1 = 0;
SPI_CS2 = 0;
delay_ms(200);
putcSPI(0x01); // intensity register address for digit 0
delay_ms(200);
putcSPI(0x08); // 8/16 the intensity, 20 mA
delay_ms(200);
SPI_CS1 = 1;
SPI_CS2 = 1;
SPI_CS1 = 0;
SPI_CS2 = 0;
delay_ms(200);
putcSPI(0x03); // scan limit address - sets how many digits will light up
delay_ms(200);
putcSPI(0x01); // 4 digits will display
delay_ms(200);
SPI_CS1 = 1;
SPI_CS2 = 1;
SPI_CS1 = 0;
SPI_CS2 = 0;
delay_ms(200);
putcSPI(0x07); //Display Test Address
delay_ms(200);
putcSPI(0x01); //Turn LEDS on
delay_ms(2000);
SPI_CS1 = 1;
SPI_CS2 = 1;
SPI_SDO = 1;
SPI_CLK = 0;
}
I'm running 4: 5x7 bi colored dot matrices from the MAX6952. I'm using the PIC18's SPI to interface with it. I sent some dummy bits, so I know my CLK and Dout work.
But the MAX6952 doesn't light up, and seems to be not receiving any data from my Dout. The MAX6952 can take 2 words (first byte for address and the second for function to perform) and then SS must be taken high.
Its not a hardware problem I've checked my connections multiple times.
Is there anyone who could help me? Or a way so the pins of MAX6952 can source and sink the LED matrix pins?
Thanks !!
Below is some of my code within my main function:
OpenSPI(SPI_FOSC_64, MODE_01, SMPMID);
// put code here to lihgt up LED displays
SPI_CLK = 0;
SPI_CS1 = 1;
SPI_CS2 = 1;
SPI_SDO = 0;
SPI_CS1 = 0;
SPI_CS2 = 0;
delay_ms(200);
putcSPI(0x04); // configuration address
delay_ms(200);
putcSPI(0b10001101); // configuration setup - normal operation
delay_ms(200);
SPI_CS1 = 1;
SPI_CS2 = 1;
SPI_CS1 = 0;
SPI_CS2 = 0;
delay_ms(200);
putcSPI(0x01); // intensity register address for digit 0
delay_ms(200);
putcSPI(0x08); // 8/16 the intensity, 20 mA
delay_ms(200);
SPI_CS1 = 1;
SPI_CS2 = 1;
SPI_CS1 = 0;
SPI_CS2 = 0;
delay_ms(200);
putcSPI(0x03); // scan limit address - sets how many digits will light up
delay_ms(200);
putcSPI(0x01); // 4 digits will display
delay_ms(200);
SPI_CS1 = 1;
SPI_CS2 = 1;
SPI_CS1 = 0;
SPI_CS2 = 0;
delay_ms(200);
putcSPI(0x07); //Display Test Address
delay_ms(200);
putcSPI(0x01); //Turn LEDS on
delay_ms(2000);
SPI_CS1 = 1;
SPI_CS2 = 1;
SPI_SDO = 1;
SPI_CLK = 0;
}