Skip to content

Instantly share code, notes, and snippets.

@avr-programmierung
Created May 14, 2019 11:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avr-programmierung/47cba433cd0674d94996f55353cbee7f to your computer and use it in GitHub Desktop.
Save avr-programmierung/47cba433cd0674d94996f55353cbee7f to your computer and use it in GitHub Desktop.
ATmega88 @ 1MHz EEPROM 04
/* eeprom_04.c ATmega88 @ 1MHz */
#include <avr/io.h> #include <avr/eeprom.h>
uint8_t byte_buffer[7] = {1,2,'a',4,5,'g','x'}; // Array byte_buffer mit 7 Werten
int main(void)
{
// schreibe Datenblock von 7 Bytes
eeprom_update_block((const void*)byte_buffer, (void*)0, (size_t)7);
// lese Datenblock von 7 Bytes
eeprom_read_block((void*)byte_buffer, (const void*)0, (size_t)7);
while(1)
{
asm ("NOP");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment