mc68hc908qf4 Freescale Semiconductor, Inc, mc68hc908qf4 Datasheet - Page 115

no-image

mc68hc908qf4

Manufacturer Part Number
mc68hc908qf4
Description
M68hc08 Microcontrollers Microcontroller
Manufacturer
Freescale Semiconductor, Inc
Datasheet
13.3 Port B
13.3.1 Port B Data Register
13.3.2 Data Direction Register B
MC68HC908QF4 — Rev. 1.0
MOTOROLA
NOTE:
Port B is an 8-bit general purpose I/O port.
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
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.
DDRB[7:0] — Data Direction Register B Bits
Avoid glitches on port B pins by writing to the port B data register before changing
data direction register B bits from 0 to 1.
Address: $0001
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.
These read/write bits control port B data direction. Reset clears DDRB[7:0],
configuring all port B pins as inputs.
Address: $0005
Reset:
Read:
Write:
Reset:
Read:
Write:
1 = Corresponding port B pin configured as output
0 = Corresponding port B pin configured as input
Freescale Semiconductor, Inc.
For More Information On This Product,
PTB7
DDRB7
Bit 7
Bit 7
0
Figure 13-7. Data Direction Register B (DDRB)
Go to: www.freescale.com
Figure 13-6. Port B Data Register (PTB)
Input/Output (I/O) Ports
PTB6
DDRB6
6
6
0
PTB5
DDRB5
5
5
0
Unaffected by reset
PTB4
DDRB4
4
Figure 13-8
4
0
PTB3
DDRB3
3
3
0
shows the port B I/O logic.
PTB2
DDRB2
2
2
0
Input/Output (I/O) Ports
PTB1
DDRB1
1
1
0
Data Sheet
PTB0
DDRB0
Bit 0
Bit 0
Port B
0
115

Related parts for mc68hc908qf4