Flash Mem Library
Posted: 24 Jun 2007 22:24
This is a implementations of Flash Library for PIC18F MCU, writed by me.
Explanation of procedures and functions :
' Erase ...( depends of MCU ) block at address ... (64 or 1024 bytes, see datasheet of MCU)'
' For PIC18F452,Pic18F4520, ..., PIC18FxxJxx '
' Write 8 bytes block at address ... '
' Only for PIC18Fxx2 series, see datasheet of MCU '
' Write 64 bytes block at address ... '
' Only for PIC18F4520, ..., PIC18FxxJxx, see datasheet of MCU '
' Erase and write 64 bytes 8x8 block at address ... '
' Only for PIC18Fxx2 series, see datasheet of MCU '
' Erase and write 64 bytes block at address ... '
' Only for PIC18F4520 series, see datasheet of MCU '
' Erase and write 1024 bytes block at address ... '
' Only for PIC18FxxJxx, see datasheet of MCU '
' Read 1 byte at address ... '
' For all type of MCU '
' Read N bytes (user can define this) at address ... and put them in data dim... '
' For all type of MCU '
User must choose between this procedures and functions depending of MCU.
The source cod You can download here:
http://www.microelemente.ro/MikroBasic/ ... ibrary.zip
Enjoy
Best regards Florin Medrea
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
sub procedure Flash_Mem_Erase(dim address as longint)
' Only for PIC18Fxx2 series, see datasheet of MCU '
Code: Select all
sub procedure Flash_Mem_Write_8(dim address as longint, dim byref data as byte[8])
' Only for PIC18F4520, ..., PIC18FxxJxx, see datasheet of MCU '
Code: Select all
sub procedure Flash_Mem_Write_64(dim address as longint, dim byref data as byte[64])
' Only for PIC18Fxx2 series, see datasheet of MCU '
Code: Select all
sub procedure Flash_Mem_Erase_Write_64(dim address as longint, dim byref data as byte[64])
' Only for PIC18F4520 series, see datasheet of MCU '
Code: Select all
sub procedure Flash_Mem_Erase_Write_64A(dim address as longint, dim byref data as byte[64])
' Only for PIC18FxxJxx, see datasheet of MCU '
Code: Select all
sub procedure Flash_Mem_Erase_Write_1024(dim address as longint, dim byref data as byte[1024])
' For all type of MCU '
Code: Select all
sub function Flash_Mem_Read(dim address as longint) as byte
' For all type of MCU '
Code: Select all
sub procedure Flash_Mem_Read_N_Bytes(dim address as longint, dim byref data as byte[max_read], N as word)
User must choose between this procedures and functions depending of MCU.
The source cod You can download here:
http://www.microelemente.ro/MikroBasic/ ... ibrary.zip
Enjoy
Best regards Florin Medrea