MC68HC908GT16_07 FREESCALE [Freescale Semiconductor, Inc], MC68HC908GT16_07 Datasheet - Page 126

no-image

MC68HC908GT16_07

Manufacturer Part Number
MC68HC908GT16_07
Description
Microcontrollers
Manufacturer
FREESCALE [Freescale Semiconductor, Inc]
Datasheet
Input/Output (I/O) Ports (PORTS)
12.2 Port A
Port A is an 8-bit special-function port that shares all eight of its pins with the keyboard interrupt (KBI)
module. Port A also has software configurable pullup devices if configured as an input port.
12.2.1 Port A Data Register
The port A data register (PTA) contains a data latch for each of the eight port A pins.
PTA7–PTA0 — Port A Data Bits
KBD7–KBD0 — Keyboard Inputs
12.2.2 Data Direction Register A
Data direction register A (DDRA) 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.
DDRA7–DDRA0 — Data Direction Register A Bits
126
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.
The keyboard interrupt enable bits, KBIE7–KBIE0, in the keyboard interrupt control register (KBICR)
enable the port A pins as external interrupt pins. See
These read/write bits control port A data direction. Reset clears DDRA7–DDRA0, configuring all port
A pins as inputs.
1 = Corresponding port A pin configured as output
0 = Corresponding port A pin configured as input
Alternative
Function:
Address:
Address:
Avoid glitches on port A pins by writing to the port A data register before
changing data direction register A bits from 0 to 1.
Reset:
Reset:
Read:
Read:
Write:
Write:
MC68HC908GT16 • MC68HC908GT8 • MC68HC08GT16 Data Sheet, Rev. 5.0
DDRA7
$0000
$0004
KBD7
PTA7
Bit 7
Bit 7
0
Figure 12-3. Data Direction Register A (DDRA)
Figure 12-2. Port A Data Register (PTA)
DDRA6
PTA6
KBD6
6
6
0
DDRA5
PTA5
KBD5
5
5
0
NOTE
DDRA4
Unaffected by reset
PTA4
KBD4
4
4
0
Chapter 9 Keyboard Interrupt Module (KBI).
DDRA3
KBD3
PTA3
3
3
0
DDRA2
KBD2
PTA2
2
2
0
DDRA1
KBD1
PTA1
1
1
0
Freescale Semiconductor
DDRA0
KBD0
PTA0
Bit 0
Bit 0
0

Related parts for MC68HC908GT16_07