跳至主要內容
Knowledgebase
Home
Renesas Electronics Taiwan - Knowledgebase

Can you explain more about handling of unused pins and its reason?

Latest Updated:03/04/2009

Question:

Please tell me more about the handling of unused pins and the reasons behind it.

Answer:

The handling of unused CMOS 3 state I/O ports is explained below.

(1) Example of Process Type 1

Set ports to input mode and connect Vcc or Vss to each pin through 1k-ohm to 10k-ohm resistor.

[Reason]

When a port is set to input mode, both "H" and "L"of the output transistor are turned off, and the port is in a floating state.
To prevent through current from flowing to the pin when middle potential is applied in this state, connect the pin to Vcc or Vss.
Since both output transistors are off even if the pin is connected to Vcc and Vss, current will not flow.

Moreover, although a resistor is not required when only input is considered, when a direction register is reversed and an output transistor is turned on due to noise or program run-away, current flows to the MCU from Vcc or from the MCU to Vss. A resistor is required to prevent port destruction and operation malfunction due to the flow of especially large current.

In addition, overwriting the direction register periodically (refresh) is recommended to prevent the direction register from reversing due to noise or program run-away.

 

(2) Example of Process Type 2: port with built-in pull-up resistor

If a port that has a built-in resistor, it can be used instead of connecting an external resistor.
Set a port to input mode and select "pull-up resistor is available".

[Reason]

When a port is set to input mode, both "H" and "L" of the output transistor are turned off, and the port is in a floating state.
To prevent through current from flowing to the pin when middle potential is applied in this state, connect the pin to Vcc or Vss.
Since both output transistors are off even if the pin is connected to Vcc and Vss, current will not flow.

Moreover, although a resistor is not required when only input is considered, when a direction register is reversed and an output transistor is turned on due to noise or program run-away, current flows to the MCU from Vcc or from the MCU to Vss. A resistor is required to prevent port destruction and operation malfunction due to the flow of especially large current.

If the built-in pull-up resistor is turned on, it will produce the same results as if the pin were connected to Vcc through an externally connected resistor.
However, the voltage level may become unstable and power supply current may increase until the pull-up resistor is selected.
We recommend selecting "pull-up resistor is available" as early as possible after reset.
In addition, overwriting the direction register periodically (refresh) is recommended to prevent the direction register from reversing due to noise or program run-away.

(3) Example of Process Type 3

Set a port to output mode and set to open.

[Reason]

When a port is set to output mode, based on the contents of a port latch, one of the output transistors is turned on and "H" or "L" is output from the pin.
At this time, since the input side is in the off state, current does not flow.

In addition, the voltage level may become unstable and the power supply current may increase until an output is selected by the direction register.
We recommend setting the direction register to "1" as early as possible after reset.
In addition, overwriting the direction register periodically (refresh) is recommended to prevent the direction register from reversing due to noise or program run-away.

 

Note:
The following groups of the R8C Family have a protection function to protect the PD0 register. This function uses the PD0 register write enable bit (PRC2) in the protect register (PRCR) to protect the PD0 register from being easily overwritten if a program runs out of control. When using the following groups, it is recommended to allocate important functions to port P0 as much as possible.

R8C/33A, R8C/34E, R8C/34F, R8C/34G, R8C/34H, R8C/35A,
R8C/36E, R8C/36F, R8C/36G, R8C/36H, R8C/38E, R8C/38F, R8C/38G, R8C/38H,
R8C/20, R8C/21, R8C/22, R8C/23, R8C/24, R8C/25, R8C/26, R8C/27,
R8C/2A, R8C/2B, R8C/2C, R8C/2D, R8C/2E, R8C/2F, R8C/2G, R8C/2K, R8C/2L,
R8C/10, R8C/11, R8C/12, R8C/13

Suitable Products
R8C/1x
R8C/2x
R8C/3x
R8C/Lx
R8C/Mx