AVR_GCC_EEPROM Program

Publisher:sclibinLatest update time:2015-04-29 Source: 51heiKeywords:AVR  EEPROM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
The source code is as follows:

#include
#include
#include

int main()
{
 unsigned char val;
 eeprom_busy_wait(); //Wait for EEPROM to be ready for read/write
 eeprom_write_byte(0,0xaa); //Write 0XAA to address 0 of the EEPROM inside the MCU
 eeprom_busy_wait(); //Wait for EEPROM to be ready for read/write
 val=eeprom_read_byte(0); //Read a byte from address 0 of the EEPROM inside the MCU and assign it to variable val
 while(1)
 {
  ; //Main program
 }
}
 

Keywords:AVR  EEPROM Reference address:AVR_GCC_EEPROM Program

Previous article:AVR internal EEPROM erase and write times test program
Next article:ARV microcontroller addressing mode and addressing space

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号