Mikroelektronika MIKROE-350 数据表
counter = 0
while ( counter < 64 ) ' reading 64 bytes in loop
PORTD = FLASH_Read_Byte(F_ADDRESS + counter) ' demonstration
of reading single byte
Inc(counter)
PORTB = FLASH_Read_Byte(F_ADDRESS + counter) ' demonstration
PORTB = FLASH_Read_Byte(F_ADDRESS + counter) ' demonstration
of reading single byte
Inc(counter)
Delay_ms(200)
Delay_ms(200)
wend
FLASH_Read_Bytes(F_ADDRESS, @dat_buff, 64) ' demonstration
of reading 64 bytes
for counter = 0 to 31
PORTD = dat_buff[counter] ' output low byte to PORTD
PORTB =
word((dat_buff[counter] >> 8)) ' output high-
er byte to PORTB
Delay_ms(200)
next counter
counter = 0
while (counter <= 63)
while (counter <= 63)
' reading 32 words in loop
word_ = FLASH_Read_Word(F_ADDRESS + counter) ' demonstration
of reading single word
PORTD = word_
' output low byte to PORTD
PORTB = Hi(word_)' >> 8)
' output higher byte to PORTB
counter = counter + 2
Delay_ms(200)
Delay_ms(200)
wend
FLASH_Read_Words(F_ADDRESS, @dat_buff, 32) ' demonstration
of reading 64 bytes
for counter = 0 to 31
PORTD = dat_buff[counter]
' output low byte to PORTD
PORTB =
word((dat_buff[counter] >> 8)) ' output high-
er byte to PORTB
Delay_ms(200)
next counter
end.
217
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6