Application Note
AN1060 — Rev. 1.0
250
MOTOROLA
47 * MEMORY CONFIGURATION EQUATES
48 *
49 B600 EEPMSTR EQU $B600 Start of EEPROM
50 B7FF EEPMEND EQU $B7FF End of EEPROM
51 *
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
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.