MC68HC05L28B MOTOROLA [Motorola, Inc], MC68HC05L28B Datasheet - Page 45

no-image

MC68HC05L28B

Manufacturer Part Number
MC68HC05L28B
Description
Flexible general-purpose microcomputer
Manufacturer
MOTOROLA [Motorola, Inc]
Datasheet
In single chip mode, the MC68HC05L28 has a total of 22 I/O lines, arranged as two 8-bit ports (A
and B) and one 6-bit port (D). Each I/O line is individually programmable as either input or output,
under the software control of the data direction registers. Port D shares various I/O configurations
with the timer and I
To avoid glitches on the output pins, data should be written to the I/O port data register before
writing ones to the corresponding data direction register bits to set the pins to output mode.
4.1
The bidirectional port lines may be programmed as inputs or outputs under software control. The
direction of each pin is normally determined by the state of the corresponding bit in the port data
direction register (DDR). Each port has an associated DDR. Any standard I/O port pin is
configured as an output if its corresponding DDR bit is set to a logic one. A pin is configured as an
input if its corresponding DDR bit is cleared.
At power-on or reset, all DDRs are cleared, configuring all port pins as inputs. The data direction
registers can be written to or read by the MCU. 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. The operation of
the standard port hardware is shown schematically in Figure 4-1.
This is summarized in Table 4-1, which shows the effect of reading from or writing to an I/O pin in
various circumstances. Note that the read/write signal shown is internal and not available to the
user.
MC68HC05L28
Input/output programming
R/W
0
0
1
1
DDRn
2
0
1
0
1
C subsystems.
INPUT/OUTPUT PORTS
The I/O pin is in input mode. Data is written into the output data latch.
Data is written into the output data latch, and output to the I/O pin.
The state of the I/O pin is read.
The I/O pin is in output mode. The output data latch is read.
INPUT/OUTPUT PORTS
Table 4-1 I/O pin states
Action of MCU write to/read of data bit
4
MOTOROLA
TPG
4-1
4

Related parts for MC68HC05L28B