English
Language : 

TMP86CS25ADFG Datasheet, PDF (67/194 Pages) Toshiba Semiconductor – 8 Bit Microcontroller
TMP86CS25ADFG
5.4 Port P5 (P57 to P50)
Port P5 is an 8-bit input/output port which is also used as a segment pins of LCD.
When used as input port, the respective output latch (P5DR) should be set to “1”.
During reset, the P5DR is initialized to “1”.
When used as a segment pins of LCD, the respective bit of P5LCR should be set to “1”. When used as an output
port, the respective P5LCR bit should be set to “0”.
P5 port output latch (P5DR) and P5 port terminal input (P5PRD) are located on their respective address.
When read the output latch data, the P5DR should be read and when read the terminal input data, the P5PRD reg-
ister should be read. If the terminal input data which is configured as LCD segment output is read, unstable data is
read.
STOP
OUTEN
P5LCRi
P5LCRi input
Data input (P5PRD)
Data input (P5DR)
Data output (P5DR)
LCD data output
DQ
DQ
Output latch
P5i
Note: i = 7 to 0
Figure 5-5 Port 5
P5DR
(0005H)
R/W
P5LCR
(002AH)
7
P57
SEG47
7
6
P56
SEG46
6
5
P55
SEG45
5
4
P54
SEG44
4
3
P53
SEG43
3
2
P52
SEG42
2
1
P51
SEG41
1
0
P50
SEG40
0
(Initial value: 1111 1111)
(Initial value: 0000 0000)
Port P5/segment output select 0: P5 input/output port
P5LCR
R/W
(set for each bit individually)
1: LCD segment output
P5PRD
7
6
5
4
3
2
1
0
(000BH)
P57
P56
P55
P54
P53
P52
P51
P50
Read only
Page 57