mc68hc05x4dw Freescale Semiconductor, Inc, mc68hc05x4dw Datasheet - Page 64

no-image

mc68hc05x4dw

Manufacturer Part Number
mc68hc05x4dw
Description
Xc68hc705x4 Microcontroller
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Input/output programming
Port A
Parallel input/output ports
MC68HC05X4 Rev 1.0
Data direction
Latched data
register bit
register bit
Bi-directional port lines may be programmed as inputs or outputs under
software control. The direction of each pin is determined by the state of
the corresponding bit in the port data direction register (DDR). Each port
has an associated DDR. Any I/O port pin is configured as an output if its
corresponding DDR bit is set. A pin is configured as an input if its
corresponding DDR bit is cleared.
At power-on or reset, all DDRs are cleared, thus configuring all port pins
as inputs. The data direction registers can be written to or read by the
processor. During the programmed output state, a read of the data
register actually reads the value of the output data latch and not the I/O
pin. Refer to
Port A is an 8-bit bi-directional port. The port A data register is at $0000
and the data direction register (DDR) is at $0004. Reset does not affect
the data register, but clears the data direction register, thereby returning
the ports to inputs. Writing a ‘1’ to a DDR bit sets the corresponding port
pin to output mode.
Freescale Semiconductor, Inc.
buffer
data
O/P
Figure 1. Standard I/O port structure
For More Information On This Product,
DDRn
DATA
Go to: www.freescale.com
Figure 1
Parallel input/output ports
buffer
Input
Output
buffer
and
Table
1.
Pin
I/O
Output
Input
DDRn
1
1
0
0
DATA
0
1
0
1
I/O pin
tristate
tristate
0
1
2-ports

Related parts for mc68hc05x4dw