View Single Post
  #5   Spotlight this post!  
Unread 16-03-2004, 19:29
DKolberg DKolberg is offline
Mentor Iron Giants
AKA: David Kolberg
FRC #5069 (Iron Giants)
Team Role: Mentor
 
Join Date: May 2002
Rookie Year: 2000
Location: South Bend
Posts: 44
DKolberg has a spectacular aura aboutDKolberg has a spectacular aura about
Talking Re: Problem with reading and writing EEPROM

Quote:
Originally Posted by Random Dude
Actually, your write command should be this



EECON1bits.EEPGD =0;
EECON1bits.CFGS =0;
EECON1bits.WREN =1;
INTCONbits.GIE = 0;
EECON2 = 0x55;
EECON2 = 0xAA;
EECON1bits.WR = 1;
INTCONbits.GIE = 1;
EECON1bits.WREN = 0;

The difference being WREN is set to 1 the first time, not 0.
That fixed it, it works. Thank you, Thank you, Thank you.

Dave
SBOTZ
Team 1327