upd70f3402 Renesas Electronics Corporation., upd70f3402 Datasheet - Page 133

no-image

upd70f3402

Manufacturer Part Number
upd70f3402
Description
32-/16-bit Single-chip Microcontroller With Can Interface
Manufacturer
Renesas Electronics Corporation.
Datasheet
4.3.6 Port 4
Port 4 is a 3-bit port for which I/O settings can be controlled in 1-bit units.
(1)
(2)
Remarks: 1. Input mode:
Symbol
R/W
P4
Port 4 functions
• 3-bit I/O port
• Port input/output specifiable in 1-bit units by port mode register 4 (PM4)
• Port mode/control mode specifiable in 1-bit units by port mode control register 4 (PMC4)
• On-chip pull-up resistor specifiable in 1-bit units by pull-up resistor option register 4 (PU4)
• On-chip pull-down resistor specifiable in 1-bit units by pull-down resistor option register 4 (PD4)
• N-ch Open drain specifiable in 1-bit units by port function register 4 (PF4).
See Table 4-8, “Port Type,” on page 170 for alternate functions.
Registers
(a) Port register 4 (P4)
Port register 4 (P4) is an 8-bit register that controls pin level read, output level write. It can be read
and written in 8-bit or 1-bit units.
2. An undefined value (pin input level) is read for the value after reset when P4 is read in
R/W
7
0
Output mode:
the input mode. When P4 is read in the output mode, 00H (output latch value) is output.
P4n
0
1
R/W
0
6
Outputs 0
Outputs 1
R/W
Figure 4-29: Port Register 4 (P4) Format
5
0
User’s Manual U16702EE3V2UD00
When port 4 (P4) is read, the pin levels at this time are read. During
write, the data written to P4 is written. This does not affect the input
pins.
When port 4 (P4) is read, the value of P4 is read. During write, the
value is written to P4 and the written value is immediately output.
Output data control (in output mode) (n = 0 to 2)
Chapter 4 Port Functions
R/W
4
0
R/W
3
0
R/W
P42
2
R/W
P41
1
R/W
P40
0
FFFFF408H undefined
Address
After reset
133

Related parts for upd70f3402