Since we can source a maximum of 10mA per pin for PORT B and total
maximum current from PORT B is 80mA, hence PORT B is just sufficient to
drive a 5 x 7 Matrix LED directly via Row-Scanning Technique. Below, the
circuit shows one Common Cathode 5 x 7 Matrix LED is connected to Port B
with 120R current limiting resistors. The Columns are activated by
Q1, Q2, Q3, Q4, Q5 respectively by logic high at PD0, PD1, PD2, PD3,
PD4 which switch on gnd to the columns respectively.
The following code,
matc_90.c
demonstrate how to drive a 5 x 7 Matrix LED. The program first display one 5 x 7
pattern on the LEDs and then redisplay this pattern over and over again.
|