
MC68HC908QL4 MC68HC908QL3 MC68HC908QL2 Data Sheet, Rev. 4
Freescale Semiconductor
111
Chapter 12
Input/Output Ports (PORTS)
12.1 Introduction
The MC68HC908QL4 has thirteen bidirectional input-output (I/O) pins and one input only pin. All I/O pins
are programmable as inputs or outputs.
NOTE
Connect any unused I/O pins to an appropriate logic level, either V
DD
or V
SS
.
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 an 6-bit special function port that shares its pins with the keyboard interrupt (KBI) module (see
Chapter 9 Keyboard Interrupt Module (KBI)
, the 2-channel timer interface module (TIM) (see
Chapter 15
Timer Interface Module (TIM)
), the 10-bit ADC (see
Chapter 3 Analog-to-Digital Converter (ADC10)
Module
), the external interrupt (IRQ) pin (see
Chapter 8 External Interrupt (IRQ)
), the reset (RST) pin
enabled using a configuration register (see
Chapter 5 Configuration Register (CONFIG)
) and the
oscillator pins (see
Chapter 11 Oscillator Module (OSC)
).
Each port A pin also has a software configurable pullup/down device if the corresponding port pin is
configured as an input port.
NOTE
PTA2 is input only.
When the IRQ function is enabled in the configuration register 2
(CONFIG2), bit 2 of the port A data register (PTA) will always read a logic 0.
In this case, the BIH and BIL instructions can be used to read the logic level
on the PTA2 pin. When the IRQ function is disabled, these instructions will
behave as if the PTA2 pin is a logic 1. However, reading bit 2 of PTA will
read the actual logic level on the pin.