AN1836 Motorola / Freescale Semiconductor, AN1836 Datasheet - Page 11

no-image

AN1836

Manufacturer Part Number
AN1836
Description
FLASH Programming for Motorola MC68HC912 Microcontrollers
Manufacturer
Motorola / Freescale Semiconductor
Datasheet
;-----------------------------------------------------
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
AN1836
MOTOROLA
FLASH EEPROM program routine
MC68HC912B32 1.5T FLASH Module
Rev. 1.2
Rev. 1.0 - April 23,1998
Written November 6, 1997
by Matt Ruff, BE/OS Systems Engineering
This code is intended for instructional use
only.
or modification of this code.
responsibility of the user to verify all
parameters, variables, timings, etc.
Fixed Tppulse = 25us and Tvprog = 10us
ASSEMBLER:
Application Note Source Code for AN1836
Created Bit Name Labels for easier reading---
Streamlined Code for efficiency
NOTE:
Motorola assumes no liability for use ---
Erasing and Programming the FLASH
EEPROM on the MC68HC912B32
February 9, 2000
The following code segment adheres to the recommended procedure for
programming the FLASH array. The flowchart in
same procedure. The general idea is to set the programming latches,
write the desired byte/word to the location in the array, apply the
programming voltage to the FLASH module within the chip (by setting
the ENPE bit), then to make sure the location is programmed properly.
If the data is correct, then the number of times the programming voltage
was applied to get this byte programmed will have been preserved in the
N
again to ensure that the byte/word remains programmed. This is a 100
percent programming margin. This whole process is repeated for each
byte/word to be programmed. The next code segment simply copies a
string of characters from RAM and stores it at the beginning of the
FLASH array.
The source code for this application note is available on Motorola’s Web
site at http://www.motorola.com/sps.
In the following code, the STEP comments refer to the steps shown at
the beginning of this section. Some steps in the code do not correspond
directly to the programming algorithm, but are included simply to provide
output to the indicator LEDs to show the user the status of the program.
IASM12 v. 3.06
P & E Microcomputer Systems---
PP
variable. The programming voltage is then pulsed that many times
It is the
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
Programming the FLASH Array
Figure 7
Application Note
outlines this
11

Related parts for AN1836