English
Language : 

TMP86CM49NG Datasheet, PDF (70/252 Pages) Toshiba Semiconductor – 8 Bit Microcontroller
5. I/O Ports
5.5 Port P4 (P47 to P40)
TMP86CM49NG
5.5 Port P4 (P47 to P40)
Port P4 is an 8-bit input/output port.
Port P4 is also used as a serial interface input/output and an UART input/output.
When used as an input port, a serial interface input/output and an UART input/output, the corresponding output
latch (P4DR) should be set to "1".
During reset, the P4DR is initialized to "1", and the P4OUTCR is initialized to "0".
It can be selected whether output circuit of P4 port is a C-MOS output or a sink open drain individually, by setting
P4OUTCR. When a corresponding bit of P4OUTCR is "0". the output circuit is selected to a sink open drain and
when a corresponding bit of P4OUTCR is "1", the output circuit is selected to a C-MOS output.
When used as an input port, a serial interface input and an UART input, the corresponding output control
(P4OUTCR) should be set to "0" after P4DR is set to "1".
P4 port output latch (P4DR) and P4 port terminal input (P4PRD) are located on their respective address.
When read the output latch data, the P4DR should be read. When read the terminal input data, the P4PRD register
should be read.
Table 5-3 Register Programming for Multi-function Ports (P47 to P40)
Function
Port input UART input or serial interface input
Port “0” output
Port “1” output UART output or serial interface
output
Programmed Value
P4DR
P4OUTCR
“1”
“0”
“0”
Programming
for each applica-
“1”
tions
STOP
OUTEN
P4OUTCRi
DQ
P4OUTCRi input
Data input (P4PRD)
Output latch read (P4DR)
Data output (P4DR)
DQ
P4i
Control output
Output latch
Control input
Note: i = 7 to 0
Figure 5-6 Port 4
Page 56