Aug 21, 2010

5x32 Matrix SMD LED (AT89C2051)


Part used: AT89C2051 MCU, 74HC595 (8-bit shift register) and FCS9012 general PNP transistors 600mA.




Data is sent to the shift register by MCU through P3.7 and clocked through P1.1. When 32 bits data has been shifted, latch signal on P1.0 activated (positive pulse). Now, time for the row selection works. Initially all P3.0..P3.4 are high, no LED energized then P3.4 turn low to energize first row.  After a while (about 6.7ms) new data sent to shift register, first row turn off (P3.4 high) and the second row turn on (P3.3 low). 1st..5th row scaned continuously by MCU to generate 30 fps, so LED blinking during row multiplexing is not realized by eyes. The multiplexing is done by timer interrupt, not just determinstic time also auto reload meaning it will do the interrupt repeatedly. Forgot to tell that there are 180-220 ohms resistor on each output of 74HC595 before go to the LED cathode.

Here below the complete code.
https://docs.google.com/file/d/0Bz15eKH_erJrYXdNcDhxdWJOaUE/edit?usp=sharing

4 comments:

The Free Mind said...

Excellent project !!!
One question ...

If you were to replace the 8 resistors on each 74HC595 with one resistor on the collector of each FCS9012, what value would it be ?
What are the pros and cons of doing idea ?

Silvester Dao said...

You can't maintain constant current on LED, the brightness will go up and down.

Jimboy Cantila said...

I tried it but it doesn't work...
Can you teach me how to make this work??

Silvester Dao said...

No, I can't. The schematic and the code are clear.

Post a Comment

P10 Module x2 Running Text (STM32F103C8T6)

Interested to build a running text display made of two P10 modules? The text looks shaky on video but actually not, recording quality ...