English
Language : 

MC68HC05B4 Datasheet, PDF (57/298 Pages) Motorola, Inc – High-density Complementary Metal Oxide Semiconductor (HCMOS) Microcomputer Unit
4.5.3 Port data register D (PORTD)
Port D data (PORTD)
Address bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
State
on reset
$0003 PD7 PD6 PD5 PD4 PD3 PD2 PD1 PD0 Undefined
All the port D bits are input-only and are shared with the A/D converter. The function of each bit is
determined by the ADON bit in the A/D status/control register.
The state of the port data registers following reset is not defined.
4
4.5.3.1 A/D status/control register
A/D status/control
Address bit 7 bit 6 bit 5
$0009 COCO ADRC ADON
bit 4
bit 3
bit 2
bit 1
bit 0
State
on reset
0 CH3 CH2 CH1 CH0 0000 0000
ADON — A/D converter on
1 (set) – A/D converter is switched on; all port D pins act as analog inputs for
the A/D converter.
0 (clear) – A/D converter is switched off; all port D pins act as input only pins.
Reset clears the ADON bit, thus configuring port D as an input only port.
4.5.4 Data direction registers (DDRA, DDRB and DDRC)
Port A data direction (DDRA)
Port B data direction (DDRB)
Port C data direction (DDRC)
Address bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
State
on reset
$0004
0000 0000
$0005
0000 0000
$0006
0000 0000
Writing a ‘1’ to any bit configures the corresponding port pin as an output; conversely, writing any
bit to ‘0’ configures the corresponding port pin as an input.
Reset clears these registers, thus configuring all ports as inputs.
MC68HC05B6
Rev. 4
INPUT/OUTPUT PORTS
TPG
MOTOROLA
4-5