EasyManua.ls Logo

Fujitsu 8FX

Fujitsu 8FX
650 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
MB95630H Series
84 FUJITSU SEMICONDUCTOR LIMITED MN702-00009-2v0-E
CHAPTER 6 I/O PORT
6.2 Configuration and Operations
Operations of I/O Port
Operation as an output port
A pin becomes an output port if the bit in the DDRx register corresponding to that pin is set
to "1".
For a pin shared with other peripheral functions, disable the output of such peripheral
functions.
When a pin is used as an output port, it outputs the value of the PDRx register to external
pins.
If data is written to the PDRx register, the value is stored in the output latch and is output to
the pin set as an output port as it is.
Reading the PDRx register returns the PDRx register value.
Operation as an input port
A pin becomes an input port if the bit in the DDRx register corresponding to that pin is set
to "0".
For a pin shared with other peripheral functions, disable the output of such peripheral
functions.
When using an analog input shared pin as an input port, set the corresponding bit in the A/D
input disable register (upper/lower) (AIDRH/AIDRL) to "1".
If data is written to the PDRx register, the value is stored in the output latch but is not
output to the pin set as an input port.
Reading the PDRx register returns the pin value. However, if the read-modify-write (RMW)
type of instruction is used to read the PDRx register, the PDRx register value is returned.
Operation as a peripheral function output pin
A pin becomes a peripheral function output pin if the peripheral output function is enabled
by setting the output enable bit of a peripheral function corresponding to that pin.
The pin value can be read from the PDRx register even if the peripheral function output is
enabled. Therefore, the output value of a peripheral function can be read by the read
operation on the PDRx register. However, if the read-modify-write (RMW) type of
instruction is used to read the PDRx register, the PDRx register value is returned.
Operation as a peripheral function input pin
To set a pin as an input port, set the bit in the DDRx register bit corresponding to the input
pin of a peripheral function to "0".
When using the analog input shared pin as another peripheral function input pin, configure
it as an input port, which is the same as the operation as an input port.
Reading the PDRx register returns the pin value, regardless of whether the peripheral
function uses that pin as its input pin. However, if the read-modify-write (RMW) type of
instruction is used to read the PDRx register, the PDRx register value is returned.

Table of Contents

Related product manuals