MC68HC805P18 Product Overview
MC68HC805P18 Product Overview
R E Q U I R E D
HC05
Freescale Semiconductor, Inc...
A G R E E M E N T
MC68HC05P18
MC68HC805P18
Advance Information
N O N - D I S C L O S U R E
Advance Information
R E Q U I R E D
Freescale Semiconductor, Inc...
A G R E E M E N T
intended for surgical implant into the body, or other applications intended
to support or sustain life, or for any other application in which the failure
of the Motorola product could create a situation where personal injury or
death may occur. Should Buyer purchase or use Motorola products for
any such unintended or unauthorized application, Buyer shall indemnify
and hold Motorola and its officers, employees, subsidiaries, affiliates,
and distributors harmless against all claims, costs, damages, and
expenses, and reasonable attorney fees arising out of, directly or
indirectly, any claim of personal injury or death associated with such
unintended or unauthorized use, even if such claim alleges that Motorola
was negligent regarding the design or manufacture of the part.
2 MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
List of Sections
Table of Contents
Section 2. Memory
2.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27
Section 4. Interrupts
4.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
Section 5. Resets
5.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49
Section 8. EEPROM
8.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71
13.11 PD5 Clock Out Timing (PD5 CLKOUT Option Enabled) . . . .129
Appendix A. Emulation
A.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .137
List of Figures
List of Tables
1.1 Contents
1.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
Freescale Semiconductor, Inc...
1.2 Introduction
The Motorola MC68HC05P18 and MC68HC805P18 microcontrollers
(MCU) are members of the M68HC05 Family with:
• 4-channel, 8-bit analog-to-digital (A/D) converter
• 16-bit timer with output compare and input capture
• Serial input/output port (SIOP)
• Computer operating properly (COP) watchdog timer
• 21 input/output (I/O) pins (20 bidirectional, one input-only)
1.3 Features
Features include:
• Low-cost M68HC05 core running at 2-MHz bus speed
• 28-pin dual in-line package (DIP) or small outline (SOIC) package
• 4-MHz on-chip crystal/ceramic resonator oscillator
• MC68HC05P18:
– 8064 bytes of user read-only memory (ROM)
Freescale Semiconductor, Inc...
A/ D CONVERTER
INDEX REGISTER
MUX
Freescale Semiconductor, Inc...
PORT C
PC4/AD2
PROGRAM COUNTER
PC3/AD3
COND CODE REG 1 1 1H I NZC PC2
PC1
PC0
SRAM — 192 BYTES
PA7
PORT A
PA4
USER EEPROM — 8064 BYTES
PA3
PA2
EEPROM — 128 BYTES
PA1
PA0
PB5/SDO PORT B AND
VDD
SIOP
PB6/SDI VSS
REGISTERS
PB7/SCK AND LOGIC
NOTE: A line over a signal name indicates an active low signal. For example,
RESET is active high and RESET is active low.
RESET 1 28 VDD
IRQ 2 27 OSC1
PA7 3 26 OSC2
PA6 4 25 PD7/TCAP
PA5 5 24 TCMP
PA4 6 23 PD5/CKOUT
PA3 7 22 PC0
PA2 8 21 PC1
PA1 9 20 PC2
PA0 10 19 PC3/AD3
SDO/PB5 11 18 PC4/AD2
Freescale Semiconductor, Inc...
SDI/PB6 12 17 PC5/AD1
SCK/PB7 13 16 PC6/AD0
VSS 14 15 PC7/VREFH
Power is supplied to the MCU through VDD and VSS. VDD is connected
to a regulated positive supply and VSS is connected to ground.
Very fast signal transitions occur on the MCU pins. The short rise and
fall times place very high short-duration current demands on the power
supply. To prevent noise problems, take special care to provide good
power supply bypassing at the MCU. Use bypass capacitors with good
high-frequency characteristics and position them as close to the MCU as
possible. Bypassing requirements vary, depending on how heavily the
MCU pins are loaded.
The OSC1 and OSC2 pins are the control connections for the on-chip
oscillator. The OSC1 and OSC2 pins can accept:
1.5.3 Crystal
NOTE: Mount the crystal and components as close as possible to the pins for
startup stabilization and to minimize output distortion.
4.7 MΩ
UNCONNECTED
EXTERNAL CLOCK
Freescale Semiconductor, Inc...
37 pF 37 pF
(a) (b)
Crystal or Ceramic External Clock Source
Resonator Connections Connections
Driving this input low will reset the MCU to a known startup state. As an
output, the RESET pin indicates that an internal MCU reset has
occurred. The RESET pin contains an internal Schmitt trigger to improve
its noise immunity. Refer to Section 5. Resets.
These eight I/O pins comprise port A. The state of any pin is software
programmable and all port A lines are configured as inputs during
power-on or reset. For the MC68HC05P18, eight mask options can be
chosen to enable pullups and interrupts (active low) on the port A pins.
For the MC68HC805P18, the pullups and interrupt options (active low)
on the port A pins can be individually programmed in the mask option
register 2 (MOR2).
These three I/O pins comprise port B and are shared with the SIOP
communications subsystem. The state of any pin is software
programmable and all port B lines are configured as inputs during
power-on or reset. For further information, refer to Section 7.
Input/Output (I/O) Ports and Section 11. Serial Input/Output Port
(SIOP).
These eight I/O pins comprise port C and are shared with the A/D
converter subsystem. The state of any pin is software programmable
and all port C lines are configured as inputs during power-on or reset.
Port pins PC0 and PC1 are capable of sourcing and sinking high
currents. For further information, refer to Section 7. Input/Output (I/O)
Ports and Section 9. Analog-to-Digital (A/D) Converter.
These two I/O pins comprise port D, and one of them is shared with the
16-bit timer subsystem. Unless clock output has been selected, the state
of PD5/CKOUT is software programmable and is configured as an input
during power-on or reset. PD7 is always an input; it may be read at any
time, regardless of the mode of operation the 16-bit timer may be in. For
further information, refer to Section 7. Input/Output (I/O) Ports and
Section 10. 16-Bit Timer.
For the MC68HC805P18, the PD5/CKOUT pin can be turned into a clock
output pin by programming mask option register 1 (MOR1). The clock
output is a buffered OSC2 signal with a CMOS output driver.
1.5.9 TCMP
This pin is the output from the 16-bit timer’s output compare function. It
is low after reset. For further information, refer to Section 10. 16-Bit
Timer.
This input pin drives the asynchronous interrupt function of the MCU.
The MCU will complete the current instruction being executed before it
Freescale Semiconductor, Inc...
responds to the IRQ interrupt request. When IRQ is driven low, the event
is latched internally to signify an interrupt has been requested. When the
MCU completes its current instruction, the interrupt latch is tested. If the
interrupt latch is set and the interrupt mask bit (I bit) in the condition code
register is clear, the MCU will begin the interrupt sequence.
If the IRQ pin is not used, it must be tied to the VDD supply. The IRQ pin
contains an internal Schmitt trigger as part of its input circuitry to improve
noise immunity. For further information, refer to Section 4. Interrupts.
NOTE: For the MC68HC805P18, if the voltage level applied to the IRQ pin
exceeds VDD, it may affect the MCU’s mode of operation. See
Section 6. Operating Modes.
Section 2. Memory
2.1 Contents
2.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27
Freescale Semiconductor, Inc...
2.2 Introduction
The MC68HC05P18 and MC68HC805P18 both utilize 14 address lines
to access an internal memory space covering 16 Kbytes. This memory
space is divided into input/output (I/O), random-access memory (RAM),
electrically erasable, programmable read-only memory (EEPROM),
read-only memory (ROM), and boot ROM areas.
Figure 2-1 and Figure 2-2 show user mode memory maps for the
MC68HC05P18 and MC68HC805P18, respectively.
MOTOROLA Memory 27
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Memory
$0140 0272
EEPROM UNIMPLEMENTED $3FF1
$01BF 128 BYTES 0399 UNIMPLEMENTED $3FF2
$01C0 0400
UNIMPLEMENTED $3FF3
UNUSED
77,28 BYTES UNIMPLEMENTED $3FF4
28 Memory MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Memory
Input/Output and Control Registers
$0140 0320
EEPROM UNIMPLEMENTED $3FF1
$01BF 128 BYTES
0447 UNIMPLEMENTED $3FF2
$01C0 0448
UNIMPLEMENTED $3FF3
UNUSED
77,28 BYTES UNIMPLEMENTED $3FF4
MOTOROLA Memory 29
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Memory
30 Memory MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Memory
Input/Output and Control Registers
$0009 Unimplemented
Read: 0 0 0 0 0 0
SIOP Control Register SPE MSTR
$000A (SCR) Write:
See page 102.
Reset: 0 0 0 0 0 0 0 0
= Unimplemented R = Reserved U = Unaffected
MOTOROLA Memory 31
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Memory
$000E Unimplemented
$000F Unimplemented
$0010 Unimplemented
$0011 Reserved R R R R R R R R
Read: 0 0 0
Timer Control Register ICIE OCIE TOIE IEDG OLVL
$0012 (TCR) Write:
See page 94.
Reset: 0 0 0 0 0 0 0 0
Read: ICF OCF TOF 0 0 0 0 0
Timer Status Register
$0013 (TSR) Write:
See page 96.
Reset: U U U 0 0 0 0 0
Read: ICRH7 ICRH6 ICRH5 ICRH4 ICRH3 ICRH2 ICRH1 ICRH0
Input Capture MSB Register
$0014 (ICRH) Write:
See page 93.
Reset: Unaffected by reset
Read: ICRL7 ICRL6 ICRL5 ICRL4 ICRL3 ICRL2 ICRL1 ICRL0
Input Capture LSB Register
$0015 (ICRL) Write:
See page 93.
Reset: Unaffected by reset
Read: OCRH7 OCRH6 OCRH5 OCRH4 OCRH3 OCRH2 OCRH1 OCRH0
Output Compare MSB
$0016 Register (OCRH) Write:
See page 90.
Reset: Unaffected by reset
= Unimplemented R = Reserved U = Unaffected
32 Memory MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Memory
Input/Output and Control Registers
MOTOROLA Memory 33
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Memory
2.4 RAM
The user RAM consists of 192 bytes (including the stack) at locations
$0050–$010F. The stack begins at address $00FF. The stack pointer
can access 64 bytes of RAM from $00FF to $00C0.
NOTE: Using the stack area for data storage or temporary work locations
requires care to prevent it from being overwritten due to stacking from an
interrupt or subroutine call.
Freescale Semiconductor, Inc...
NOTE: Address space $3F00–$3FEF is reserved for test code. Unlike other
M68HC05 devices, the MC68HC05P18 does not contain self-check
code.
2.6 EEPROM
The EEPROM is located at address $0140 and consists of 128 bytes.
Programming the EEPROM can be done by the user on a single byte
basis by manipulating the programming register, located at address
$001C. Refer to Section 8. EEPROM for a discussion of the EEPROM.
34 Memory MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
3.1 Contents
3.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35
Freescale Semiconductor, Inc...
3.2 Introduction
This section describes the CPU registers.
7 0
A ACCUMULATOR
7 0
X INDEX REGISTER
12 0
Freescale Semiconductor, Inc...
PC PROGRAM COUNTER
12 7 0
0 0 0 0 0 1 1 SP STACK POINTER
CCR
H I N Z C CONDITION CODE REGISTER
7 0 STACK
7 0
A
The index register is an 8-bit register used for the indexed addressing
value to create an effective address. The index register may also be
used as a temporary storage area.
7 0
X
The condition code register (CCR) is a 5-bit register in which four bits are
used to indicate the results of the instruction just executed, and the fifth
bit indicates whether interrupts are masked. These bits can be
individually tested by a program, and specific actions can be taken as a
result of their state. Each bit is explained in the following paragraphs.
CCR
H I N Z C
This bit is set during ADD and ADC operations to indicate that a carry
occurred between bits 3 and 4.
When this bit is set, the timer and external interrupt are masked
(disabled). If an interrupt occurs while this bit is set, the interrupt is
latched and processed as soon as the interrupt bit is cleared.
When set, this bit indicates that the result of the last arithmetic, logical,
or data manipulation was negative.
When set, this bit indicates that the result of the last arithmetic, logical,
or data manipulation was 0.
Freescale Semiconductor, Inc...
When set, this bit indicates that a carry or borrow out of the arithmetic
logical unit (ALU) occurred during the last arithmetic operation. This bit
is also affected during bit test and branch instructions and during shifts
and rotates.
The stack pointer contains the address of the next free location on the
stack. During an MCU reset or the reset stack pointer (RSP) instruction,
the stack pointer is set to location $00FF. The stack pointer is then
decremented as data is pushed onto the stack and incremented as data
is pulled from the stack.
12 7 0
0 0 0 0 0 1 1 SP
The program counter is a 13-bit register that contains the address of the
next byte to be fetched.
12 0
PC
Section 4. Interrupts
4.1 Contents
4.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
Freescale Semiconductor, Inc...
4.2 Introduction
The MCUs can be interrupted six different ways:
Interrupts cause the processor to save the register contents on the stack
and to set the interrupt mask (I bit) to prevent additional interrupts. Unlike
reset, hardware interrupts do not cause the current instruction execution
to be halted, but are considered pending until the current instruction is
completed.
MOTOROLA Interrupts 41
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Interrupts
42 Interrupts MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Interrupts
Interrupt Types
• Reset
• Software
• Hardware
All hardware interrupts are maskable by the I bit in the CCR. If the I bit
is set, all hardware interrupts (internal and external) are disabled.
Clearing the I bit enables the hardware interrupts. Four hardware
interrupts are explained here.
MOTOROLA Interrupts 43
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Interrupts
FROM RESET
Y IS I BIT
SET?
N
IRQ CLEAR IRQ
Y
INTERRUPT? REQUEST
LATCH
N
TIMER Y
INTERRUPT?
Freescale Semiconductor, Inc...
N STACK
PC, X, A, CC
SET
I BIT IN CCR
LOAD PC FROM:
SWI: $3FFC, $3FFD
IRQ: $3FFA–$3FFB
TIMER: $3FF8–$3FF9
FETCH NEXT
INSTRUCTION
SWI Y
INSTRUCTION?
N
RTI RESTORE RESISTERS
Y FROM STACK
INSTRUCTION?
CC, A, X, PC
N
EXECUTE INSTRUCTION
44 Interrupts MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Interrupts
Interrupt Types
NOTE: The internal interrupt latch is cleared nine PH2 clock cycles after the
interrupt is recognized (after location $3FFA is read). Therefore, another
external interrupt pulse could be latched during the IRQ service routine.
The IRQ pin is one source of an IRQ interrupt and a mask option can
also enable the port A pins (PA0–PA7) to act as other IRQ interrupt
sources. These sources are all combined into a single ORing function to
be latched by the IRQ latch.
IRQ PIN
TO BIH & BIL
INSTRUCTION
PA0 SENSING
DDRA0
PA0 IRQ INHIBIT
(MASK OPTION) VDD
: :
: : IRQ
: : LATCH TO IRQ
: : PROCESSING
: R IN CPU
PA7
DDRA7
PA7 IRQ INHIBIT
(MASK OPTION) RST
IRQ VECTOR FETCH
MASK OPTION
(IRQ LEVEL)
MOTOROLA Interrupts 45
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Interrupts
Any enabled IRQ interrupt source sets the IRQ latch on the falling edge
of the IRQ pin or a port A pin if port A interrupts have been enabled. If
edge-only sensitivity is chosen by a mask option, only the IRQ latch
output can activate a request to the CPU to generate the IRQ interrupt
sequence. This makes the IRQ interrupt sensitive to the:
1. Falling edge on the IRQ pin with all enabled port A interrupt pins
at a high level
2. Falling edge on any enabled port A interrupt pin with all other
enabled port A interrupt pins and the IRQ pin at a high level
Freescale Semiconductor, Inc...
If level sensitivity is chosen, the active high state of the IRQ input can
also activate an IRQ request to the CPU to generate the IRQ interrupt
sequence. This makes the IRQ interrupt sensitive to the:
The IRQ interrupt can be triggered by the inputs on the PA0–PA7 port
pins if enabled by individual mask options. With pullup enabled, each
port A pin can activate the IRQ interrupt function and the interrupt
operation will be the same as for inputs to the IRQ pin. Once enabled by
mask option, each individual port A pin can be disabled as an interrupt
source if its corresponding DDR bit is configured for output mode.
NOTE: The BIH and BIL instructions apply to the output of the logic OR function
of the enabled PA0–PA7 interrupt pins and the IRQ pin. The BIH and BIL
instructions do not test only the state of the IRQ pin.
46 Interrupts MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Interrupts
Interrupt Types
If enabled, the PA0–PA7 pins will cause an IRQ interrupt only if these
individual pins are configured as inputs.
MOTOROLA Interrupts 47
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Interrupts
Freescale Semiconductor, Inc...
48 Interrupts MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Section 5. Resets
5.1 Contents
5.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49
Freescale Semiconductor, Inc...
5.2 Introduction
The MCU can be reset from four sources: one external input and three
internal reset conditions. The RESET pin is an input with a Schmitt
trigger as shown in Figure 5-1. The CPU and all peripheral modules will
be reset by the RST signal which is the logical OR of internal reset
functions and is clocked by PH2.
MOTOROLA Resets 49
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Resets
TO IRQ
IRQ
LOGIC
D
LATCH MODE
SELECT
RESET
R
(PULSE WIDTH = 4 x E-CLK)
CLOCKED
PH2 ONE-SHOT
OSC
DATA COP WATCHDOG
(COPR)
ADDRESS
Freescale Semiconductor, Inc...
LOW-VOLTAGE CPU
VDD
RESET (LVR)
S
D
POWER-ON RESET TO OTHER
VDD LATCH
(POR) PERIPHERALS
RST
PH2
The POR will generate the RST signal and reset the MCU. The POR will
also pull the RESET pin low at the same time, allowing external devices
to be reset with the MCU. If any other reset function is active at the end
50 Resets MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Resets
Internal Resets
of this 4064 PH2 clock cycle delay, the RST signal will remain active until
the other reset condition(s) end.
When the COP watchdog timer is enabled (by MOR1, bit 0), the internal
COP reset is generated automatically by a timeout of the COP watchdog
timer. This timer is implemented with an 18-stage ripple counter that
provides a timeout period of 65.5 ms when a 4-MHz oscillator is used.
The COP watchdog counter is cleared by writing a logical 0 to bit zero at
Freescale Semiconductor, Inc...
location $3FF0.
The COP register is shared with the most significant bit (MSB) of an
unimplemented user interrupt vector as shown in Figure 5-2. Reading
this location will return the MSB of the unimplemented user interrupt
vector. Writing to this location will clear the COP watchdog timer.
Address: $3FF0
Bit 7 6 5 4 3 2 1 Bit 0
Read: 0 0 0 0 0 0 0 0
Write: R COPR
Reset: — — — — — — — —
= Unimplemented R = Reserved
If the LVR has been enabled via MOR1, the internal LVR reset is
generated when the supply voltage to the VDD pin falls below a nominal
3.80 Vdc. The LVR threshold is not intended to be an accurate and
stable trip point, but is intended to ensure that the CPU will be held in
reset when the VDD supply voltage is below reasonable operating limits.
If the LVR is tripped for a short time, the LVR reset signal will last at least
two cycles of the CPU bus clock, PH2.
MOTOROLA Resets 51
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Resets
The LVR will generate the RST signal which will reset the CPU and other
peripherals. Also, the LVR will establish the mode of operation based on
the state of the IRQ pin at the time the LVR signal ends. If any other reset
function is active at the end of the LVR reset signal, the RST signal will
remain in the reset condition until the other reset condition(s) end.
NOTE: The voltage of the IRQ pin must be between 0–VDD volts to stay in the
normal operation mode.
Freescale Semiconductor, Inc...
52 Resets MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
6.1 Contents
6.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53
Freescale Semiconductor, Inc...
6.2 Introduction
This section describes the user, bootloader, and low-power operating
modes. In addition the computer operating properly (COP) timer
considerations are discussed.
• User mode
• Bootloader mode
2 x VDD 5V Bootloader
Bootloader mode is entered upon the rising edge of RESET if the IRQ
pin is twice the VDD voltage and the TCAP/PD7 pin is at logic 1. In
bootloader mode, the user EEPROM and mask option register (MOR)
bytes can be erased and programmed. Figure 6-1 shows the bootloader
circuit. PTC4 determines whether erasing or programming will occur as
shown in Table 6-2.
PTC4 Function
To use the bootloader circuit to bulk erase the user EEPROM, follow this
sequence:
1. Close RESET switch and PTC4 switch so these pins are held low.
2. Apply 12-V power to IRQ.
3. Release RESET.
4. Programming LED will turn on while bulk erase is occurring.
5. When bulk erase is finished, programming LED will turn off.
6. When blank verify is finished, verify LED will turn on.
7. Close RESET switch.
8. Remove 12 V from IRQ, then remove power.
12 V
27C128 MC14040B
1 kΩ
IRQ
PA0 DQ1 A11 Q12
OSC1 PA1 DQ2 A10 Q11
4 MHz
PA2 DQ3 A9 Q10
OSC2
PA3 DQ4 A8 Q9
PA4 DQ5 A7 Q8
10 MΩ
PA5 DQ6 A6 Q7
20 pF 20 pF
PA6 DQ7 A5 Q6
Freescale Semiconductor, Inc...
PA7 DQ8 A4 Q5
VDD
CE A3 Q4
10 kΩ OE A2 Q3
A1 Q2
RESET
PC6 A12 A0 Q1
1 µF PC7 A13
4.7 kΩ VDD
4.7 kΩ
PROG TCAP
PB7
PC1
390 Ω
PC2
VERF VDD
PB6 10 KΩ
390 Ω
PC4
VDD = 5.0 V
PC3
4.7 kΩ
To use the bootloader circuit to bulk erase, program, and verify the user
EEPROM, follow this sequence:
5. Release RESET.
6. Programming LED will be on during bulk erase and programming.
(The code in the 27C128 will be loaded into the user EEPROM
and MOR.)
7. When programming is finished, the programming LED will turn off.
8. When the verify is finished, verify LED will turn on.
9. Close RESET switch.
10. Remove 12 V from IRQ, then remove power.
NOTE: Bootloader mode is the only mode in which the user can program the 8-K
user EEPROM and MOR. The 128-byte EEPROM can be programmed
in user mode.
N
STOP RC OSCILLATOR EXTERNAL OSCILLATOR ACTIVE
STOP EXTERNAL OSCILLATOR, STOP INTERNAL PROCESSOR AND
STOP INTERNAL TIMER CLOCK, CLOCK, CLEAR I BIT IN CCR INTERNAL TIMER CLOCK ACTIVE
RESET START-UP DELAY
IRQ Y LVR OR
LVR OR Y Y EXTERNAL
EXTERNAL
EXTERNAL RESET?
INTERRUPT?
RESET?
N
N N
IRQ
IRQ TIMER Y
Y EXTERNAL
EXTERNAL Y INTERNAL INTERRUPT?
INTERRUPT? INTERRUPT?
N
N RESTART EXTERNAL OSCILLATOR, N
START STABILIZATION DELAY
TIMER
COP Y INTERNAL
Y
INTERNAL INTERRUPT?
RESET?
N
END N
Y
OF STABILIZATION COP
DELAY? Y
INTERNAL
N RESET?
RESTART INTERNAL
N
PROCESSOR CLOCK
The MCU can be brought out of the stop mode only by an IRQ external
interrupt (or port A, if selected as an option in the MOR2) or an externally
generated reset. When exiting stop mode, the internal oscillator will
resume after a 4064 PH2 clock cycle oscillator stabilization delay.
NOTE: Execution of the STOP instruction without conversion to halt (via MOR1)
will cause the oscillator to stop, and therefore disable the COP watchdog
timer. If the COP watchdog timer is to be used, stop mode should be
changed to halt mode by programming the appropriate option in MOR1.
Execution of the STOP instruction with the conversion to halt places the
MCU in this low-power mode. Halt mode consumes the same amount of
power as wait mode (both halt and wait modes consume more power
than stop mode).
In halt mode the PH2 clock is halted, suspending all processor and
internal bus activity. Internal timer clocks remain active, permitting
interrupts to be generated from the 16-bit timer or a reset to be
generated from the COP watchdog timer. Execution of the STOP
Freescale Semiconductor, Inc...
If the 16-bit timer interrupt is enabled, it will cause the processor to exit
halt mode and resume normal operation. Halt mode also can be exited
when an IRQ external interrupt (or port A, if selected as an option in the
MOR2) or external RESET occurs. When exiting halt mode, the PH2
clock will resume after a delay of one to 4064 PH2 clock cycles. This
varied delay time is the result of the halt mode exit circuitry testing the
oscillator stabilization delay timer (a feature of the stop mode), which has
been free-running (a feature of the wait mode).
NOTE: Halt mode is not intended for normal use. This feature is provided to
keep the COP watchdog timer active in the event a STOP instruction is
executed inadvertently.
If the 16-bit timer interrupt is enabled, it will cause the processor to exit
wait mode and resume normal operation. The 16-bit timer may be used
to generate a periodic exit from wait mode. Wait mode may also be
exited when an IRQ or RESET occurs. Note that if port A interrupts (if
programmed as an option in the mask option register 1) will also exit wait
mode. However, when exiting wait mode, the internal oscillator will not
need to wait for 4064 PH2 clock cycles to stabilize as in the stop and halt
modes.
Freescale Semiconductor, Inc...
7.1 Contents
7.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63
Freescale Semiconductor, Inc...
7.2 Introduction
In user mode, 20 bidirectional input/output (I/O) lines are arranged as
two 8-bit I/O ports (ports A and C), one 3-bit I/O port (port B), and one
1-bit I/O port (port D). These ports are programmable as either inputs or
outputs under software control of the data direction registers (DDRs). An
input-only pin is associated with port D.
7.3 Port A
Port A is an 8-bit bidirectional port which can share its pins with the IRQ
interrupt system as shown in Figure 7-1. Each port A pin is controlled by
the corresponding bits in a data direction register and a data register.
The port A data register is located at address $0000. The port A data
direction register (DDRA) is located at address $0004. Reset clears the
DDRA, thereby initializing port A as an input port. The port A data
register is unaffected by reset.
Freescale Semiconductor, Inc...
VDD
MOR 2
(PULLUP INHIBIT)
READ $0004
WRITE $0004
DATA DIRECTION
REGISTER BIT
WRITE $0000 I/O
DATA OUTPUT PIN
REGISTER BIT
READ $0000
100 µA
PULLUP
INTERNAL
HC05
DATA BUS RESET
(RST)
TO IRQ INTERRUPT
SYSTEM
7.4 Port B
Port B is a 3-bit bidirectional port which can share pins PB5–PB7 with
the serial input/output port (SIOP) communications subsystem. The port
B data register is located at address $0001 and its data direction register
(DDR) is located at address $0005. Reset does not affect the data
registers, but clears the DDRs, thereby setting all of the port pins to input
mode. Writing a logic 1 to a DDR bit sets the corresponding port pin to
output mode (see Figure 7-2).
Port B may be used for general I/O applications when the SIOP
Freescale Semiconductor, Inc...
READ $0005
WRITE $0005
DATA DIRECTION
RESET REGISTER BIT
(RST)
WRITE $0001 I/O
DATA OUTPUT PIN
REGISTER BIT
READ $0001
INTERNAL
HC05
DATA BUS
7.5 Port C
Port C is an 8-bit bidirectional port which can share pins PC3–PC7 with
the A/D subsystem. The port C data register is located at address $0002
and its data direction register (DDR) is located at address $0006. Reset
does not affect the data registers, but clears the DDRs, thereby setting
all of the port pins to input mode. Writing a logic 1 to a DDR bit sets the
corresponding port pin to output mode (see Figure 7-3). Two port C
pins, PC0 and PC1, can source and sink a higher current than a typical
I/O pin. See Section 13. Electrical Specifications regarding current
Freescale Semiconductor, Inc...
specifications.
Port C may be used for general I/O applications when the A/D
subsystem is disabled. The ADON bit in register ADSC is used to
enable/disable the A/D subsystem. Care must be exercised when using
pins PC0–PC2 while the A/D subsystem is enabled. Accidental changes
to bits that affect pins PC3–PC7 in the data or DDR registers will produce
unpredictable results in the A/D subsystem. See Section 9.
Analog-to-Digital (A/D) Converter.
READ $0006
HIGH CURRENT
WRITE $0006 CAPABILITY, PC0
DATA DIRECTION AND PC1 ONLY
RESET REGISTER BIT
(RST)
WRITE $0002 I/O
DATA OUTPUT PIN
REGISTER BIT
READ $0002
INTERNAL
HC05
DATA BUS
7.6 Port D
Port D is a 2-bit port with one bidirectional pin (PD5/CKOUT) and one
input-only pin (PD7). Pin PD7 is shared with the 16-bit timer. PD5 can be
replaced with a buffered OSC2 clock output via MOR1. The port D data
register is located at address $0003 and its data direction register (DDR)
is located at address $0007. Reset does not affect the data registers, but
clears the DDRs, thereby setting PD5/CKOUT to input mode. Writing a
1 to DDR bit 5 sets PD5/CKOUT to output mode (see Figure 7-4).
Port D may be used for general I/O applications regardless of the state
Freescale Semiconductor, Inc...
of the 16-bit timer. Since PD7 is an input-only line, its state can be read
from the port D data register at any time.
READ $0007
WRITE $0007
DATA DIRECTION
RESET REGISTER BIT
(RST)
WRITE $0003 I/O
DATA OUTPUT PIN
REGISTER BIT
READ $0003
INTERNAL
HC05
DATA BUS
NOTE: To avoid generating a glitch on an I/O port pin, data should be written to
the I/O port data register before writing a logical 1 to the corresponding
data direction register.
Section 8. EEPROM
8.1 Contents
8.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71
Freescale Semiconductor, Inc...
8.2 Introduction
This section describes the electrically erasable, programmable
read-only memory (EEPROM) which is located at address $0140 and
consists of 128 bytes. Programming the EEPROM can be done by the
user on a single byte basis by manipulating the programming register
located at address $001C.
Also, the mask option register (MOR), which consists of two additional
EEPROM bytes, is discussed.
MOTOROLA EEPROM 71
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
EEPROM
Address: $001C
Bit 7 6 5 4 3 2 1 Bit 0
Read: 0 0
CPEN ER1 ER0 LATCH EERC EEPGM
Write:
Reset: 0 0 0 0 0 0 0 0
Freescale Semiconductor, Inc...
= Unimplemented
0 1 Byte erase
1 0 Block erase
1 1 Bulk erase
72 EEPROM MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
EEPROM
EEPROM Programming Register
In byte erase mode, only the selected byte is erased. In block mode,
a 32-byte block of EEPROM is erased. The EEPROM memory space
is divided into four 32-byte blocks ($140–$15F, $160–$17F,
$180–$19F and $1A0–$1BF) and doing a block erase to any address
within a block will erase the entire block. In bulk erase mode, the
entire 128-byte EEPROM section is erased.
the address bus to be latched. This bit is readable and writable, but
reads from the array are inhibited if the LATCH bit is set and a write
to the EEPROM space has taken place.
When clear, address and data buses are configured for normal
operation. Reset clears this bit.
MOTOROLA EEPROM 73
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
EEPROM
If PB • EB = 0, then program the new data over the existing data without
Freescale Semiconductor, Inc...
For a bulk erase, set LATCH = 1, CPEN = 1, ER1 = 1, and ER0 = 1, write
to any address in the array, and set EEPGM for a time, tEBULK.
74 EEPROM MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
EEPROM
Mask Option Registers
When in the erased state, the EEPROM cells will read as logic 0s. These
registers are refreshed every 256 µs during power-on reset and every
16 ms after the part is out of reset (assuming fOSC = 4 MHz).
Address: $3F00
Bit 7 6 5 4 3 2 1 Bit 0
Write:
= Unimplemented
Address: $3F01
Bit 7 6 5 4 3 2 1 Bit 0
Write:
= Unimplemented
MOTOROLA EEPROM 75
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
EEPROM
0 0 fOSC divided by 16
0 1 fOSC divided by 8
1 0 fOSC divided by 4
1 1 fOSC divided by 2
76 EEPROM MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
EEPROM
Mask Option Registers
MOTOROLA EEPROM 77
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
EEPROM
Freescale Semiconductor, Inc...
78 EEPROM MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
9.1 Contents
9.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79
Freescale Semiconductor, Inc...
9.2 Introduction
The MC68HC(8)05P18 includes a 4-channel, multiplexed input, 8-bit
successive approximation analog-to-digital (A/D) converter. The A/D
subsystem shares its inputs with port C pins PC3–PC7.
The A/D converter is ratiometric, with pin VREFH supplying the high
reference voltage. Applying an input voltage equal to VREFH produces a
conversion result of $FF (full scale). Applying an input voltage equal to
Freescale Semiconductor, Inc...
9.3.2 VREFH
The reference supply for the A/D converter shares pin PC7 with port C.
The low reference is tied to the VSS pin internally. VREFH can be any
voltage between VSS and VDD; however, the accuracy of conversions is
tested and guaranteed only for VREFH = VDD.
If the MCU PH2 clock frequency is less than 1 MHz (2 MHz external
oscillator), the internal RC oscillator (approximately 1.5 MHz) must be
used for the A/D converter clock. The internal RC clock is selected by
setting the EERC bit in the EEPROM programming register (EEPROG).
NOTE: The RC oscillator is shared with the EEPROM module. The RC oscillator
is disabled while the MCU is in stop mode.
An input multiplexer allows the A/D converter to select from one of four
external analog signals. Port C pins PC3–PC6 are shared with the inputs
to the multiplexer.
Address: $001E
Bit 7 6 5 4 3 2 1 Bit 0
Read: CC 0 0
R ADON CH2 CH1 CH0
Write:
Reset: 0 0 0 0 0 0 0 0
= Unimplemented R = Reserved
Reserved
This bit is not used currently. It can be read or written, but does not
control anything.
If the ADON bit is set and an input from channels 0–4 is selected, the
corresponding port C pin’s DDR bit will be cleared (making that port C
pin an input). If the port C data register is read while the A/D is on and
one of the shared input channels is selected using bit CH0–CH2, the
corresponding port C pin will read as a logic 0. The remaining port C pins
will read normally. To digitally read a port C pin, the A/D subsystem must
be disabled (ADON = 0) or input channels 5–7 must be selected.
5 (VREFH + VSS)/2
6 VSS
7 Reserved
Address: $001D
Bit 7 6 5 4 3 2 1 Bit 0
Write:
= Unimplemented
10.1 Contents
10.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85
Freescale Semiconductor, Inc...
10.2 Introduction
The MC68HC(8)05P18 MCU contains a single 16-bit programmable
timer with an input capture function and an output compare function. The
16-bit timer is driven by the output of a fixed divide-by-four prescaler
operating from the PH2 clock. The 16-bit timer may be used for many
applications including input waveform measurement, while
simultaneously generating an output waveform. Pulse widths can vary
from microseconds to seconds depending on the oscillator frequency
selected. The 16-bit timer is also capable of generating periodic
interrupts. See Figure 10-1.
OUTPUT INPUT
COMPARE BUFFER CAPTURE
PH2
CLOCK
FREE-
OCRH OCRL ICRH ICRL
RUNNING
COUNTER
TMRH/ TMRL/ ÷4
ACRH ACRL
Freescale Semiconductor, Inc...
R R TCMP
>
R
TIMER RESET
STATUS OCF TOF ICF
REGISTER
INTERRUPT
TIMER INTERRUPT
GENERATOR
TIMER
OCIE TOIE ICIE IEDG OLVL CONTROL
REGISTER
NOTE: The I bit in the condition code register (CCR) should be set while
manipulating both the high and low byte registers of a specific timer
function. This prevents interrupts from occurring between the time the
high and low bytes are accessed.
Freescale Semiconductor, Inc...
10.3 Timer
The key element of the programmable timer is a 16-bit free-running
counter, or timer registers, preceded by a prescaler which divides the
PH2 clock by four. The prescaler gives the timer a resolution of 2.0
microseconds when a 4-MHz crystal is used. The counter is incremented
to increasing values during the low portion of the PH2 clock cycle.
The double byte free-running counter can be read from either of two
locations: the timer registers (TMRH and TMRL) or the alternate counter
registers (ACRH and ACRL). Both locations will contain identical values.
A read sequence containing only a read of the LSB of the counter
(TMRL/ACRL) will return the count value at the time of the read. If a read
of the counter accesses the MSB first (TMRH/ACRH), it causes the LSB
(TMRL/ACRL) to be transferred to a buffer. This buffer value remains
fixed after the first MSB byte read, even if the MSB is read several times.
The buffer is accessed when reading the counter LSB (TMRL/ACRL)
and thus completes a read sequence of the total counter value. When
reading either the timer or alternate counter registers, if the MSB is read,
the LSB must also be read to complete the read sequence. See
Figure 10-2 and Figure 10-3.
Bit 7 6 5 4 3 2 1 Bit 0
Write:
Reset: 1 1 1 1 1 1 1 1
Bit 7 6 5 4 3 2 1 Bit 0
Freescale Semiconductor, Inc...
Write:
Reset: 1 1 1 1 1 1 0 0
= Unimplemented
Bit 7 6 5 4 3 2 1 Bit 0
Write:
Reset: 1 1 1 1 1 1 1 1
Bit 7 6 5 4 3 2 1 Bit 0
Read: ACRL7 ACRL6 ACRL5 ACRL4 ACRL3 ACRL2 ACRL1 ACRL0
Write:
Reset: 1 1 1 1 1 1 0 0
= Unimplemented
The timer registers and alternate counter registers can be read at any
time without affecting their value. However, the alternate counter
registers differ from the timer registers in one respect: A read of the timer
register most significant bit (MSB) can clear the timer overflow flag
(TOF). Therefore, the alternate counter registers can be read at any time
without the possibility of missing timer overflow interrupts due to clearing
of the TOF. See Figure 10-4.
PH2
CLOCK
16-BIT
FREE-RUNNING $FFFE $FFFF $0000 $0001 $0002
COUNTER
TIMER
OVERFLOW
FLAG (TOF)
Note: The TOF bit is set at timer state T11 (transition of counter from $FFFF to $0000). It is cleared by reading the timer status
register (TSR) during the high portion of the PH2 clock followed by reading the LSB of the counter register pair (TCRL).
PH2
CLOCK
INTERNAL
RESET
16-BIT
FREE-RUNNING $FFFC $FFFD $FFFE $FFFF
COUNTER
RESET
(EXTERNAL
OR OTHER)
NOTE: The counter and control registers are the only 16-bit timer registers affected by reset.
Freescale Semiconductor, Inc...
Bit 7 6 5 4 3 2 1 Bit 0
Bit 7 6 5 4 3 2 1 Bit 0
Write:
= Unimplemented
The contents of the output compare registers are compared with the
contents of the free-running counter once every four PH2 clock cycles.
If a match is found, the output compare flag bit (OCF) is set and the
output level bit (OLVL) is clocked to the output latch. The values in the
output compare registers and output level bit should be changed after
each successful comparison to control an output waveform or to
establish a new elapsed timeout. An interrupt can also accompany a
successful output compare if the output compare interrupt enable bit
(OCIE) is set.
Freescale Semiconductor, Inc...
After a CPU write cycle to the MSB of the output compare register pair
(OCRH), the output compare function is inhibited until the least
significant bit (LSB) (OCRL) is written. Both bytes must be written if the
MSB is written. A write made only to the LSB will not inhibit the compare
function. The free-running counter increments every four PH2 clock
cycles. The minimum time required to update the output compare
registers is a function of software rather than hardware.
The output compare output level bit (OLVL) will be clocked to its output
latch regardless of the state of the output compare flag bit (OCF). A valid
output compare must occur before the OLVL bit is clocked to its output
latch (TCMP).
Since neither the output compare flag (OCF) nor the output compare
registers are affected by reset, care must be exercised when initializing
the output compare function. The following procedure is recommended:
This procedure prevents the output compare flag bit (OCF) from being
set between the time it is read and the time the output compare registers
are updated. A software example is shown in Figure 10-7.
NOTE: The input capture edge detector contains a Schmitt trigger to improve
noise immunity.
The edge that triggers the counter transfer is defined by the input edge
bit (IEDG) in register TCR. Reset does not affect the contents of the
input capture registers. See Figure 10-10.
The result obtained by an input capture will be one more than the value
of the free-running counter on the rising edge of the PH2 clock preceding
the external transition (see Figure 10-9). This delay is required for
internal synchronization. Resolution is affected by the prescaler,
allowing the free-running counter to increment once every four PH2
clock cycles.
Bit 7 6 5 4 3 2 1 Bit 0
Write:
Bit 7 6 5 4 3 2 1 Bit 0
Freescale Semiconductor, Inc...
Write:
= Unimplemented
After a read of the MSB of the input capture register pair (ICRH), counter
transfers are inhibited until the LSB of the register pair (ICRL) is also
read. This characteristic forces the minimum pulse period attainable to
be determined by the time required to execute an input capture software
routine in an application.
Reading the LSB of the input capture register pair (ICRL) does not inhibit
transfer of the free-running counter. Again, minimum pulse periods are
ones which allow software to read the LSB of the register pair (ICRL) and
perform needed operations. There is no conflict between reading the
LSB (ICRL) and the free-running counter transfer, since they occur on
opposite edges of the PH2 clock.
PH2
CLOCK
16-BIT
FREE-RUNNING $FFEB $FFEC $FFED $FFEE $FFEF
COUNTER
TCAP
PIN
LATCH
INPUT
CAPTURE $???? $FFED
REGISTER
INPUT
CAPTURE
FLAG
Note: If the input edge occurs in the shaded area from one T10 timer state to the other T10 timer state, the input capture
flag is set during the next T11 timer state.
Address: $0012
Bit 7 6 5 4 3 2 1 Bit 0
Read: 0 0 0
ICIE OCIE TOIE IEDG OLVL
Write:
Reset: 0 0 0 0 0 0 0 0
= Unimplemented
However, a problem can occur when using a timer interrupt function and
reading the free-running counter at random times to, for example,
measure an elapsed time. If the proper precautions are not designed into
The alternate counter registers (ACRH and ACRL) contain the same
values as the timer registers (TMRH and TMRL). Registers ACRH and
ACRL can be read at any time without affecting the timer overflow flag
Freescale Semiconductor, Inc...
(TOF) or interrupt.
Address: $0013
Bit 7 6 5 4 3 2 1 Bit 0
Write:
Reset: U U U 0 0 0 0 0
= Unimplemented U = Unaffected
value until the stop mode is exited by applying a low signal to the IRQ
pin, at which time the counter resumes from its stopped value as if
nothing had happened. If stop mode is exited via an external RESET
(logic low applied to the RESET pin), the counter is forced to $FFFC.
If a valid input capture edge occurs at the TCAP pin during stop mode,
the input capture detect circuitry will be armed. This action does not set
any flags or “wake up” the MCU, but when the MCU does “wake up”
there will be an active input capture flag (and data) from the first valid
edge. If stop mode is exited by an external RESET, no input capture flag
or data will be present even if a valid input capture edge was detected
during stop mode.
11.1 Contents
11.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99
Freescale Semiconductor, Inc...
11.2 Introduction
The simple synchronous serial input/output port (SIOP) subsystem is
designed to provide efficient serial communications between peripheral
devices or other MCUs. The SIOP is implemented as a 3-wire
master/slave system with serial clock (SCK), serial data Input (SDI), and
serial data output (SDO). A block diagram of the SIOP is shown in
Figure 11-1.
The SIOP subsystem shares its input/output pins with port B. When the
SIOP is enabled (SPE bit set in register SCR), port B data direction
registers (DDR) and data registers are modified by the SIOP. Although
port B DDR and data registers can be altered by application software,
these actions could affect the transmitted or received data.
SPE
SCK SCK/PB7
PH2 CLOCK
The state of the serial clock (SCK) output normally remains a logic 1
during idle periods between data transfers. The first falling edge of SCK
signals the beginning of a data transfer. At this time, the first bit of
received data is accepted at the SDI pin and the first bit of transmitted
data is presented at the SDO pin (see Figure 11-2). Data is captured at
the SDI pin on the rising edge of SCK, and the first bit of transmitted data
is presented at the SDO pin. The transfer is terminated upon the eighth
rising edge of SCK.
SCK
100 ns 100 ns
SDI
BIT 0 BIT 1 BIT 2 BIT 3 BIT 4 BIT 5 BIT 6 BIT 7
The master and slave modes of operation differ only by the sourcing of
SCK. In master mode, SCK is driven from an internal source within the
MCU. In slave mode, SCK is driven from a source external to the MCU.
The SCK frequency is programmable via the mask option register 1
(MOR1). Available rates are OSC divided by 2, 4, 8, or 16.
NOTE: OSC divided by 2 is four times faster than the standard rate available on
the 68HC05P6.
On the first falling edge of SCK, the first data bit will be shifted out to the
SDO pin. The remaining data bits will be shifted out to the SDI pin on
Freescale Semiconductor, Inc...
subsequent falling edges of SCK. The SDO pin will present valid data at
least 100 nanoseconds before the rising edge of the SCK and remain
valid for 100 nanoseconds after the rising edge of SCK. See
Figure 11-2.
Address: $000A
BIt 7 6 5 4 3 2 1 Bit 0
Read: 0 0 0 0 0 0
SPE MSTR
Write:
Reset: 0 0 0 0 0 0 0 0
= Unimplemented
Address: $000B
BIt 7 6 5 4 3 2 1 Bit 0
Write:
Reset: 0 0 0 0 0 0 0 0
= Unimplemented
Figure 11-5 shows the position of each bit in the register. This register
is not affected by reset.
Address: $000C
BIt 7 6 5 4 3 2 1 Bit 0
Read:
SD7 SD6 SD5 SD4 SD3 SD2 SD1 SD0
Write:
12.1 Contents
12.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107
Freescale Semiconductor, Inc...
12.2 Introduction
This section describes the addressing modes and instruction types.
• Extended
• Indexed, no offset
• Indexed, 8-bit offset
• Indexed, 16-bit offset
• Relative
12.3.1 Inherent
12.3.2 Immediate
12.3.3 Direct
Direct instructions can access any of the first 256 memory addresses
with two bytes. The first byte is the opcode, and the second is the low
byte of the operand address. In direct addressing, the CPU automatically
uses $00 as the high byte of the operand address. BRSET and BRCLR
are 3-byte instructions that use direct addressing to access the operand
and relative addressing to specify a branch destination.
12.3.4 Extended
Freescale Semiconductor, Inc...
When using the Motorola assembler, the programmer does not need to
specify whether an instruction is direct or extended. The assembler
automatically selects the shortest form of the instruction.
Indexed, 8-bit offset instructions are 2-byte instructions that can access
data with variable addresses within the first 511 memory locations. The
CPU adds the unsigned byte in the index register to the unsigned byte
following the opcode. The sum is the conditional address of the operand.
These instructions can access locations $0000–$01FE.
Indexed 8-bit offset instructions are useful for selecting the kth element
in an n-element table. The table can begin anywhere within the first 256
memory locations and could extend as far as location 510 ($01FE). The
k value is typically in the index register, and the address of the beginning
of the table is in the byte following the opcode.
Indexed, 16-bit offset instructions are 3-byte instructions that can access
data with variable addresses at any location in memory. The CPU adds
Freescale Semiconductor, Inc...
the unsigned byte in the index register to the two unsigned bytes
following the opcode. The sum is the conditional address of the operand.
The first byte after the opcode is the high byte of the 16-bit offset; the
second byte is the low byte of the offset. These instructions can address
any location in memory.
Indexed, 16-bit offset instructions are useful for selecting the kth element
in an n-element table anywhere in memory.
12.3.8 Relative
When using the Motorola assembler, the programmer does not need to
calculate the offset because the assembler determines the proper offset
and verifies that it is within the span of the branch.
Jump instructions allow the CPU to interrupt the normal sequence of the
program counter. The unconditional jump instruction (JMP) and the
jump- to-subroutine instruction (JSR) have no register operand. Branch
instructions allow the CPU to interrupt the normal sequence of the
program counter when a test condition is met. If the test condition is not
met, the branch is not performed. All branch instructions use relative
addressing.
Bit test and branch instructions cause a branch based on the state of any
readable bit in the first 256 memory locations. These 3-byte instructions
The CPU can set or clear any writable bit in the first 256 bytes of
memory. Port registers, port data direction registers, timer registers, and
on-chip RAM locations are in the first 256 bytes of memory. The CPU
can also test and branch based on the state of any bit in any of the first
256 memory locations. Bit manipulation instructions use direct
addressing. Table 12-4 lists these instructions.
Instruction Mnemonic
Clear bit BCLR
Branch if bit clear BRCLR
Branch if bit set BRSET
Set bit BSET
Operand
Address
Opcode
Effect
Cycles
Mode
Source on CCR
Operation Description
Form
H I N Z C
Freescale Semiconductor, Inc...
Operand
Address
Opcode
Effect
Cycles
Mode
Source on CCR
Operation Description
Form
H I N Z C
DIR (b0) 11 dd 5
DIR (b1) 13 dd 5
DIR (b2) 15 dd 5
DIR (b3) 17 dd 5
BCLR n opr Clear Bit n Mn ← 0 — — — — —
DIR (b4) 19 dd 5
DIR (b5) 1B dd 5
DIR (b6) 1D dd 5
DIR (b7) 1F dd 5
Freescale Semiconductor, Inc...
Operand
Address
Opcode
Effect
Cycles
Mode
Source on CCR
Operation Description
Form
H I N Z C
DIR (b0) 01 dd rr 5
DIR (b1) 03 dd rr 5
DIR (b2) 05 dd rr 5
DIR (b3) 07 dd rr 5
BRCLR n opr rel Branch if bit n clear PC ← (PC) + 2 + rel ? Mn = 0 — — — — ↕
DIR (b4) 09 dd rr 5
DIR (b5) 0B dd rr 5
DIR (b6) 0D dd rr 5
DIR (b7) 0F dd rr 5
Freescale Semiconductor, Inc...
DIR (b0) 00 dd rr 5
DIR (b1) 02 dd rr 5
DIR (b2) 04 dd rr 5
DIR (b3) 06 dd rr 5
BRSET n opr rel Branch if Bit n Set PC ← (PC) + 2 + rel ? Mn = 1 — — — — ↕
DIR (b4) 08 dd rr 5
DIR (b5) 0A dd rr 5
DIR (b6) 0C dd rr 5
DIR (b7) 0E dd rr 5
BRN rel Branch Never PC ← (PC) + 2 + rel ? 1 = 0 — — — — — REL 21 rr 3
DIR (b0) 10 dd 5
DIR (b1) 12 dd 5
DIR (b2) 14 dd 5
DIR (b3) 16 dd 5
BSET n opr Set Bit n Mn ← 1 — — — — —
DIR (b4) 18 dd 5
DIR (b5) 1A dd 5
DIR (b6) 1C dd 5
DIR (b7) 1E dd 5
PC ← (PC) + 2; push (PCL)
Branch to SP ← (SP) – 1; push (PCH)
BSR rel — — — — — REL AD rr 6
Subroutine SP ← (SP) – 1
PC ← (PC) + rel
CLC Clear Carry Bit C←0 — — — — 0 INH 98 2
CLI Clear Interrupt Mask I←0 — 0 — — — INH 9A 2
CLR opr M ← $00 DIR 3F dd 5
CLRA A ← $00 INH 4F 3
CLRX Clear Byte X ← $00 — — 0 1 — INH 5F 3
CLR opr,X M ← $00 IX1 6F ff 6
CLR ,X M ← $00 IX 7F 5
CMP #opr IMM A1 ii 2
CMP opr DIR B1 dd 3
Compare
CMP opr EXT C1 hh ll 4
Accumulator with (A) – (M) — — ↕ ↕ ↕
CMP opr,X IX2 D1 ee ff 5
Memory Byte
CMP opr,X IX1 E1 ff 4
CMP ,X IX F1 3
Operand
Address
Opcode
Effect
Cycles
Mode
Source on CCR
Operation Description
Form
H I N Z C
COM opr M ← (M) = $FF – (M) DIR 33 dd 5
COMA A ← (A) = $FF – (M) INH 43 3
Complement Byte
COMX X ← (X) = $FF – (M) — — ↕ ↕ 1 INH 53 3
(One’s Complement)
COM opr,X M ← (M) = $FF – (M) IX1 63 ff 6
COM ,X M ← (M) = $FF – (M) IX 73 5
CPX #opr IMM A3 ii 2
CPX opr DIR B3 dd 3
Compare Index
CPX opr EXT C3 hh ll 4
Freescale Semiconductor, Inc...
Operand
Address
Opcode
Effect
Cycles
Mode
Source on CCR
Operation Description
Form
H I N Z C
LDX #opr IMM AE ii 2
LDX opr DIR BE dd 3
LDX opr Load Index Register EXT CE hh ll 4
X ← (M) — — ↕ ↕ —
LDX opr,X with Memory Byte IX2 DE ee ff 5
LDX opr,X IX1 EE ff 4
LDX ,X IX FE 3
LSLA INH 48 3
Logical Shift Left
LSLX C 0 — — ↕ ↕ ⋅ INH 58 3
(Same as ASL) b7 b0
LSL opr,X IX1 68 ff 6
LSL ,X IX 78 5
Operand
Address
Opcode
Effect
Cycles
Mode
Source on CCR
Operation Description
Form
H I N Z C
SP ← (SP) + 1; Pull (CCR)
SP ← (SP) + 1; Pull (A)
RTI Return from Interrupt SP ← (SP) + 1; Pull (X) ↕ ↕ ↕ ↕ ↕ INH 80 6
SP ← (SP) + 1; Pull (PCH)
SP ← (SP) + 1; Pull (PCL)
Return from SP ← (SP) + 1; Pull (PCH)
RTS INH
Subroutine SP ← (SP) + 1; Pull (PCL)
Freescale Semiconductor, Inc...
Operand
Address
Opcode
Effect
Cycles
Mode
Source on CCR
Operation Description
Form
H I N Z C
Transfer
TAX Accumulator to Index X ← (A) — — — — — INH 97 2
Register
TST opr DIR 3D dd 4
TSTA INH 4D 3
Test Memory Byte for
TSTX (M) – $00 — — — — — INH 5D 3
Negative or Zero
TST opr,X IX1 6D ff 5
TST ,X IX 7D 4
Freescale Semiconductor, Inc...
Transfer Index
TXA Register to A ← (X) — — — — — INH 9F 2
Accumulator
Stop CPU Clock and
WAIT Enable — ↕ — — — INH 8F 2
Interrupts
A Accumulator opr Operand (one or two bytes)
C Carry/borrow flag PC Program counter
CCR Condition code register PCH Program counter high byte
dd Direct address of operand PCL Program counter low byte
dd rr Direct address of operand and relative offset of branch instruction REL Relative addressing mode
DIR Direct addressing mode rel Relative program counter offset byte
ee ff High and low bytes of offset in indexed, 16-bit offset addressing rr Relative program counter offset byte
EXT Extended addressing mode SP Stack pointer
ff Offset byte in indexed, 8-bit offset addressing X Index register
H Half-carry flag Z Zero flag
hh ll High and low bytes of operand address in extended addressing # Immediate value
I Interrupt mask ∧ Logical AND
ii Immediate operand byte ∨ Logical OR
IMM Immediate addressing mode ⊕ Logical EXCLUSIVE OR
INH Inherent addressing mode () Contents of
IX Indexed, no offset addressing mode –( ) Negation (two’s complement)
IX1 Indexed, 8-bit offset addressing mode ← Loaded with
IX2 Indexed, 16-bit offset addressing mode ? If
M Memory location : Concatenated with
N Negative flag ↕ Set or cleared
n Any bit — Not affected
122
Table 12-7. Opcode Map
Bit Manipulation Branch Read-Modify-Write Control Register/Memory
DIR DIR REL DIR INH INH IX1 IX INH INH IMM DIR EXT IX2 IX1 IX
MSB MSB
Instruction Set
0 1 2 3 4 5 6 7 8 9 A B C D E F LSB
Advance Information
LSB
5 5 3 5 3 3 6 5 9 2 3 4 5 4 3
0 BRSET0 BSET0 BRA NEG NEGA NEGX NEG NEG RTI SUB SUB SUB SUB SUB SUB 0
3 DIR 2 DIR 2 REL 2 DIR 1 INH 1 INH 2 IX1 1 IX 1 INH 2 IMM 2 DIR 3 EXT 3 IX2 2 IX1 1 IX
5 5 3 6 2 3 4 5 4 3
1 BRCLR0 BCLR0 BRN RTS CMP CMP CMP CMP CMP CMP 1
3 DIR 2 DIR 2 REL 1 INH 2 IMM 2 DIR 3 EXT 3 IX2 2 IX1 1 IX
5 5 3 11 2 3 4 5 4 3
2 BRSET1 BSET1 BHI MUL SBC SBC SBC SBC SBC SBC 2
3 DIR 2 DIR 2 REL 1 INH 2 IMM 2 DIR 3 EXT 3 IX2 2 IX1 1 IX
5 5 3 5 3 3 6 5 10 2 3 4 5 4 3
3 BRCLR1 BCLR1 BLS COM COMA COMX COM COM SWI CPX CPX CPX CPX CPX CPX 3
3 DIR 2 DIR 2 REL 2 DIR 1 INH 1 INH 2 IX1 1 IX 1 INH 2 IMM 2 DIR 3 EXT 3 IX2 2 IX1 1 IX
5 5 3 5 3 3 6 5 2 3 4 5 4 3
4 BRSET2 BSET2 BCC LSR LSRA LSRX LSR LSR AND AND AND AND AND AND 4
3 DIR 2 DIR 2 REL 2 DIR 1 INH 1 INH 2 IX1 1 IX 2 IMM 2 DIR 3 EXT 3 IX2 2 IX1 1 IX
5 5 3 2 3 4 5 4 3
5 BRCLR2 BCLR2 BCS/BLO BIT BIT BIT BIT BIT BIT 5
3 DIR 2 DIR 2 REL 2 IMM 2 DIR 3 EXT 3 IX2 2 IX1 1 IX
5 5 3 5 3 3 6 5 2 3 4 5 4 3
6 BRSET3 BSET3 BNE ROR RORA RORX ROR ROR LDA LDA LDA LDA LDA LDA 6
3 DIR 2 DIR 2 REL 2 DIR 1 INH 1 INH 2 IX1 1 IX 2 IMM 2 DIR 3 EXT 3 IX2 2 IX1 1 IX
5 5 3 5 3 3 6 5 2 4 5 6 5 4
7 BRCLR3 BCLR3 BEQ ASR ASRA ASRX ASR ASR TAX STA STA STA STA STA 7
3 DIR 2 DIR 2 REL 2 DIR 1 INH 1 INH 2 IX1 1 IX 1 INH 2 DIR 3 EXT 3 IX2 2 IX1 1 IX
5 5 3 5 3 3 6 5 2 2 3 4 5 4 3
8 BRSET4 BSET4 BHCC ASL/LSL ASLA/LSLA ASLX/LSLX ASL/LSL ASL/LSL CLC EOR EOR EOR EOR EOR EOR 8
3 DIR 2 DIR 2 REL 2 DIR 1 INH 1 INH 2 IX1 1 IX 1 INH 2 IMM 2 DIR 3 EXT 3 IX2 2 IX1 1 IX
Instruction Set
5 5 3 5 3 3 6 5 2 2 3 4 5 4 3
9 BRCLR4 BCLR4 BHCS ROL ROLA ROLX ROL ROL SEC ADC ADC ADC ADC ADC ADC 9
3 DIR 2 DIR 2 REL 2 DIR 1 INH 1 INH 2 IX1 1 IX 1 INH 2 IMM 2 DIR 3 EXT 3 IX2 2 IX1 1 IX
5 5 3 5 3 3 6 5 2 2 3 4 5 4 3
A BRSET5 BSET5 BPL DEC DECA DECX DEC DEC CLI ORA ORA ORA ORA ORA ORA A
3 DIR 2 DIR 2 REL 2 DIR 1 INH 1 INH 2 IX1 1 IX 1 INH 2 IMM 2 DIR 3 EXT 3 IX2 2 IX1 1 IX
5 5 3 2 2 3 4 5 4 3
Go to: www.freescale.com
B BRCLR5 BCLR5 BMI SEI ADD ADD ADD ADD ADD ADD B
3 DIR 2 DIR 2 REL 1 INH 2 IMM 2 DIR 3 EXT 3 IX2 2 IX1 1 IX
5 5 3 5 3 3 6 5 2 2 3 4 3 2
BRSET6 BSET6 BMC INC INCA INCX INC INC RSP JMP JMP JMP JMP JMP
5 5 3 4 3 3 5 4 2 6 5 6 7 6 5
D BRCLR6 BCLR6 BMS TST TSTA TSTX TST TST NOP BSR JSR JSR JSR JSR JSR D
3 DIR 2 DIR 2 REL 2 DIR 1 INH 1 INH 2 IX1 1 IX 1 INH 2 REL 2 DIR 3 EXT 3 IX2 2 IX1 1 IX
5 5 3 2 2 3 4 5 4 3
E BRSET7 BSET7 BIL STOP LDX LDX LDX LDX LDX LDX E
3 DIR 2 DIR 2 REL 1 INH 2 IMM 2 DIR 3 EXT 3 IX2 2 IX1 1 IX
5 5 3 5 3 3 6 5 2 2 4 5 6 5 4
F BRCLR7 BCLR7 BIH CLR CLRA CLRX CLR CLR WAIT TXA STX STX STX STX STX F
3 DIR 2 DIR 2 REL 2 DIR 1 INH 1 INH 2 IX1 1 IX 1 INH 1 INH 2 DIR 3 EXT 3 IX2 2 IX1 1 IX
MOTOROLA
MC68HC(8)05P18 — Rev. 2.0
Freescale Semiconductor, Inc.
13.1 Contents
13.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .123
Freescale Semiconductor, Inc...
13.11 PD5 Clock Out Timing (PD5 CLKOUT Option Enabled) . . . .129
13.2 Introduction
This section contains electrical and timing specifications.
The MCU contains circuitry to protect the inputs against damage from
high static voltages; however, do not apply voltages higher than those
shown in the table here. Keep VIn and VOut within the range
VSS ≤ (VIn or VOut) ≤ VDD. Connect unused inputs to the appropriate
voltage level, either VSS or VDD.
Freescale Semiconductor, Inc...
VSS –0.3
Input voltage VIn V
to VDD + 0.3
VSS –0.3
Factory mode (IRQ pin only) VIn V
to 2 x VDD
Thermal resistance
Plastic θJA 60 °C/W
SOIC 60
where:
TA = Ambient temperature, °C
θJA = Package thermal resistance, junction to ambient, °C/W
PD = PINT + PI/O
PINT = IDD × VDD watts (chip internal power)
PI/O = Power dissipation on input and output pins (user-determined)
RESET, OSC1
Input low voltage
PA0–PA7, PB5–PB7, PC0–PC7, PD5, TCAP/PD7, IRQ, RESET, VIL VSS 0.2 x VDD V
OSC1
Supply current(2) (3) (4) (5) (6) (7)
Low frequency (2-MHz bus)
Run — 4 mA
Wait (A2D on) — 3.5 mA
Wait (A2D off) — 2.5 mA
High frequency (4-MHz bus) MC68HC05P18 only IDD
Run — 6 mA
Wait (A2D on) — 4.5 mA
Wait (A2D off) — 3.5 mA
Stop (–40°C to +132°C)
Stop LVR disabled — 50 µA
Stop LVR enabled — 200 µA
I/O ports hi-z leakage current IIL — ±10 µA
PA0–PA7, PB5–PB7, PC0–PC7, PD5/CKOUT, TCAP/PD7
I/O ports switch resistance (pullup enabled PA0–PA7) RPTA 7 30 k
A/D ports hi-z leakage current IIL — ±1 µA
PC3–PC7
Input current IIN — ±1 µA
RESET, IRQ, OSC1
Capacitance
Ports (as input or output) COut — 12 pF
RESET, IRQ CIn — 8
EEPROM program/erase time (128 byte array)
Byte — 5
— ms
Block (erase only) — 15
Bulk (erase only) — 50
Low-voltage reset voltage — 3.5 4.3 V
1. VDD = 5.0 Vdc ± 10%, VSS = 0 Vdc, TA = –40°C to +125°C, all values shown reflect average measurements.
2. Run (operating) IDD, wait IDD: Measured using external square wave clock source (fosc = 4.2 MHz), all inputs
0.2 V from rail; no dc loads, less than 50 pF on all outputs, CL = 20 pF on OSC2
3. Wait IDD with active systems: timer, SIOP, and A/D. Wait IDD is affected linearly by the OSC2 capacitance.
4. Wait, stop IDD: All ports configured as inputs, VIL = 0.2 V, VIH = VDD –0.2 V
5. Stop IDD measured with OSC1 = VSS. Stop IDD maximum values given with LVR option enabled.
6. Run and wait IDD limit values are with no load on PD5 clock out, when PD5 is enabled.
7. Run and wait IDD values are for both PD5 enabled and disabled and LVR enabled and disabled.
0.5 µs 13 ns 2.4 µs 50 pF 10 K
Resolution 8 8 Bits
Absolute accuracy
— ± 1 1/2 LSB Including quantization
(VDD ≥ VREFH > 4.5)
Input leakage
AD0, AD1, AD2, AD3 — ±1 µA
VREFH — ±1
Conversion time
32 32 tAD(2)
(includes sampling time)
00 01 VIn = 0 V (external)
Zero input reading Hex
00 03 VIn = 0 V (internal)
Input capacitance — 12 pF
1. VDD = 4.5 Vdc ± 10%, VSS = 0 Vdc, TA = –40°C to +125°C, unless otherwise noted
2. tAD = tCYC if clock source equals MCU
Operating frequency(2)
Master fSIOP(M) 1 1 fOP
Slave fSIOP(S) dc 1
Cycle time
1 Master tSCK(M) 1 1 tCYC
Slave tSCK(S) — 1
t1 t2
SCK
t5 t6
t3 t4
SDI
SDI SDI BIT 7
1. The numbers shown in the symbol column correspond to those shown in Figure 13-2.
(1)
(2) (3)
(4) (5)
NOTE: All timing is shown with respect to 20% and 70% VDD. Maximum rise and
fall times assume 44% duty cycle. Minimum rise and fall times assume
55% duty cycle.
MOTOROLA
tVDDR
VDD
VDD THRESHOLD (1–2 V TYPICAL)
OSC12
tCYC
INTERNAL
PROCESSOR
CLOCK1
INTERNAL
ADDRESS 3FFE 3FFF NEW PC NEW PC 3FFE 3FFE 3FFE 3FFE 3FFF NEW PC NEW PC
BUS1
INTERNAL
DATA NEW NEW OP PCH PCL OP
PCH PCL CODE CODE
BUS1
tRL
Electrical Specifications
RESET NOTE 3
Go to: www.freescale.com
For More Information On This Product,
Notes:
Freescale Semiconductor, Inc.
131
Advance Information
Control Timing (High-Speed MC68HC05P18 Only)
Electrical Specifications
Freescale Semiconductor, Inc.
Electrical Specifications
Freescale Semiconductor, Inc...
14.1 Contents
14.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133
Freescale Semiconductor, Inc...
14.2 Introduction
This section provides package dimension drawings for the 28-pin dual
in-line (DIP) or 28-pin small outline (SOIC) packages.
To make sure that you have the latest case outline specifications,
contact one of the following:
NOTES:
1. POSITIONAL TOLERANCE OF LEADS (D),
SHALL BE WITHIN 0.25mm (0.010) AT
MAXIMUM MATERIAL CONDITION, IN
RELATION TO SEATING PLANE AND
EACH OTHER.
28 15 2. DIMENSION L TO CENTER OF LEADS
WHEN FORMED PARALLEL.
3. DIMENSION B DOES NOT INCLUDE
B MOLD FLASH.
MILLIMETERS INCHES
1 14 DIM MIN MAX MIN MAX
A 36.45 37.21 1.435 1.465
A L B 13.72 14.22 0.540 0.560
C C 3.94 5.08 0.155 0.200
Freescale Semiconductor, Inc...
-A-
28 15 NOTES:
1. DIMENSIONING AND TOLERANCING PER
14X P ANSI Y14.5M, 1982.
-B- 0.010 (0.25) M B M 2. CONTROLLING DIMENSION: MILLIMETER.
3. DIMENSION A AND B DO NOT INCLUDE MOLD
PROTRUSION.
1 14 4. MAXIMUM MOLD PROTRUSION 0.15
(0.006) PER SIDE.
5. DIMENSION D DOES NOT INCLUDE
DAMBAR PROTRUSION. ALLOWABLE
28X D DAMBAR PROTRUSION SHALL BE 0.13
M (0.005) TOTAL IN EXCESS OF D
0.010 (0.25) M T A S B S
DIMENSION AT MAXIMUM MATERIAL
R X 45° CONDITION.
MILLIMETERS INCHES
-T- C DIM MIN MAX MIN MAX
A 17.80 18.05 0.701 0.711
-T- B 7.40 7.60 0.292 0.299
26X G SEATING C 2.35 2.65 0.093 0.104
PLANE
D 0.35 0.49 0.014 0.019
K
F F 0.41 0.90 0.016 0.035
G 1.27 BSC 0.050 BSC
J 0.23 0.32 0.009 0.013
J K 0.13 0.29 0.005 0.011
M 0° 8° 0° 8°
P 10.05 10.55 0.395 0.415
R 0.25 0.75 0.010 0.029
15.1 Contents
15.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135
Freescale Semiconductor, Inc...
15.2 Introduction
This section contains instructions for ordering the MC68HC05P18 and
the MC68HC805P18.
Appendix A. Emulation
A.1 Contents
A.2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .137
Freescale Semiconductor, Inc...
A.2 Introduction
This appendix discusses the functional differences between the P-series
devices. The MC68HC805P18 can be used to emulate these devices:
MC68HC05P1A MC68HC05P7
MC68HC05P2 MC68HC05P7A
MC68HC05P3 MC68HC05P8
MC68HC05P4 MC68HC05P9
MC68HC05P4A MC68HC705P9
MC68HC05P6 MC68HC05P10
MC68HC705P6 MC68HC05P18
0300-0EFF
3072 b
128 b 128 b
705P3 N 0020-004F N N
0080-00FF 0100-017F
0300-0EFF
R 4160 b
176 b
P4/P4A 0020-004F N N N N/Y
0050-00FF
0100-10FF
R 4672 b
176 b
P6 0020-004F N N N N
0050-00FF
0100-10FF*
4672 b
176 b
705P6 N 0020-004F N N N
0050-00FF
0100-12FF*
R 2112 b
128 b
P7/P7A 0020-004F N N N N/Y
0080-00FF
0100-08FF*
112 b R 2064 b 32 b
P8 N N N
0090-00FF 1680-1E7F 0030-004F
R 2112 b
128 b
P9/P9A 0020-004F N N N N/Y
0080-00FF
0100-08FF
2112 b
128 b
705P9 N 0020-004F N N N
0080-00FF
0100-08FF*
R 4160 b
128 b
P10 0020-004F N N N N
0080-00FF
0100-10FF
R 8064 b
192 b 128 b
P18 0020-004F N N N
0050-010F 0140-01BF
1FC0-3EFF
8064 b
192 b 128 b
805P18 N N 0020-004F Y
0050-010F 0140-01BF
1FC0-3EFF
0020–004F ROM ROM ROM/E ROM ROM ROM ROM ROM/E ROM ROM UEE
0030–004F EE
0080–008F RAM RAM RAM RAM RAM RAM RAM RAM RAM RAM
0090–009F RAM RAM RAM RAM RAM RAM RAM RAM RAM RAM RAM
Freescale Semiconductor, Inc...
00A0–00FF RAM RAM RAM RAM RAM RAM RAM RAM RAM RAM RAM RAM
1100–12FF ROM E
1300–167F ROM
1FC0–1FEF ROM ROM ROM ROM ROM ROM ROM ROM ROM UEE
3F00–3F01 UEE
3F02–3FEF ROM
NOTE: I/O registers are common to all parts so they are not included in the table. There are an additional 16 bytes
of user vectors in the memory map for each device.
P1A Y N N N Y
P2 Y N N N N
P4/P4A Y N N N N/Y
P7/P7A Y N N N N/Y
Freescale Semiconductor, Inc...
P8 Y N Y N N
P9/705P9/P9A Y/N/Y N/Y/N Y N N/N/Y
P10 Y N N N N
P1A Y N N Y Y
P2 Y N N N N
P3 N N N N N
P6 Y Y Y N Y
P10 Y N Y Y N
P18 N Y(1) Y Y Y
1. The MC68HC05P18 and MC68HC805P18 have selectable clock rates that are four times as fast as the MC68HC05P6
selectable rates.
Address: $0F
Bit 7 6 5 4 3 2 1 Bit 0
Write:
= Unimplemented
Freescale Semiconductor, Inc...
Address: $900
Bit 7 6 5 4 3 2 1 Bit 0
Write:
= Unimplemented
Address: $900
Bit 7 6 5 4 3 2 1 Bit 0
Write:
= Unimplemented
Address: $3F00
Bit 7 6 5 4 3 2 1 Bit 0
Write:
Reset: Unaffected by reset
= Unimplemented
Address: $3F01
Bit 7 6 5 4 3 2 1 Bit 0
Write:
= Unimplemented