SW500007 Microchip Technology, SW500007 Datasheet - Page 215

PICC-18 PRO

SW500007

Manufacturer Part Number
SW500007
Description
PICC-18 PRO
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC18r
Datasheets

Specifications of SW500007

Supported Families
PIC18
Core Architecture
PIC
Software Edition
Professional
Kit Contents
Software And Docs
Mcu Supported Families
PIC18
Tool Function
Compiler
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
PIC18 Series
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
015P
778-1002
778-1002
Library Functions
Return Value
flash_read() returns the data found at the given address, as an unsigned char.
Note
The flash_write() function can be used to update anywhere from 1 to 65535 bytes of data at a time,
however it is more efficient to write in data lengths that are multiples of that device’s erase block
size.
Ensure that the function does not attempt to overwrite the section of program memory from which
it is currently executing and extreme caution must be exercised if modifying code at the device’s
reset or interrupt vectors. A reset or interrupt must not be triggered while this sector is in erasure.
For PIC18FxxJxx parts, care must also be taken to ensure that a reset does not occur during a write
targetting the last 1024 bytes of program space as this region also contains the device’s configuration
values.
}
// Read a byte of data from flash address 1000h
data = flash_read(0x1000);
// Copy data from source to destination in flash.
// source does not have be in flash.
// Any required flash erasures done internally.
flash_write(source, length, dest);
// Erase block containing the address 4000h
flash_erase(0x4000);
201

Related parts for SW500007