■ Reading the Port Data Register
When a Port Data register is read, the value depends on the corresponding bit in the Data Direction Register
and on the current status of the resource that is connected to the same pin (if applicable).
The following cases are possible:
DDR value
Resource
0 (input)
enabled
1 (output)
enabled
0 (input)
disabled
1 (output)
disabled
CHAPTER 10 I/O PORTS
Read value
Resource value
Resource value
Pin value
PDR value
173