|
TMP86FS28FG Datasheet, PDF (81/272 Pages) Toshiba Semiconductor – 8 Bit Microcontroller | |||
|
◁ |
TMP86FS28FG
5.9 Port P8 (P80 to P87)
Port P8 is an 8-bit input/output port that can also be used for LCD segment output.
A reset initializes the output latch (P8DR) to â1â, the Pch control (P8OUTCR) to â0â, and the LCD output control
register (P8LCR) to â0â.
To use a pin in Port P8 as an input port, set P8DR to â1â and then set the corresponding bit in P8LCR and
P8OUTCR to â0â.
To use a pin in Port P8 as an LCD segment output, set the corresponding bit in P8LCR to â1â.
The output circuit of Port P8 can be set either as sink open-drain output (â0â) or CMOS output (â1â) individually
for each bit in P8OUTCR.
Port P8 has a separate data input register. The output latch state can be read from the P8DR register, and the pin
state can be read from the P8PRD register.
Table 5-11 Register Programming for Port P8 (P80 to P87)
Function
Port input
Port â0â output
Port â1â output
LCD segment output
P8DR
â1â
â0â
â1â
*
Port Input
P8OUTCR
â0â
Set as
appropriate.
*
Note: An asterisk (*) indicates that either â1â or â0â can be set.
STOP
OUTEN
P8OUTCRi
P8OUTCRi input
P8LCRi input
P8LCRi
Data input (P8PRD)
Output latch read (P8DR)
Data output (P8DR)
LCD data output
DQ
DQ
DQ
Output latch
Figure 5-10 Port P8
P8LCR
â0â
â0â
â0â
â1â
P8i
Note) i = 7~0
Page 69
|
▷ |