AN2398 Freescale Semiconductor / Motorola, AN2398 Datasheet - Page 25

no-image

AN2398

Manufacturer Part Number
AN2398
Description
In-Circuit Programming of FLASH Memory via the Universal Serial Bus for the MC68HC908JB8
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Block_Erase:
* --------------------------------------------------------------------- *
* Note :
*
*
* --------------------------------------------------------------------- *
Blk_Erase_Time:
Blk_Erase_Exit:
;*------------------------------------------------------------------------
;* Delay 8us
;* Note: Fcpu = 3MHz, Tcpu = 0.333ms
;*
;*------------------------------------------------------------------------
Dly_8us:
;
Dly_8us_Exit:
Blk_Erase_Lenequ(Dly_8us_Exit - Block_Erase)
;
;*------------------------------------------------------------------
;* ======================================================================
;
KBD_INT
TOF_INT
TCH1_INT
TCH0_INT
IRQ1_INT
USB_INT
SWI_INT
;
PROG_END:
MOTOROLA
ORG
dc
ORG
END
Delay time = [3a + 7] cycles = 25 cycles = 8.333ms
Fcpu = 3MHz, Tcpu = 0.333us
Delay time = [25(x+3) + 2]cycles
In-Circuit Programming of FLASH Memory via the USB for the MC68HC908JB8
sta
sta
bsr
lda
sta
ldx
bsr
dbnzx
ldhx
lda
sta
bsr
clr
rts
lda
dbnza
rts
INCLUDE
INCLUDE
INCLUDE
INCLUDE
$FFE6
$01,$02,$03,$04,$05,$06,$07,$08
VECTORS
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
dc.w
= 2000us
FLCR
,x
Dly_8us
#%00001010
FLCR
#237
Dly_8us
Blk_Erase_Time
#FLCR
#%00001000
,x
Dly_8us
,x
#6
$
"icp-int-asm.h"
"icp-proc-asm.h"
"usb-icp.h"
"appvector.h"
JMP_KBD_ISR
JMP_TOF_ISR
JMP_TCH1_ISR
JMP_TCH0_ISR
JMP_IRQ_ISR
JMP_USB_ISR
JMP_SWI_ISR
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
; set b_ERASE
; set b_HVEN
;(2)
;[25]
;(3)
; wait for 5us
; bsr Dly_8ms needs (4) cycles
; [3]
; (3)
; KBD interrupt vector
; TIM overflow interrupt vector
; TIM Ch_1 interrupt vector
; TIM Ch_0 interrupt vector ($FFF6)
; IRQ1 interrupt vector ($FFF8)
; USB device interrupt vector ($FFFA)
; SWI interrupt vector ($FFFC)
APPENDIX: Code Listing
AN2398/D
25

Related parts for AN2398