Mikroelektronika MIKROE-742 데이터 시트

다운로드
페이지 532
FLASH_Read_Bytes
FLASH_Read_Word
231
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6
Prototype
// for MCUs with 64kb of Flash memory or less
procedure FLASH_Read_Bytes(address : word; buffer : ^byte;
NoBytes : word); 
// for MCUs with Flash memory larger than 64kb
procedure FLASH_Read_Bytes(address : dword; buffer : ^byte;
NoBytes : word)
Returns
Nothing.
Description
Reads number of data bytes defined by NoBytes parameter from the specified
address in Flash memory to variable pointed by buffer.
Requires
Nothing.
Example
// for MCUs with Flash memory larger than 64kb
const F_ADDRESS : long = 0x200;
var dat_buff : array[32] of word;
...
begin
FLASH_Read_Bytes(F_ADDRESS, dat_buff, 64);
end.
Prototype
// for MCUs with 64kb of Flash memory or less
function FLASH_Read_Word(address : word) : word; 
// for MCUs with Flash memory larger than 64kb
function FLASH_Read_Word(address : dword) : 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
var tmp : word;
...
begin
tmp := Flash_Read(0x0D00);
begin