Datasheet

MC68HC908KX8 • MC68HC908KX2 • MC68HC08KX8 Data Sheet, Rev. 2.1
Freescale Semiconductor 105
Chapter 11
Input/Output (I/O) Ports (PORTS)
11.1 Introduction
Thirteen bidirectional input/output (I/O) pins form two parallel ports in the 16-pin plastic dual in-line
package (PDIP) and small outline integrated circuit (SOIC) package in the MC68HC908KX8 part. All I/O
pins are programmable as inputs or outputs. Port A has software selectable pullup resistors if the port is
used as a general-function input port.
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.
See Figure 11-1 for a summary of the I/O port registers.
Addr.Register Name Bit 7654321Bit 0
$0000
Port A Data Register
(PTA)
See page 106.
Read: 0 0 0
PTA4 PTA3 PTA2 PTA1 PTA0
Write:
Reset: Unaffected by reset
$0001
Port B Data Register
(PTB)
See page 108.
Read:
PTB7 PTB6 PTB5 PTB4 PTB3 PTB2 PTB1 PTB0
Write:
Reset: Unaffected by reset
$0004
Data Direction Register A
(DDRA)
See page 106.
Read: 0 0 0
DDRA4 DDRA3 DDRA2 DDRA1 DDRA0
Write:
Reset:00000000
$0005
Data Direction Register B
(DDRB)
See page 109.
Read:
DDRB7 DDRB6 DDRB5 DDRB4 DDRB3 DDRB2 DDRB1 DDRB0
Write:
Reset:00000000
$000D
Port A Input Pullup Enable
Register (PTAPUE)
See page 108.
Read: 0 0 0
PTAPUE4 PTAPUE3 PTAPUE2 PTAPUE1 PTAPUE0
Write:
Reset:00000000
= Unimplemented
Figure 11-1. I/O Port Register Summary