Led ports configuration, Registers definition – Rainbow Electronics T89C5121 User Manual
Page 57

57
A/T8xC5121
4164G–SCR–07/06
LED Ports
Configuration
The current source of the LED Ports can be adjusted to 3 different values: 2, 4 or 10 mA.
The LED output is an alternate function of P3.6 an P3.7 and cannot be used while the
alternate card function is used.
The control register LEDCON is detailed below.
Registers Definition
Table 40. LEDCON Register
Reset Value = XXXX 0000b
7
6
5
4
3
2
1
0
-
-
-
-
LED1[1]
LED1[0]
LED0[1]
LED0[0]
Bit
Number
Bit
Mnemonic
Description
7 - 4
-
Reserved
The value read from this bit is indeterminate. Do not set this bit.
3 - 2
LED1[1,0]
Port LED1 configuration:
LED1[1] LED1[0]
Configuration
0
0
Standard C51 port
0
1
2 mA current source when P3.7 is at Low Level
1
0
4 mA current source when P3.7 is at Low Level
1
1
10 mA current source when P3.7 is at Low Level
1 - 0
LED0[1,0]
Port LED0 configuration:
LED0[1] LED0[0]
Configuration
0
0
standard C51 port
0
1
2 mA current source when P3.6 is at Low Level
1
0
4 mA current source when P3.6 is at Low Level
1
1
10 mA current source when P3.6 is at Low Level