English
Language : 

MC68HC705MC4 Datasheet, PDF (42/99 Pages) Motorola, Inc – Microcontrollers 
MC68HC705MC4 Specification Rev. 1.5
SECTION 6
INPUT/OUTPUT PORTS
In the User Mode, there are 20 bidirectional I/O lines arranged as two 8-bit I/O ports (Ports
A and C), one 4-bit I/O port (Port B), and one 2-bit Input port (Port D). These ports are
programmable as either inputs or outputs, except Port D7, under software control of the
data direction registers (DDRs).
6.1 PORT A
Port A is an 8-bit bidirectional port that shares PA1-PA6 with the PWM subsystem. (See
Figure 6-1: Port A I/O Circuitry.) The Port A data register is located at address $0000
and its Data Direction Register (DDR) is located at address $0004. Reset does not affect
the data registers, but clears the DDRs, thereby setting all of the port pins to input mode.
Writing a one to a DDR bit sets the corresponding port pin to output mode. PA1-PA6 may
be used for general I/O applications when the PWM subsystem is disabled. PA0-7 feature
larger P-channel output devices and are capable of sourcing more current than a standard
port (refer to SECTION 12: ELECTRICAL SPECIFICATIONS).
Read $0004
Write $0004
Write $0000
Reset
(RST)
Data Direction
Register Bit
Data
Register Bit
I/O
Output
Pin
Read $0000
Internal HC05
Data Bus
Figure 6-1: Port A I/O Circuitry
6.1.1 MCU LINE INTERFACE RECOMMENDATIONS
It is expected that some applications appropriate to the MC68HC705MC4 will be required
to determine the presence of line (mains) voltage using the MCU. A low-cost MCU line
interface is shown in Figure 6-2: Line Interface Circuitry. PA7 has been intentionally
located between VDD and VSS to provide a lowest possible impedance path for the injected
currents in particular fast transients. Although any I/O port will function in this manner, it
is recommended that only PA7 be used for such an interface. The positive and negative
excursions of the input voltage relative to the neutral return are clamped between VSS and
VDD using the internal parasitic input diodes. The series resistor limits the injected currents
to the specified value. (Refer to SECTION 12 ELECTRICAL SPECIFICATIONS.) The
resistor value must be calculated based upon maximum expected transient voltage levels
Section 6: Input/Output Ports
MOTOROLA
Page 33