Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Need Help driving MAX6952 LED Driver from PIC18F4550

Status
Not open for further replies.

shakhandoo

Newbie level 1
Joined
May 16, 2010
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,296
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;
}
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top