problem with eeprom writing in at89s8253

Status
Not open for further replies.

neethumini

Newbie level 2
Joined
Oct 11, 2011
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,292
i have a problem eeprom writing in at89s8253.
the rading of eeprom works well but i can't rewrite the eeprom.
the writing updation is not working.
my code to write to eeprom is given below.
plz help me

void ieem_WrByte(unsigned int adr, unsigned char val)
{ Ext_int_off;
EECON|= (EEMEN_ | EEMWE_ |EELD_);
XBYTE[adr] = val;
while ((EECON & RDY_) == 0)
EECON &= ~(EEMWE_ | EEMEN_);
Ext_int_on;
}

i am using byte writing mode
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…