Datasheet
Input/Output (I/O) Ports
Port B
MC68HC908QY4•MC68HC908QT4•MC68HC908QY2•MC68HC908QT2•MC68HC908QY1•MC68HC908QT1
MOTOROLA Input/Output (I/O) Ports 167
NON-DISCLOSURE AGREEMENT REQUIRED
12.4 Port B
Port B is an 8-bit general purpose I/O port. Port B is only available on the
MC68HC908QY1, MC68HC908QY2, and MC68HC908QY4.
12.4.1 Port B Data Register
The port B data register (PTB) contains a data latch for each of the eight
port B pins.
PTB[7:0] — Port B Data Bits
These read/write bits are software programmable. Data direction of
each port B pin is under the control of the corresponding bit in data
direction register B. Reset has no effect on port B data.
Table 12-1. Port A Pin Functions
PTAPUE
Bit
DDRA
Bit
PTA
Bit
I/O Pin
Mode
Accesses to DDRA Accesses to PTA
Read/Write Read Write
10
X
(1)
Input, V
DD
(2)
DDRA5–DDRA0 Pin
PTA5–PTA0
(3)
00X
Input, Hi-Z
(4)
DDRA5–DDRA0 Pin
PTA5–PTA0
(3)
X 1 X Output DDRA5–DDRA0 PTA5–PTA0
PTA5–PTA0
(5)
1. X = don’t care
2. I/O pin pulled to V
DD
by internal pullup.
3. Writing affects data register, but does not affect input.
4. Hi-Z = high impedance
5. Output does not apply to PTA2
Address: $0001
Bit 7654321Bit 0
Read:
PTB7 PTB6 PTB5 PTB4 PTB3 PTB2 PTB1 PTB0
Write:
Reset: Unaffected by reset
Figure 12-6. Port B Data Register (PTB)