Datasheet

Port G
MC68HC908AZ60A • MC68HC908AS60A • MC68HC908AS60E Data Sheet, Rev. 6
Freescale Semiconductor 263
22.8 Port G
Port G is a 3-bit special function port that shares all of its pins with the keyboard interrupt module (KBD).
Note that Port G is only available on 64-pin package options.
22.8.1 Port G Data Register
The port G data register contains a data latch for each of the three port G pins.
PTG[2:0] — Port G Data Bits
These read/write bits are software programmable. Data direction of each port G pin is under the control
of the corresponding bit in data direction register G. Reset has no effect on PTG[2:0].
KBD[2:0] — Keyboard Wakeup pins
The keyboard interrupt enable bits, KBIE[2:0], in the keyboard interrupt control register, enable the port
G pins as external interrupt pins (See Chapter 24 Keyboard Module (KBI)). Enabling an external
interrupt pin will override the corresponding DDRGx.
22.8.2 Data Direction Register G
Data direction register G determines whether each port G pin is an input or an output. Writing a logic 1 to
a DDRG bit enables the output buffer for the corresponding port G pin; a logic 0 disables the output buffer.
Address: $000A
Bit 7654321Bit 0
Read:00000
PTG2 PTG1 PTG0
Write:RRRRR
Reset: Unaffected by Reset
Alternative
Function:
KBD2 KBD1 KBD0
R= Reserved
Figure 22-20. Port G Data Register (PTG)
Address: $000E
Bit 7654321Bit 0
Read:00000
DDRG2 DDRG1 DDRG0
Write:RRRRR
Reset:00000000
R= Reserved
Figure 22-21. Data Direction Register G (DDRG)