AN2295 Freescale Semiconductor / Motorola, AN2295 Datasheet - Page 29

no-image

AN2295

Manufacturer Part Number
AN2295
Description
Developers Serial Bootloader for M68HC08 and HCS08 MCUs
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
BRKDONE:
FAST:
SLOW:
ICGDONE:
OOR:
The complete explanation of the trimming procedure can be found in AN1831/D see References.
MC68HC908JK/JL
MC68HC908JK/JL MCUs are among the least expensive in the M68HC08 Family, and they have no
hardware SCI. Therefore a software SCI must be implemented. This allows the unrestricted selection of
which pins are used for serial communication (the provisions are made in the code that an IRQ pin can
be used as an input serial line, too).
The MC68HC908JK/JL Family has an RC version (an RC oscillator is used instead of a crystal). The
bootloader’s calibration compensates for any variation in speed. If the desired clock frequency is outside
of the specified range covered by the calibration system, the code must be modified.
The MC68HC908JK/JL Family has on-chip FLASH programming routines. Using FLASH programming
saves memory.
The main program flowchart (shown in
Freescale Semiconductor
PSHH
PULA
TSTA
TXA
BEQ
CMP
BGE
ASLA
ADD
BRA
CMP
BLT
ASLA
SUB
STA
RTS
SLOW
#$40
OOR
#$80
ICGDONE
#$C0
OOR
#$80
ICGTR
Developer’s Serial Bootloader for M68HC08 and HCS08 MCUs, Rev. 6
;PUT HIGH BYTE IN ACC AND WORK WITH A:X
;IF MSB OF LOOP CYCLES = 0, THEN BREAK TAKES TOO
;FEW CYCLES THAN EXPECTED, SO TRIM BY SPEEDING
;UP f OP .
;SEE IF BREAK IS WITHIN TOLERANCE
;DON'T TRIM IF OUT OF RANGE
;multiply by two to get right range
;BREAK LONGER THAN EXPECTED, SO SLOW DOWN f OP
;SEE IF BREAK IS WITHIN TOLERANCE
;DON'T TRIM IF OUT OF RANGE
;multiply by two to get right range
Figure
19) is very similar to the previous case.
MCU Slave Software
29

Related parts for AN2295