AN2156 Freescale Semiconductor / Motorola, AN2156 Datasheet - Page 65

no-image

AN2156

Manufacturer Part Number
AN2156
Description
Programming and Erasing FLASH and EEPROM Memories on the MC68HC908AS60A/AZ60A
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Copy_Loop:
Copy_End:
AN2156
MOTOROLA
;
; Delay Evaluation: Point E8
;
;-------------------------------------------------------------
;- tPROG is defined as the total time from writing one data
;- byte to writing the next data byte. (labelled "A" below). -
;- For the last byte programmed, tPROG is defined as the
;- time from writing the data byte ("A") to clearing the PGM -
;- bit (in the WriteFLCR routine). Both of these loops
;- should be executed in a time between 30 and 40 us.
;-
;- The byte-to-next-byte time is 75 cycles (30.5 us).
;- The byte-to-PGM time is 77 cycles (31.3 us).
;-------------------------------------------------------------
;-----------------------------------------------------------------;
; Delay Time byte-to-next-byte Evaluation
; starting from point S9 to point E9)
;
;-----------------------------------------------------------------;
; Delay Evaluation: Point S9, E9
;
;-----------------------------------------------------------------;
; Delay Time byte-to-PGM Evaluation
; E10_1 & time between points S10 and E10_2)
;
;-----------------------------------------------------------------;
; Delay Evaluation: Point S10
;
bclr
lda
dbnza *
bset
ldhx
lda
aix
sthx
ldhx
sta
Measure low level period on Port D bit 3 pin using a scope
com
Measure low level period on Port D bit 3 pin using a scope
bclr
lda
dbnza *
dec
beq
aix
sthx
bra
lda
dbnza *
3,PTD
#$4
3,PTD
Buffer_addr
,x
#$1
Buffer_addr
FLASH_addr
,x
PTD
3,PTD
#$0d
size
Copy_End
#$1
FLASH_addr
Copy_Loop
#$2
Freescale Semiconductor, Inc.
For More Information On This Product,
;Clear Port D bit 3
;Step 6 - Wait for time tPGS
; 2 + (3 x 4) cycles = 14 cycles (5.7us)
;Set Port D bit 3
;Step 7 - Copy one byte data from the
; RAM buffer to the appropriate FLASH
; location
;Increment Buffer_addr for next byte
; write
;Write the Data Byte ("A")
;Complement Port D bit 3
;Clear Port D bit 3
;Step 8 - Delay, part of tPROG
;Step 9 - Repeat step 7 and 8 until all
; the bytes within the row are programmed
;Increment FLASH_addr for next byte
; write
;Step 8 - Delay, part of tPROG
Go to: www.freescale.com
(Time between points S10 and ;
(one loop period
-
-
-
-
-
-
-
FLASH Assembly Source Code
;
;
;
;
;
Application Note
65

Related parts for AN2156