English
Language : 

MC68HC908EY16 Datasheet, PDF (115/278 Pages) Motorola, Inc – Microcontrollers
Chapter 12
Input/Output (I/O) Ports (PORTS)
12.1 Introduction
Twenty-four bidirectional input/output (I/O) pins form five parallel ports. All I/O pins are programmable as
inputs or outputs.
NOTE
Connect any unused I/O pins to an appropriate logic level, either VDD or
VSS. Although the I/O ports do not require termination for proper operation,
termination reduces excess current consumption and the possibility of
electrostatic damage.
12.2 Port A
Port A is a 7-bit general-purpose bidirectional I/O port that shares pin functions with the serial peripheral
interface (SPI) and keyboard (KBD) modules.
12.2.1 Port A Data Register
The port A data register contains a data latch for each of the seven port A pins.
Address:
Read:
Write:
Reset:
Alternative Function:
$0000
Bit 7
0
6
PTA6
SS
5
PTA5
SPSCK
4
3
PTA4
PTA3
Unaffected by reset
KBD4
KBD3
2
PTA2
KBD2
1
PTA1
KBD1
Bit 0
PTA0
KBD0
= Unimplemented
Figure 12-1. Port A Data Register (PTA)
PTA[6:0] — Port A Data Bits
These read/write bits are software programmable. Data direction of each port A pin is under the control
of the corresponding bit in data direction register A. Reset has no effect on port A data.
12.2.2 Data Direction Register A
Data direction register A determines whether each port A pin is an input or an output. Writing a 1 to a
DDRA bit enables the output buffer for the corresponding port A pin; a 0 disables the output buffer.
MC68HC908EY16 • MC68HC908EY8 Data Sheet, Rev. 10
Freescale Semiconductor
115