530 likes | 1.73k Vues
7-Segment Displays. Module M7.2 Section 6.5. Turning on an LED. Common Anode. Turning on an LED. Common Cathode. This is what we use in Lab. 7-Segment Display. a. f. b. g. e. c. d. 7-Segment Display. a b c d e f g 0 1 1 1 1 1 1 0 1 0 1 1 0 0 0 0 2 1 1 0 1 1 0 1
E N D
7-Segment Displays Module M7.2 Section 6.5
Turning on an LED Common Anode
Turning on an LED Common Cathode This is what we use in Lab
a f b g e c d 7-Segment Display a b c d e f g 0 1 1 1 1 1 1 0 1 0 1 1 0 0 0 0 2 1 1 0 1 1 0 1 3 1 1 1 1 0 0 1 4 0 1 1 0 0 1 1 5 1 0 1 1 0 1 1 6 1 0 1 1 1 1 1 7 1 1 1 0 0 0 0
a f b g e c d 7-Segment Display a b c d e f g 8 1 1 1 1 1 1 1 9 1 1 1 1 0 1 1 A 1 1 1 0 1 1 1 b 0 0 1 1 1 1 1 C 1 0 0 1 1 1 0 d 0 1 1 1 1 0 1 E 1 0 0 1 1 1 1 F 1 0 0 0 1 1 1
K-Map for Segment e e = D3 & D2 # !D2 & !D0 # D3 & D1 # D1 & !D0 D1 D0 00 01 11 10 D3 D2 00 1 1 01 1 D1 & !D0 D3 & D2 11 1 1 1 1 10 1 1 1 !D2 & !D0 D3 & D1
Can’t start with numbers 7seg.abl Z3..Z0 MODULE seg7 TITLE '7 Segment Decoder, A. Student, 7/12/02' DECLARATIONS " INPUT PINS " Z3..Z0 PIN 6,7,11,5; " Switch 1..4 Z = [Z3..Z0]; " 4-bit input vector " OUTPUT PINS " [A,B,C,D,E,F,G,DP] PIN 15,18,23,21,19,14,17,24 ISTYPE 'com'; Segments = [A,B,C,D,E,F,G]; “ 7-segment LED display
EQUATIONS @radix 16; " Identify the Hex Base truth_table ( Z -> Segments ) " 7-segment display 0 -> 7E; 1 -> 30; 2 -> 6D; 3 -> 79; 4 -> 33; 5 -> 5B; 6 -> 5F; 7 -> 70; 8 -> 7F; 9 -> 7B; 0A -> 77; 0B -> 1F; 0C -> 4E; 0D -> 3D; 0E -> 4F; 0F -> 47; END seg7 a b c d e f g 0 1 1 1 1 1 1 0 1 0 1 1 0 0 0 0 2 1 1 0 1 1 0 1 3 1 1 1 1 0 0 1 4 0 1 1 0 0 1 1 5 1 0 1 1 0 1 1 6 1 0 1 1 1 1 1 7 1 1 1 0 0 0 0 HEX 8 1 1 1 1 1 1 1 9 1 1 1 1 0 1 1 A 1 1 1 0 1 1 1 b 0 0 1 1 1 1 1 C 1 0 0 1 1 1 0 d 0 1 1 1 1 0 1 E 1 0 0 1 1 1 1 F 1 0 0 0 1 1 1 7seg.abl (cont’d)