English
Language : 

MC68HC908MR8 Datasheet, PDF (286/372 Pages) Motorola, Inc – Microcontrollers
Input/Output (I/O) Ports
14.5 Port C
Technical Data
286
READ DDRB ($0005)
WRITE DDRB ($0005)
RESET
WRITE PTB ($0001)
READ PTB ($0001)
DDRBx
PTBx
PTBx
Figure 14-7. 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 14-2 summarizes
the operation of the port B pins.
Table 14-2. Port B Pin Functions
DDRB
Bit
PTB
Bit
I/O Pin Mode
Accesses
to DDRB
Read/Write
0
X(1)
Input, Hi-Z(2)
DDRB[6:0]
1
X
Output
DDRB[6:0]
1. X = don’t care
2. Hi-Z = high impedance
3. Writing affects data register, but does not affect input.
Accesses to PTB
Read
Write
Pin
PTB[6:0](3)
PTB[6:0] PTB[6:0]
Port C is a 2-bit special-purpose I/O port sharing its pins with the pulse
width modulator for motor control module (PMC) FAULT input pins.
These two pins mirror the state of FAULT1 and FAULT4 pins. Level
changes on these input pins will be interpreted as fault conditions.
The port C data register contains a data latch for each of the two port
pins.
Input/Output (I/O) Ports
MC68HC908MR8 — Rev 4.1
Freescale Semiconductor