SW500009 Microchip Technology, SW500009 Datasheet - Page 205

HI-TECH FOR DSPIC/PIC24

SW500009

Manufacturer Part Number
SW500009
Description
HI-TECH FOR DSPIC/PIC24
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC24 & DsPICr
Datasheet

Specifications of SW500009

Supported Families
PIC24
Core Architecture
PIC, DsPIC
Software Edition
Standard
Kit Contents
Software And Docs
Tool Type
Compiler
Mcu Supported Families
PIC24 MCUs And DsPIC DSCs
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
DSPIC3X/PIC24
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
025
778-1003
778-1003
Library Functions
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.
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);
191

Related parts for SW500009