AN1836 Motorola / Freescale Semiconductor, AN1836 Datasheet - Page 20

no-image

AN1836

Manufacturer Part Number
AN1836
Description
FLASH Programming for Motorola MC68HC912 Microcontrollers
Manufacturer
Motorola / Freescale Semiconductor
Datasheet
Application Note
VerifyBad:
;-----------------------------------------------------------------------
;-----------------------
;-----------------------------------------------------------------------
Error:
Blink:
;-----------------------------------------------------------------------
;----------------------
;-----------------------------------------------------------------------
dly_500ms:
dly_10ms:
;-----------------------------------------------------------------------
;---
;---
;---
;---
;-----------------------------------------------------------------------
DelaymS:
DlyLoop1mS:
DlyLoop:
20
Call with the number of mS to delay in the D accumulator.
The delay is not exact, but close enough when delaying ms.
Millisecond Delay Routine
DBNE
INC
RTS
CLR
MOVB
MOVB
BSR
MOVB
BSR
BRA
LDD
BSR
RTS
LDD
BSR
RTS
LDX
NOP
DBNE
DBNE
RTS
END
Delay Subroutines
Error Subroutine
Y,CheckLoop
ErasedFlag
PORTA
#$FF,DDRA
#$01,PORTA
dly_500ms
#$00,PORTA
dly_500ms
Blink
#500
DelaymS
#10
DelaymS
#mS1Delay
X,DlyLoop
D,DlyLoop1mS
-----------------------
; Yes, Dec the word count, if not done check
; the next word.
; All words checked & are erased. Set
; ErasedFlag.
;Clear Port A
;Set DDRA to outputs
;Turn PA0 on for error output
;Delay so blinking is visible (1/2 second
; between flashes)
;Turn PA0 off
;Repeat ad nauseam....
;Delay for 500ms
;Delay for 10ms
;Load 1ms delay count into X
;Decrement count
;Loop until done.
----------------------
---
---
---
---
MOTOROLA
AN1836

Related parts for AN1836