163
CHAPTER 5 PORT FUNCTIONS
5.13 Cautions
(1) All the port pins go into a high-impedance state when the RESET signal is input (the internal pull-up resistor is also
disconnected from the pin).
If it is necessary to prevent a pin from going into a high-impedance state during RESET input, use an external circuit.
(2) Bits 1, 3, and 7 of the pull-up resistor option register L (PUOL) that specifies connection of the internal pull-up resistor,
and bits 0 and 2 through 7 of the pull-up resistor option register H (PUOH) are fixed to “0”. However, if “1” is written
to these bits, 1 can be read with an in-circuit emulator.
(3) The contents of the output latch are not initialized by RESET input. To use a port as an output port, be sure to initialize
the output latch before turning ON the output buffer. Unless the output buffer is initialized before the output buffer
is turned ON, unexpected data is output to the output port.
In the same way, when using a port as control pins, be sure to initialize the internal peripheral hardware, and then
set the port in the control mode.
(4) Although the result of a bit manipulation instruction is ultimately 1 bit manipulation, it accesses a port in 8-bit units.
If such an instruction is executed to manipulate a port with some pins set in the input/output mode and the others
in the port mode and in the control mode, the contents of the output latch are undefined (except when a pin is
manipulated by the SET1 or CLR1 instruction). Especially, care must be exercised if the mode of some pins must
be changed between input and output.
The same applies when manipulating the port by using the other 8-bit operation instructions.
(5) To use port 0 as a real-time output port, be sure to reset the PUO0 bit of the pull-up resistor option register L (PUOL)
to “0”, in order not to connect the internal pull-up resistor.
(6) Even when using the P21 through P27 pins in the output port mode or timer output mode, INTPn (n = 0 to 6) interrupt
occurs depending on the edge detection of the pin level. Mask the interrupt before using these pins.
(7) Even when using the P26 and P27 pins as TI2 and TI3 pins, interrupts INTP5 and INTP6 occur. Mask the interrupts
before using these pins.
(8) The pins used as input pins in the control mode (P32, P34, P35, P37, and P94) may malfunction if the corresponding
bit of the port n mode control register (PMCn: n = 3, 9) while these pins are operating. Therefore, write PMCn on
initializing the system.
(9) When using ports 4 and 5, and P90 through P93 as pins in the external memory extension mode, be sure to reset
the corresponding bits of the pull-up resistor option registers (PUOL, PUOH) to “0”, in order not to connect the internal
pull-up resistor.
(10) Do not apply a voltage outside the range of AV
SS
to AV
REF
to P70 through P77 and P80 through P87 used as ANI0
through ANI15.
For details, refer to
13.6 Cautions
in
CHAPTER 13 A/D CONVERTER
.
(11) If some pins of ports 7 and 8 are used for analog input and the others are used for digital input, and if the digital
input changes at analog input sampling timing, the A/D conversion accuracy is affected. When a high accuracy is
necessary, do not use analog input and digital input simultaneously.