|
MC68HC908KX8 Datasheet, PDF (157/310 Pages) Motorola, Inc – Microcontrollers | |||
|
◁ |
Figure 10-8 shows the port B I/O logic.
Input/Output (I/O) Ports
Port B
READ DDRB ($0005)
WRITE DDRB ($0005)
RESET
WRITE PTB ($0001)
READ PTB ($0001)
DDRBx
PTBx
PTBx
Figure 10-8. Port B I/O Circuit
When bit DDRBx is a logic 1, reading address $0001 reads the PTBx
data latch. When bit DDRBx is a logic 0, reading address $0001 reads
the voltage level on the pin. The data latch can always be written,
regardless of the state of its data direction bit. Table 10-2 summarizes
the operation of the port B pins.
Table 10-2. Port B Pin Functions
DDRB PTB
Bit Bit
I/O Pin
Mode
Accesses
to DDRB
Read/Write
Accesses to PTB
Read
Write
0
X Input, Hi-Z DDRB7âDDRB0
Pin
PTB7âPTB0(1)
1
X
Output
DDRB7âDDRB0 PTB7âPTB0 PTB7âPTB0
X = Donât care
Hi-Z = High impedance
1. Writing affects data register, but does not affect input.
MC68HC908KX8 ⢠MC68HC908KX2 ⢠MC68HC08KX8 â Rev. 1.0
MOTOROLA
Input/Output (I/O) Ports
Technical Data
157
|
▷ |