CHAPTER 14 PORT FUNCTION
User’s Manual U13850EJ6V0UD
480
(1) Function of P1 pins
Port 1 is a 6-bit I/O port for which I/O settings can be controlled in 1-bit units. I/O settings are controlled via the
port 1 mode register (PM1).
In output mode, the values set to each bit are output to the port 1 register (P1). The port 1 function register (PF1)
can be used to specify whether P10 to P12, P14, and P15 are normal outputs or N-ch open-drain outputs.
When using this port in input mode, the pin statuses can be read by reading the P1 register. Also, the P1
register (output latch) values can be read by reading the P1 register while in output mode.
A pull-up resistor can be connected in 1-bit units when specified via pull-up resistor option register 1 (PU1).
Clear the P1 and PM1 registers to 0 when using alternate-function pins as outputs. The ORed result of the port
output and the alternate-function pin is output from the pins.
When a reset is input, the settings are initialized to input mode.
(2) Control registers
(a) Port 1 mode register (PM1)
PM1 can be read/written in 8-bit or 1-bit units.
After reset:
3FH
R/W
Address: FFFFF022H
7
6
5
4
3
2
1
0
PM1
0
0
PM15
PM14
PM13
PM12
PM11
PM10
PM1n
Control of I/O mode (n = 0 to 5)
0
Output mode
1
Input mode
(b) Pull-up resistor option register 1 (PU1)
PU1 can be read/written in 8-bit or 1-bit units.
After reset:
00H
R/W
Address: FFFFF082H
7
6
5
4
3
2
1
0
PU1
0
0
PU15
PU14
PU13
PU12
PU11
PU10
PU1n
Control of on-chip pull-up resistor connection (n = 0 to 5)
0
Do not connect
1
Connect
Содержание V850/SB1
Страница 2: ...User s Manual U13850EJ6V0UD 2 MEMO ...