Skip to main content
Knowledgebase
Home
Renesas Singapore - Knowledgebase

Why the value from a port set to output doesn't match with the pin level?

Latest Updated:07/20/2006

Question:

(I/O Port, Pin)  The value I read from a port set to output doesn't match with the pin level. How come ? [2006/07/20]

Answer:

When reading a port which is set to output, the port latch value will be read instead of the pin level. In addition, some ports read the output of peripheral functions. (Please refer to the Port Block Diagram in your MCU's datasheet for applicable ports.)
For the above reasons, the read value may not match with the pin level.

*About port reading and writing

Ports set to input
Read: Read the pin level
Write: Write to the port latch

Ports set to output
Read: Read the port latch or the output of the peripheral functions
Write: Write to the port latch (port latch data is output from pin)

(#106037)

Suitable Products
3803H
3803L
3823
3850A
3858
38D2
38D5
7544
7545
7546
7547
7548
7549