Explanation of procedures and functions :
{ Erase ...( depends of MCU ) block at address ... (64 or 1024 bytes, see datasheet of MCU)}
{ For PIC18F452,Pic18F4520, ..., PIC18FxxJxx }
Code: Select all
procedure Flash_Mem_Erase(address : longint);
{ Only for PIC18Fxx2 series, see datasheet of MCU }
Code: Select all
procedure Flash_Mem_Write_8(address : longint; var data : array[8] of byte);
{ Write 64 bytes block at address ... }
{ Only for PIC18F4520, ..., PIC18FxxJxx, see datasheet of MCU }
Code: Select all
procedure Flash_Mem_Write_64(address : longint; var data : array[64] of byte);
{ Only for PIC18Fxx2 series, see datasheet of MCU }
Code: Select all
procedure Flash_Mem_Erase_Write_64(address : longint; var data : array[64] of byte);
{ Only for PIC18F4520 series, see datasheet of MCU }
Code: Select all
procedure Flash_Mem_Erase_Write_64A(address : longint; var data : array[64] of byte);
{ Only for PIC18FxxJxx, see datasheet of MCU }
Code: Select all
procedure Flash_Mem_Erase_Write_1024(address : longint; var data : array[1024] of byte);
{ For all type of MCU }
Code: Select all
function Flash_Mem_Read(address : longint): byte;
{ For all type of MCU }
Code: Select all
procedure Flash_Mem_Read_N_Bytes(address : longint; var data : array[max_read] of byte; N : word);
User must choose between this procedures and functions depending of MCU.
The souurce cod You can download here:
http://www.microelemente.ro/Flash_Mem_Library.zip
Enjoy
Best regards Florin Medrea