Port Register (Portn) (N = 1 To 6, A, D, H, J, And K); Input Buffer Control Register (Pnicr) (N = 1 To 6, A, D, H, J, And K) - Renesas H8SX/1500 Series Hardware Manual

32-bit cisc microcomputer
Hide thumbs Also See for H8SX/1500 Series:
Table of Contents

Advertisement

8.1.3

Port Register (PORTn) (n = 1 to 6, A, D, H, J, and K)

PORT is an 8-bit read-only register that reflects the port pin status. A write to PORT is invalid.
When PORT is read, the DR bits that correspond to the respective DDR bits set to 1 are read and
the status of each pin whose corresponding DDR bit is cleared to 0 is also read regardless of the
ICR value.
The initial value of PORT is undefined and is determined based on the port pin status.
Bit
7
Bit Name
Pn7
Initial Value
Undefined
R/W
R
Note: The lower four bits are valid and the upper four bits are reserved for port 2 register (PORT2).
The lower seven bits are valid and the upper one bit is reserved for port 6 register (PORT6).
The upper seven bits are valid and the lower one bit is reserved for port A register (PORTA).
8.1.4

Input Buffer Control Register (PnICR) (n = 1 to 6, A, D, H, J, and K)

ICR is an 8-bit readable/writable register that controls the port input buffers.
For bits in ICR set to 1, the input buffers of the corresponding pins are valid. For bits in ICR
cleared to 0, the input buffers of the corresponding pins are invalid and the input signals are fixed
high.
When the pin functions as an input for the peripheral modules, the corresponding bits should be
set to 1. The initial value should be written to a bit whose corresponding pin is not used as an input
or is used as an analog input/output pin.
When PORT is read, the pin status is always read regardless of the ICR value. On-chip modules
are not affected by the pin status when the ICR value is cleared to 0.
If ICR is modified, an internal edge may occur depending on the pin status. Accordingly, ICR
should be modified when the corresponding input pins are not used. For example, in IRQ input,
modify ICR while the corresponding interrupt is disabled, clear the IRQF flag in ISR of the
interrupt controller to 0, and then enable the corresponding interrupt. If an edge occurs after the
ICR setting, the edge should be cancelled.
The initial value of ICR is H'00.
6
5
Pn6
Pn5
Undefined
Undefined
Undefined
R
R
4
3
Pn4
Pn3
Pn2
Undefined
Undefined
R
R
R
Rev. 3.00 Mar. 14, 2006 Page 213 of 804
Section 8 I/O Ports
2
1
0
Pn1
Pn0
Undefined
Undefined
R
R
REJ09B0104-0300

Advertisement

Table of Contents
loading

Table of Contents