avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] About the EEPROM application problem in AVR


From: laser lei
Subject: [avr-gcc-list] About the EEPROM application problem in AVR
Date: Fri, 3 Jun 2005 09:32:09 +0800 (CST)

Dear All,
     I used the ATmega48 EEPROM stored my parameter.
But I can't read back right data before in my program
I have defined  it.Please see the below part,give me some advice!
     Thanks!
     Laser
#include <inttypes.h>
#include <avr/io.h>
#include <avr/eeprom.h>
 unsigned char EMy_addr __attribute__((section(".eeprom"))) =5;
 unsigned char my_addr; 
 
int main(void)
{
        eeprom_busy_wait();  
        my_addr=eeprom_read_byte(&EMy_addr);   
}


__________________________________________________
赶快注册雅虎超大容量免费邮箱?
http://cn.mail.yahoo.com


reply via email to

[Prev in Thread] Current Thread [Next in Thread]