Mikroelektronika MIKROE-724 データシート
342
mikoBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
FLASH_Write_Loadlatch4
Prototype
sub procedure FLASH_Write_Loadlatch4()
Description Loads the current RTSP write latch with data (4 instructions, 8 addresses, 12 bytes). The data is filled
in the “regular” mode.
Parameters None.
Returns
Returns
Nothing.
Requires
The block to be written to must be erased first, either from the user code FLASH_Erase32, or during
the programming of MCU. Please note that block size that is to be erased is different from the one that
can be written with this function!
This function is used as a part of the Flash write sequence, therefore the FLASH_Write_Init function
must be called before this one.
This function can be called several times before commiting the actual write-to-Flash operation FLASH_
Write_DoWrite. This depends on the organization of the RTSP module for the certain dsPIC30. Please
consult the Datasheet for particular dsPIC30 on this subject.
Example
const iArr as word[8] = (“m”, “i”, “k”, “r”, “o”, “E”, “l”, “e”)
dim ptr_data as word
...
ptr_data = @iArr
FLASH_Write_Init(0x006100, ptr_data)
FLASH_Write_Loadlatch4()
FLASH_Write_Loadlatch4()
FLASH_Write_DoWrite()
Notes
None.