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

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

RE: [avr-gcc-list] Reading eeprom without using routines ineeprom.h,caus


From: Eric Weddington
Subject: RE: [avr-gcc-list] Reading eeprom without using routines ineeprom.h,causes reset.
Date: Tue, 02 Oct 2007 20:10:25 -0600


> > -----Original Message-----
> > From:
> > address@hidden
> > [mailto:address@hidden
> > org] On Behalf Of Michael
> > Sent: Tuesday, October 02, 2007 7:31 PM
> > To: address@hidden
> > Subject: [avr-gcc-list] Reading eeprom without using routines
> > in eeprom.h,causes reset.
> >
> > Hi, when I was new to the avr-gcc (and still fairly new to
> > C), I read the eeprom like this:
> >
> >
> >
> > unsigned char eeread(unsigned char address)
> >
> > {
> >
> >             while(EECR & _BV(EEWE));
> >
> >             EEAR = address;
> >
> >             EECR |= _BV(EERE);
> >
> >             return EEDR;
> >
> > }
> >
> >
<snip>
> >I can get things working again simply by using the eeprom.h routines in
avr-libc, but I believe the above code should still work!

I'm sorry, I responded quickly without thouroughly reading your post.

Why do you not want to use eeprom.h?

Eric






reply via email to

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