SW500010 Microchip Technology, SW500010 Datasheet - Page 226

HI-TECH C PRO FOR PIC10/12/16

SW500010

Manufacturer Part Number
SW500010
Description
HI-TECH C PRO FOR PIC10/12/16
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC10/12/16r
Datasheets

Specifications of SW500010

Supported Families
PIC10, PIC12, PIC16
Core Architecture
PIC
Software Edition
Professional
Kit Contents
Software And Docs
Mcu Supported Families
PIC10/12/16
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
PIC10, PIC12, PIC14, PIC16, PIC16E
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
019P
778-1006
778-1006
FLASH_ERASE(), FLASH_READ()
Synopsis
Description
These functions allow access to the flash memory of the microcontroller (if supported).
function. flash_read() returns the data value found at the specified word address in flash memory.
flash_erase() function. Specifying an address to the flash_erase() function, will erase all 32 words
in the sector that contains the given address.
Example
Return Value
flash_read() returns the data found at the given address, as an unsigned int.
226
Reading from the flash memory can be done one word at a time with use of the flash_read()
Entire sectors of 32 words can be restored to an unprogrammed state (value=FF) with use of the
#include <htc.h>
void flash_erase (unsigned short addr);
unsigned int flash_read (unsigned short addr);
#include <htc.h>
void
main (void)
{
}
unsigned int data;
unsigned short address=0x1000;
data = flash_read(address);
flash_erase(address);
Library Functions

Related parts for SW500010