mc68hc908jw32 Freescale Semiconductor, Inc, mc68hc908jw32 Datasheet - Page 173

no-image

mc68hc908jw32

Manufacturer Part Number
mc68hc908jw32
Description
M68hc08 Microcontrollers Microcontroller
Manufacturer
Freescale Semiconductor, Inc
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
mc68hc908jw32FAE
Manufacturer:
FREESCALE
Quantity:
20 000
13.4.2 Data Direction Register C
Data direction register C determines whether each port C pin is an input or an output. Writing a logic 1 to
a DDRC bit enables the output buffer for the corresponding port C pin; a logic 0 disables the output buffer.
DDRC[3:0] — Data Direction Register C Bits
Figure 13-10
When bit DDRCx is a logic 1, reading address $0002 reads the PTCx data latch. When bit DDRCx is a
logic 0, reading address $0002 reads the voltage level on the pin. The data latch can always be written,
regardless of the state of its data direction bit.
Freescale Semiconductor
These read/write bits control port C data direction. Reset clears DDRC[3:0], configuring all port C pins
as inputs.
1 = Corresponding port C pin configured as output
0 = Corresponding port C pin configured as input
1. X = don’t care
2. Hi-Z = high impedance
3. Writing affects data register, but does not affect input.
DDRC
shows the port C I/O logic.
Address:
Bit
Avoid glitches on port C pins by writing to the port C data register before
changing data direction register C bits from 0 to 3.
0
1
Reset:
Read:
Write:
READ DDRC ($0007)
WRITE DDRC ($0007)
WRITE PTC ($0002)
READ PTC ($0002)
$0006
Bit 7
PTC Bit
0
X
X
(1)
Figure 13-9. Data Direction Register C (DDRC)
= Unimplemented
6
0
Table 13-5. Port C Pin Functions
RESET
I/O Pin Mode
Figure 13-10. Port C I/O Circuit
Input, Hi-Z
MC68HC908JW32 Data Sheet, Rev. 5
Output
5
0
(2)
Table 13-5
NOTE
DDRCx
PTCx
Accesses to DDRC
4
0
Read/Write
DDRC[3:0]
DDRC[3:0]
summarizes the operation of the port C pins.
DDRC3
3
0
DDRC2
2
0
PTC[3:0]
Read
Pin
Accesses to PTC
DDRC1
1
0
PTC[3:0]
PTC[3:0]
DDRC0
Write
Bit 0
PTCx
0
(3)
Port C
173

Related parts for mc68hc908jw32