MCMC68HC05L16 Freescale Semiconductor, Inc, MCMC68HC05L16 Datasheet - Page 52

no-image

MCMC68HC05L16

Manufacturer Part Number
MCMC68HC05L16
Description
M68hc05 Microcontrollers
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Parallel Input/Output (I/O)
6.2 Port A
Port A is an 8-bit, bidirectional, general-purpose port. The data direction of a port A pin is determined by
its corresponding DDRA bit.
When a port A pin is programmed as an output by the corresponding DDRA bit, data in the PORTA data
register becomes output data to the pin. This data is returned when the PORTA register is read.
Open drain or CMOS outputs are selected by AWOMH and AWOML bits in the WOM1 register. If the
AWOMH bit is set, the P-channel drivers of bits 7–4 output buffers are disabled (open drain). If the
AWOML bit is set, the P-channel drivers of bits 3–0 output buffers are disabled (open drain).
When a bit is programmed as input by the corresponding DDRA bit, the pin level is read by the CPU.
Port A has optional pullup resistors. When the RAH bit or RAL bit in the RCR1 is set, pullup resistors are
attached to the upper four bits or lower four bits of port A pins, respectively. When a pin outputs a low
level, the pullup resistor is disconnected regardless of the RAH or RAL bit state.
6.2.1 Port A Data Register
Read
Write
Reset
6.2.2 Port A Data Direction Register
Read
Write
Reset
52
Anytime; returns pin level if DDR set to input; returns output data latch if DDR set to output
Anytime; data stored in an internal latch; drives pin only if DDR set for output
Becomes high-impedance input
Anytime when OPTM = 1
Anytime when OPTM = 1
Cleared to $00; all general-purpose I/O configured for input
Address:
Address:
Reset:
Reset:
Read:
Read:
Write:
Write:
Option Map — $0000
DDRA7
$0000
Bit 7
PA7
Bit 7
0
Figure 6-3. Port A Data Direction Register (DDRA)
MC68HC05L16 • MC68HC705L16 Data Sheet, Rev. 4.1
Figure 6-2. Port A Data Register (PORTA)
DDRA6
PA6
6
6
0
DDRA5
PA5
5
5
0
DDRA4
Unaffected by reset
PA4
4
4
0
DDRA3
PA3
3
3
0
DDRA2
PA2
2
2
0
DDRA1
PA1
1
1
0
Freescale Semiconductor
DDRA0
Bit 0
Bit 0
PA0
0

Related parts for MCMC68HC05L16