AN1827 Freescale Semiconductor / Motorola, AN1827 Datasheet - Page 58
![no-image](/images/no-image-200.jpg)
AN1827
Manufacturer Part Number
AN1827
Description
Programming and Erasing FLASH Memory on the MC68HC908AS60
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
1.AN1827.pdf
(60 pages)
- Current page: 58 of 60
- Download datasheet (400Kb)
Application Note
/*
/*
/*
/*
/*
/**********************************************************************************/
unsigned char Prog8Bytes ()
{
58
Initializations required:
Values returned:
Set charge pump clock in FLCR1 and FLCR2; FLASH_addr set; data
buffer filled
unsigned char Blk_Protect1;
unsigned char Blk_Protect2;
unsigned char byte,status;
DisableInterrupts;
attempt=0;
Program Success/Error Flag
do {
writeFLCR (PGM);
Blk_Protect1 = FLBPR1;
Blk_Protect2 = FLBPR2;
for (byte=0;byte<8;byte++)
writeFLCR (HVEN);
Delay (tSTEP);
writeFLCR (HVEN);
Delay (tHVTV);
status=0;
writeFLCR (MARGIN);
Delay (tVTP);
writeFLCR (PGM);
Delay (tHVD);
*(FLASH_addr+byte)=data[byte];
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
/* set up local variables
/* No interrupts allowed during
/*
/* Step 1 - Clear attempt counter
/* Set up Repeat Loop
/* Step 2 - Set the PGM bit
/* Step 3 - Read from the block
/*
/* Step 4 - Copy the 8 bytes of data
/*
/*
/* Step 5 - Set the HVEN bit
/* Step 6 - Wait for time tSTEP
/* Step 7 - Clear the HVEN bit
/* Step 8 - Wait for time tHVTV
/* Step 9 - Set the MARGIN bit
/* Step 10 - Wait for time tVTP
/* Step 11 - Clear the PGM bit
/* Step 12 - Wait for time tHVD
appropriate FLASH locations
protect registers
from the RAM buffer to the
programming
MOTOROLA
AN1827
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
Related parts for AN1827
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![AN177](/images/no-image3.png)
Part Number:
Description:
An Overview og the Phase Locked Loop
Manufacturer:
Philips
Datasheet:
![AN1268](/images/manufacturer_photos/0/6/637/stmicroelectronics_tmb.jpg)
Part Number:
Description:
AN OVERVIEW OF THE LPC FLASH INTERFACE
Manufacturer:
STMicroelectronics
![AN1315](/images/no-image3.png)
Part Number:
Description:
An Evaluation System Interfacing the MPX2000 Series Pressure Sensors to a Microprocessor
Manufacturer:
Motorola / Freescale Semiconductor
![AN1998](/images/no-image3.png)
Part Number:
Description:
An FM-IF system for DECT and other high speed GFSK applications
Manufacturer:
Philips Semiconductors / NXP Semiconductors
![AN2124](/images/no-image3.png)
Part Number:
Description:
An 8 x 8 Discrete Cosine Transform on the StarCore SC140/SC1400 Cores
Manufacturer:
Freescale Semiconductor / Motorola
![AN2428](/images/no-image3.png)
Part Number:
Description:
An Overview of the HCS12 ATD Module
Manufacturer:
Freescale Semiconductor / Motorola
![AN2708](/images/no-image3.png)
Part Number:
Description:
An Introduction to the External Bus Interface on the HCS12X
Manufacturer:
Freescale Semiconductor / Motorola
![AN2783](/images/no-image3.png)
Part Number:
Description:
An RF Data Link Using Tango3 and Romeo2 RF Modules
Manufacturer:
Freescale Semiconductor / Motorola
![MC33394DH](/images/manufacturer_photos/0/2/262/freescale_semiconductor_tmb.jpg)
Part Number:
Description:
IC POWER SUPPLY MULT-OUT 44-HSOP
Manufacturer:
Freescale Semiconductor
Datasheet:
![MC33394DWB](/images/manufacturer_photos/0/2/262/freescale_semiconductor_tmb.jpg)
Part Number:
Description:
IC POWER SUPPLY MULT-OUT 54-SOIC
Manufacturer:
Freescale Semiconductor
Datasheet:
![MSC7110](/images/no-image3.png)
Part Number:
Description:
Low-Cost 16-Bit DSP with DDR Controller
Manufacturer:
Freescale Semiconductor / Motorola
![MSC7116](/images/no-image3.png)
Part Number:
Description:
Low-Cost 16-bit DSP with DDR Controller and 10/100 Mbps Ethernet MAC
Manufacturer:
Freescale Semiconductor / Motorola
Datasheet:
![MSC7119](/images/no-image3.png)
Part Number:
Description:
Low-Cost 16-bit DSP with DDR Controller and 10/100 Mbps Ethernet MAC
Manufacturer:
Freescale Semiconductor / Motorola
Datasheet:
![MSC7118](/images/no-image3.png)
Part Number:
Description:
Low-Cost 16-bit DSP with DDR Controller
Manufacturer:
Freescale Semiconductor / Motorola
Datasheet:
![MSC8101](/images/no-image3.png)
Part Number:
Description:
Functional Pin Difference Between the MSC8101 and MPC8260 Communications Processor Modules
Manufacturer:
Freescale Semiconductor / Motorola