MC68HC711E20CFS2 MOTOROLA [Motorola, Inc], MC68HC711E20CFS2 Datasheet - Page 252

no-image

MC68HC711E20CFS2

Manufacturer Part Number
MC68HC711E20CFS2
Description
Microcontrollers
Manufacturer
MOTOROLA [Motorola, Inc]
Datasheet
Application Note
150
151
152
153
154
155 BF54
156 BF54 8E01FF
157 BF57 CE1000
158 BF5A 1C2820
159 BF5D CCA20C
160 BF60 A72B
161
162 BF62 E72D
163 BF64 CC021B
164 BF67 ED16
165
166
167 BF69 1C2D01
168 BF6C 1E0801FC
169 BF70 1D2D01
170 BF73
171 BF73 1F2E20FC
172 BF77 A62F
173
174 BF79 2603
175 BF7B 7EB600
176 BF7E
177 BF7E 81FF
178 BF80 2708
179
180 BF82 1C2B33
181 BF85 CC0DB0
182 BF88 ED16
183 BF8A
184 BF8A 18CE0000
185
186 BF8E
187 BF8E EC16
188 BF90
189 BF90 1E2E2007
190 BF94 8F
191 BF95 09
192 BF96 8F
193 BF97 26F7
194 BF99 200F
195
196 BF9B
197 BF9B A62F
198 BF9D 18A700
199 BFA0 A72F
200 BFA2 1808
201 BFA4 188C0200
202 BFA8 26E4
252
****************************************************
* Main bootloader starts here
****************************************************
* RESET vector points to here
BEGIN
* Writing 1 to MSB of BAUD resets count chain
* Send BREAK to signal ready for download
* Data will be $00 if BREAK OR $00 received
NOTZERO
* Or else change to ÷104 (÷13 & ÷8) 1200 @ 2MHZ
BAUDOK
WAIT
WTLOOP
NEWONE
Freescale Semiconductor, Inc.
For More Information On This Product,
EQU
LDS
LDX
BSET
LDD
STAA
STAB
LDD
STD
BSET
BRSET
BCLR
BRCLR
LDAA
BNE
JMP
EQU
CMPA
BEQ
BSET
LDD
STD
EQU
LDY
EQU
LDD
EQU
BRSET
XGDX
DEX
XGDX
BNE
BRA
EQU
LDAA
STAA
STAA
INY
CPY
BNE
Go to: www.freescale.com
*
#RAMEND
#$1000
SPCR,X $20
#$A20C
BAUD,X
SCCR2,X
#DELAYF
TOC1,X
SCCR2,X $01
PORTD,X $01 *
SCCR2,X $01
SCSR,X $20 *
SCDAT,X
NOTZERO
EEPMSTR
*
#$FF
BAUDOK
BAUD,X $33
#DELAYS
TOC1,X
*
#RAMSTR
*
TOC1,X
*
SCSR,X $20 NEWONE
WTLOOP
STAR
*
SCDAT,X
$00,Y
SCDAT,X
#RAMEND+1
WAIT
Initialize stack pntr
Point at internal regs
Select port D wire-OR mode
BAUD in A, SCCR2 in B
SCPx = ÷4, SCRx = ÷4
Rx and Tx Enabled
Delay for fast baud rate
Set as default delay
Set send break bit
Wait for RxD pin to go low
Clear send break bit
Wait for RDRF
Read data
Bypass JMP if not 0
Jump to EEPROM if it was 0
$FF will be seen as $FF
If baud was correct
Works because $22 -> $33
And switch to slower...
delay constant
Point at start of RAM
Move delay constant to D
Swap delay count to X
Decrement count
Swap back to D
Loop if not timed out
Quit download on timeout
Get received data
Store to next RAM location
Transmit it for handshake
Point at next RAM location
See if past end
If not, Get another
Exit loop if RDRF set
AN1060 — Rev. 1.0
MOTOROLA

Related parts for MC68HC711E20CFS2