English
Language : 

M16C26A Datasheet, PDF (234/352 Pages) Renesas Technology Corp – 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/Tiny SERIES
M16C/26A Group (M16C/26A, M16C/26B, M16C/26T)
16. Programmable I/O Ports
16.4 Port Control Register
Figure 16.4.1 shows the port control register.
When the P1 register is read after setting the PCR0 bit in the PCR register to “1”, the corresponding port
latch can be read no matter how the PD1 register is set.
16.5 Pin Assignment Control register (PACR)
Figure 16.5.1 shows the PACR. After reset set the PACR2 to PACR0 bit before you input and output it to
each pin. When the PACR register isn’t set up, the input and output function of some of the pins doesn’t
work.
PACR2 to PACR0 bits: control the pins enabled for use.
At reset, these bits are “000”.
In 48-pin package, set these bits to “1002”.
In 42-pin package, set these bits to “0012”.
U1MAP: controls the assignment of UART1 pins.
If the U1MAP bit is set to “0” (P67 to P64) the UART1 functions are mapped to P64/CTS1/RTS1,
P65/CLK1, P66/RxD1, and P67/TxD1.
If the U1MAP bit is set to “1” (P73 to P70) the UART1 functions are mapped to P70/CTS1/RTS1,
P71/CLK1, P72/RxD1, and P73/TxD1.
PACR is write protected by PRC2 bit in the PRCR register. PRC2 bit must be set immediately before the
write to PACR.
16.6 Digital Debounce function
Two digital debounce function circuits are provided. Level is determined when level is held, after applying
either a falling edge or rising edge to the pin, longer than the programmed filter width time. This enables
noise reduction.
________
_______ _____
This function is assigned to INT5/INPC17 and NMI/SD. Digital filter width is set in the NDDR register and
the P17DDR register respectively. Additionally, a digital debounce function is disabled to the port P17
input and port P85 input. Figure 16.6.1 shows the NDDR register and the P17DDR register.
Filter width :
(n+1) × 1/ f8 n: count value set in the NDDR register and P17DDr register
The NDDR register and the P17DDR register decrement count value with f8 as the count source. The
NDDR register and the P17DDR register indicate count time. Count value is reloaded if a falling edge or
a rising edge is applied to the pin.
The NDDR register and the P17DDR register can be set 0016 to FF16 when using the digital debounce
function. Setting to FF16 disables the digital filter. See Figure 16.6.2 for details.
Rev. 2.00 Feb.15, 2007 page 217 of 329
REJ09B0202-0200