English
Language : 

MC68HC908RK2 Datasheet, PDF (100/158 Pages) Motorola, Inc – Microcontroller Unit
Input/Output (I/O) Ports
9.3.1 Port B Data Register
The port B data register (PTB) contains a data latch for each of the six port B pins.
Address: $0001
Bit 7
6
5
4
3
2
1
Bit 0
Read:
Write:
PTB5
PTB4
PTB3
PTB2
PTB1
PTB0
Reset:
Unaffected by reset
Alternate
Functions:
TCH1
TCLK
TCH0
MCLK
= Unimplemented
Figure 9-5. Port B Data Register (PTB)
PTB[5: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.
TCH1 — Timer Channel I/O Bit
The PTB4/TCH1 pin is the TIM channel 1input capture/output compare pin. The edge/level select bits,
ELS1B:ELS1A, determine whether the PTB4/TCH1 pin is a timer channel I/O or a general-purpose I/O
pin. See Chapter 11 Timer Interface Module (TIM).
TCH0 — Timer Channel I/O Bit
The PTB2/TCH0 pin is the TIM channel 0 input capture/output compare pin. The edge/level select bits,
ELS0B:ELS0A, determine whether the PTB2/TCH0 pin is a timer channel I/O or a general-purpose I/O
pin. See Chapter 11 Timer Interface Module (TIM).
TCLK — Timer Clock
The PTB3/TCLK pin is the external clock input for TIM. The prescaler select bits, PS[2:0], select
PTB3/TCLK as the TIM clock input. (See 11.8.1 TIM Status and Control Register.) When not selected
as the TIM clock, PTB3/TCLK is available for general-purpose I/O.
MCLK — Bus Clock
The bus clock (MCLK) is driven out of pin PTB0/MCLK when enabled by the MCLKEN bit in port B data
direction register bit 7.
9.3.2 Data Direction Register B
Data direction register B (DDRB) determines whether each port B pin is an input or an output. Writing a 1
to a DDRB bit enables the output buffer for the corresponding port B pin; a 0 disables the output buffer.
Address: $0005
Bit 7
6
Read:
0
MCLKEN
Write:
5
DDRB5
4
DDRB4
3
DDRB3
2
DDRB2
1
DDRB1
Reset: 0
0
0
0
0
0
0
= Unimplemented
Figure 9-6. Data Direction Register B (DDRB)
Bit 0
DDRB0
0
MC68HC908RK2 Data Sheet, Rev. 5.1
100
Freescale Semiconductor