CPC522
C P C 5 2 2 U s e r M a n u a l
37
© 2 0 2 2 F a s t w e l V e r . 0 0 1
MOV DX, 302H
MOV AL, 30H
OUT DX, AL
MOV DX, 303H
MOV AL, 1H
OUT DX, AL
Exit the configuration mode:
MOV DX, 302H
MOV AL, 57H
OUT DX, AL
MOV AL, 46H
OUT DX, AL
2.5.2.1 Assignment of individual bits of the LED register
Assignment of individual LED control register bits is shown in Table 2-8:
Table 2-8 Assignment of bits of the LED control register
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
Reserve bits.
Read as “0”.
GP red LED
Bit1
GP red LED
Bit0
GP green
LED Bit1
GP green
LED Bit0
The GP LED is bicolor and physically contains 2 independent red and green LEDs. Therefore a
green, red or orange color is available (red and green simultaneously on), depending on the
combination of LEDs lit up. Accordingly an independent software control of each of the LEDs by
means of the LED register is supported. The state of each LED is described by two bits. The
following combinations are supported (see Table 2-9):
Table 2-9 Combinations of GP LED control bits
Bit1
Bit0
Status
0
0
The LED is off
0
1
The LED is blinking at the frequency of 8 Hz
1
0
The LED is blinking at the frequency of 1 Hz
1
1
The LED is on permanently