Mikroelektronika MIKROE-724 データシート
320
mikoBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
EEPROM_Erase
EEPROM_Erase_Block
EEPROM_Read
Prototype
sub procedure EEPROM_Erase(dim address as longint)
Description Erases a single (16-bit) location from EEPROM memory.
Parameters -
Parameters -
address
: address of the EEPROM memory location to be erased.
Returns
Nothing.
Requires
Nothing.
Example
dim eeAddr as longint
...
eeAddr = 0x7FFC80
EEPROM_Erase(eeAddr)
Notes
CPU is not halted for the Data Erase cycle. The user can poll WR bit, use NVMIF or Timer IRQ to
detect the end of erase sequence.
Prototype
sub procedure EEPROM_Erase_Block(dim address as longint)
Description Erases one EEPROM row from EEPROM memory; For dsPIC30 family it is 16 words long, for
24F04KA201 and 24F16KA102 family it is 8 words long.
Parameters -
address
: starting address of the EEPROM memory block to be erased.
Returns
Nothing.
Requires
Nothing.
Example
dim eeAddr as longint
...
eeAddr = 0x7FFC20
EEPROM_Erase_Block(eeAddr)
Notes
CPU is not halted for the Data Erase cycle. The user can poll WR bit, use NVMIF or Timer IRQ to
detect the end of erase sequence.
Prototype
sub function EEPROM_Read(dim address as longint) as word
Description Reads data from specified
address
.
Parameters -
address
: address of the EEPROM memory location to be read.
Returns
Word from the specified address.
Requires
It is the user’s responsibility to obtain proper address parity (in this case, even).
Example
dim eeAddr as longint
temp as word
...
eeAddr = 0x7FFC20
temp = EEPROM_Read(eeAddr)
Notes
None.