AVR Dot Matrix Led

Playing with Dot matrix leds (5×7) the easy way

Some theory first

A 5×7 dot matrix led is what the name calls: a dot led in a 5×7 matrix 🙂

The pinout is the following:

Source: Kingbright

In order to light the led you need to provide an active high(+Volts) to his ROW (RX) and an active low(Zero or ground) to this column (CX).

The tricky part is when you want to have a complete character and not a pix on.

Pseudo code:

ROWS=the_leds_you_want_on
C1 = 0
wait some time
C1= 1
ROWS=the_leds_you_want_on
C2 = 0
wait some time
C2 = 1

Repeat for the 5 columns.

Doing that with the correct frequency you will see a character.

Parts

1xAtmega168
7x1KΩ resistors for the ROWS
1x16MHz crystal
2x22pF capacitors
1x5x7 Common Cathode LED matrix
Your bench power supply at 5V

Connections to the display
COL1 PC0
COL2 PC1
COL3 PC2
COL4 PC3
COL5 PC4

ROW1 PD0
ROW2 PD1
ROW3 PD2
ROW4 PD3
ROW5 PD4
ROW6 PD5
ROW7 PD6

Source code on github https://github.com/billygr/avr-matrix-5×7

References: www.kingbright.com

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *