Академический Документы
Профессиональный Документы
Культура Документы
1. Quick Revision
2. Interfacing Key-board
3. Interfacing 7-Segment LEDs
1
LED = Light Emitting Diode
2
LED INTERFACING
Case-1: LED is ON if output = 0, current is low
Case-2: Too much current, Failure of Port or LED
Case-3: Not enough drive (1ma), LED is too dim
LED INTERFACING
There are 2 ways of connecting LEDs to I/O ports:
Decimal point
7-SEGMENT: COMMON ANODE
Common anode: All anodes are connected to a power
supply and cathodes are connected to data lines
Logic 0 turns on a segment
Example: To display digit 1, all segments except b and
c should be OFF, Byte 11111001 = F9H will display digit
1 +5V
7-SEGMENT: COMMON CATHODE
Common Cathode: All cathodes are connected to GND
and anodes are connected to data lines
Logic 1 turns on a segment
Example: To display digit 1, all segments except b and
c should be OFF, Byte 00000110 = 06H will display digit
1
7-SEGMENT DISPLAY STRUCTURE
7-SEGMENT DISPLAY STRUCTURE
7-SEGMENT DISPLAY TABLE
a a a
BCD pgfedcba he
f b f b b f b
7_seg x g g g
0000 001111 11 3f
e c e e c c
0001 00110000 30 d d d
0010 0101101 1 5b
0011 010011 11 4f
0100 011001 10 66
a a a a a
0101 01101101 6d
f b f b f b
0110 01111101 7d g g g g
0111 00000111 07 c e c c e c c
1000 01111111 7f d d d d
1001 01101111 6f
7-SEGMENT DISPLAY DRIVERS
MULTIPLE 7-SEGMENT DISPLAYS