User manual
mikroPascal PRO for dsPIC30/33 and PIC24
MikroElektronika
343
FLASH_Read4_Compact
FLASH_Erase
PIC24 and dsPIC33 Functions
Prototype
procedure FLASH_Read4_Compact(ash_address : longint; write_to : word);
Description Reads one latch row (4 instructions, 8 addresses) in the “compact” mode.
Parameters - address: starting address of the FLASH memory block to be read
- write_to: starting address of RAM buffer for storing read data
Returns Starting address of RAM buffer for storing read data.
Requires Nothing.
Example
var ash_address : longint;
cArr : array[8] of word;
ptr_data : word;
...
ash_address := 0x006000;
ptr_data := @cArr;
FLASH_Read4_Compact(ash_address, ptr_data);
Notes The user should take care of the address alignment (see the explanation at the beginning of this
page).
Prototype
procedure FLASH_Erase(address : longint);
Description Erases one block (512 instructions, 1024 addresses, 1536 bytes) from the program FLASH memory.
Parameters - address: starting address of the FLASH memory block
Returns Nothing.
Requires Nothing.
Example
//--- erase the ash memory block, starting from address 0x006400
var ash_address : longint;
...
ash_address := 0x006400;
FLASH_Erase(ash_address);
Notes The user should take care about the address alignment (see the explanation at the beginning of this
page).