Fujitsu MB91191 Manual Do Utilizador

Página de 348
119
5.2
Port 0
Port 0 is the input/output port, and is also used for servo input, capture input, and PWC 
input.
Functions of I/O Port 0
Each port has two registers per bit, namely the data direction register (DDR) and port data register (PDR),
and input/output can be set independently per bit. Pins whose DDR is "1" are set to Output, whereas Pins
whose DDR is "0" are set to Input. The PDR is undefined by a reset, and the DDR is cleared to "0" and set
to Input. The value written to the PDR is output to the pin at the time of output setup by specifying the
DDR per bit.
At this time, the contents of the PDR are read from the read value of the PDR.
At the time of the input setup, the pin will have high impedance status.
At this time, the pin level is read from the read value of the PDR.
Block Diagram of Port 0
Figure 5.2-1  Block Diagram of Port 0 
PDR
Pin
Periphreral input
P07 to P00
DDR
Data register read