Datasheet
for (i = 0; i<64 ; i+=2) // reading 32 words in loop
{
word = FLASH_Read_Word(F_ADDRESS + i); // demonstration of
reading single word
PORTD = word; // output low byte to PORTD
PORTB = word >> 8; // output higher byte to PORTB
Delay_ms(200);
}
i = 0;
while ( i < 64 ) // reading 64 bytes in loop
{
PORTD = FLASH_Read_Byte(F_ADDRESS + i++); // demonstration
of reading single byte
PORTB = FLASH_Read_Byte(F_ADDRESS + i++); // demonstration
of reading single byte
Delay_ms(200);
}
FLASH_Read_Bytes(F_ADDRESS,dat_buff, 64); // demonstration of
reading 64 bytes
for (i = 0; i<32 ; i++)
{
PORTD = dat_buff[i]; // output low byte to PORTD
PORTB = dat_buff[i] >> 8; // output higher byte to PORTB
Delay_ms(200);
}
FLASH_Read_Words(F_ADDRESS,dat_buff, 32); // demonstration of
reading 64 bytes
for (i = 0; i<32 ; i++)
{
PORTD = dat_buff[i]; // output low byte to PORTD
PORTB = dat_buff[i] >> 8; // output higher byte to PORTB
Delay_ms(200);
}
}
281
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6