English
Language : 

MC9S08GT16A Datasheet, PDF (79/300 Pages) Freescale Semiconductor, Inc – Microcontrollers
Chapter 6
Parallel Input/Output
6.1 Introduction
This section explains software controls related to parallel input/output (I/O). The MC9S08GT16A/GT8A
has six I/O ports which include a total of up to 39 general-purpose I/O pins (one pin, PTG0, is output only).
See Chapter 2, “Pins and Connections,” for more information about the logic and hardware aspects of these
pins.
Many of these pins are shared with on-chip peripherals such as timer systems, external interrupts, or
keyboard interrupts. When these other modules are not controlling the port pins, they revert to
general-purpose I/O control. For each I/O pin, a port data bit provides access to input (read) and output
(write) data, a data direction bit controls the direction of the pin, and a pullup enable bit enables an internal
pullup device (provided the pin is configured as an input), and a slew rate control bit controls the rise and
fall times of the pins.
Pins that are not used in the application must be terminated. This prevents excess current caused by floating
inputs and enhances immunity during noise or transient events. Termination methods include:
• Configuring unused pins as outputs driving high or low
• Configuring unused pins as inputs and using internal or external pullups
Never connect unused pins to VDD or VSS.
NOTE
Not all general-purpose I/O pins are available on all packages. To avoid
extra current drain from floating input pins, the user’s reset initialization
routine in the application program should either enable on-chip pullup
devices or change the direction of unconnected pins to outputs so the pins
do not float.
6.1.1 Features
Parallel I/O features, depending on package choice, include:
• A total of 39 general-purpose I/O pins in six ports (PTG0 is output only)
• High-current drivers on port C pins
• Hysteresis input buffers
• Software-controlled pullups on each input pin
• Software-controlled slew rate output buffers
• Eight port A pins shared with KBI
MC9S08GT16A/GT8A Data Sheet, Rev. 1
Freescale Semiconductor
79