2. Turning on an LED
+5V
R LED
G
A
Loutput pin
+5V
R LED
G
A
Loutput pin
1
0
+5V
+0.2V
+1.7V
No current
Current
light
no light
R =
voltage
current
=
5 -1.7
15 x10 -3 =220 ohms
Common
Anode
3. Turning on an LED
GAL output pin
0 V
R
No Current
LED
no light
GAL output pin
+5 V
R
Current
LED
light
R = voltage = 5 - 1.7 = 220 ohms
current 15 x 10^-3
+1.7 V 0 V
0 V
0
1 Common
Cathode
This is what
we use in Lab
5. 7-Segment Display
a
b
c
d
e
f
g
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
6. 7-Segment Display
a
b
c
d
e
f
g
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