English
Language : 

MC68HC908JW32_09 Datasheet, PDF (172/232 Pages) Freescale Semiconductor, Inc – M68HC08 Microcontrollers
Input/Output (I/O) Ports
Table 13-2. Port A Pin Functions
DDRA
Bit
PTA Bit
I/O Pin Mode
Accesses to
DDRA
Read/Write
0
X(1)
Input, Hi-Z(2)
DDRA[7:0]
1
X
Output
DDRA[7:0]
1. X = don’t care
2. Hi-Z = high impedance
3. Writing affects data register, but does not affect input
Accesses to PTA
Read
Pin
PTA[7:0]
Write
PTA[7:0](3)
PTA[7:0]
13.3 Port B
Port B is a 8-bit general-purpose bidirectional I/O port; open-drain when configured as output.
13.3.1 Port B Data Register
The port B data register contains a data latch for each of the eight port B pins.
Address: $0001
Bit 7
Read:
PTB7
Write:
Reset:
Additional
Function:
LED drive
Additional Optional
Function: pullup
6
PTB6
LED drive
Optional
pullup
5
PTB5
LED drive
Optional
pullup
4
3
PTB4
PTB3
Unaffected by reset
LED drive LED drive
Optional Optional
pullup
pullup
2
PTB2
LED drive
Optional
pullup
1
PTB1
LED drive
Optional
pullup
Bit 0
PTB0
LED drive
Optional
pullup
Figure 13-5. Port B Data Register (PTB)
PTB[7:0] — Port B Data Bits
These read/write bits are software programmable. Data direction of each port B pin is under control of
the corresponding bit in data direction register B. Reset has no effect on port B data.
LED Drive — Direct LED Driver
The LED direct drive bit, LEDB[7:0], in the port option control register (POCR) controls the drive
options for PTB[7:0]. (See 13.7 Port Options.)
Pullup — Programmable Pullup
The Pullup control bit, PULL[7:0]EN, in the pullup control register (PULLCR) controls the optional
pullup for PTB[7:0]. (See 13.7 Port Options.)
13.3.2 Data Direction Register B
Data direction register B determines whether each port B pin is an input or an output. Writing a logic 1 to
a DDRB bit enables the output buffer for the corresponding port B pin; a logic 0 disables the output buffer.
MC68HC908JW32 Data Sheet, Rev. 6
172
Freescale Semiconductor