Mikroelektronika MIKROE-350 Fiche De Données
FLASH_Read_Bytes
FLASH_Read_Word
215
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
Prototype
' for MCUs with 64kb of Flash memory or less
sub procedure FLASH_Read_Bytes(dim address as word, dim buffer as
^byte, dim NoBytes as word)
sub procedure FLASH_Read_Bytes(dim address as word, dim buffer as
^byte, dim NoBytes as word)
' for MCUs with Flash memory larger than 64kb
sub procedure FLASH_Read_Bytes(dim address as longword, dim
buffer
sub procedure FLASH_Read_Bytes(dim address as longword, dim
buffer
as ^byte, dim NoBytes as word)
Returns
Nothing.
Description
Reads number of data bytes defined by NoBytes parameter from the specified
address in Flash memory to varibale pointed by buffer.
address in Flash memory to varibale pointed by buffer.
Requires
Nothing.
Example
'for MCUs with Flash memory larger than 64kb
const F_ADDRESS as longint = 0x200
dim dat_buff[32]
const F_ADDRESS as longint = 0x200
dim dat_buff[32]
as word
...
FLASH_Read_Bytes(F_ADDRESS,dat_buff, 64)
Prototype
' for MCUs with 64kb of Flash memory or less
sub function FLASH_Read_Word(dim address as word) as word
sub function FLASH_Read_Word(dim address as word) as word
' for MCUs with Flash memory larger than 64kb
sub function FLASH_Read_Word(dim address as longword) as word
sub function FLASH_Read_Word(dim address as longword) as word
Returns
Returns data word from Flash memory.
Description
Reads data from the specified address in Flash memory.
Requires
Nothing.
Example
' for MCUs with Flash memory larger than 64kb
dim tmp as longword
...
tmp = Flash_Read(0x0D00)
...
dim tmp as longword
...
tmp = Flash_Read(0x0D00)
...