English
Language : 

MC68HC11E0CFNE3 Datasheet, PDF (223/242 Pages) Freescale Semiconductor, Inc – M68HC11E Family
Listing 3. MC68HC711E9 Bootloader ROM
52 D000
EPRMSTR EQU $D000
Start of EPROM
53 FFFF
EPRMEND EQU $FFFF
End of EPROM
54
*
55 0000
RAMSTR EQU $0000
56 01FF
RAMEND EQU $01FF
57
58
* DELAY CONSTANTS
59
*
60 0DB0
DELAYS EQU 3504
Delay at slow baud
61 021B
DELAYF EQU 539
Delay at fast baud
62
*
63 1068
PROGDEL EQU 4200
2 ms programming delay
64
*
At 2.1 MHz
65
66
****************************************************
67 BF00
ORG $BF00
68
****************************************************
69
70
* Next two instructions provide a predictable place
71
* to call PROGRAM and UPLOAD even if the routines
72
* change size in future versions.
73
*
74 BF00 7EBF13 PROGRAM JMP PRGROUT
EPROM programming utility
75 BF03
UPLOAD EQU *
Upload utility
76
77
****************************************************
78
* UPLOAD - Utility subroutine to send data from
79
* inside the MCU to the host via the SCI interface.
80
* Prior to calling UPLOAD set baud rate, turn on SCI
81
* and set Y=first address to upload.
82
* Bootloader leaves baud set, SCI enabled, and
83
* Y pointing at EPROM start ($D000) so these default
84
* values do not have to be changed typically.
85
* Consecutive locations are sent via SCI in an
86
* infinite loop. Reset stops the upload process.
87
****************************************************
88 BF03 CE1000
LDX #$1000
Point to internal registers
89 BF06 18A600 UPLOOP LDAA 0,Y
Read byte
90 BF09 1F2E80FC
BRCLR SCSR,X $80 * Wait for TDRE
91 BF0D A72F
STAA SCDAT,X
Send it
92 BF0F 1808
INY
93 BF11 20F3
BRA UPLOOP
Next...
94
95
****************************************************
96
* PROGRAM - Utility subroutine to program EPROM.
97
* Prior to calling PROGRAM set baud rate, turn on SCI
98
* set X=2ms prog delay constant, and set Y=first
99
* address to program. SP must point to RAM.
100
* Bootloader leaves baud set, SCI enabled, X=4200
101
* and Y pointing at EPROM start ($D000) so these
102
* default values don't have to be changed typically.
103
* Delay constant in X should be equivalent to 2 ms
104
* at 2.1 MHz X=4200; at 1 MHz X=2000.
105
* An external voltage source is required for EPROM
106
* programming.
M68HC11 Bootstrap Mode, Rev. 1.1
Freescale Semiconductor
223