Jump to content
Sign in to follow this  
dmb

i2c eeprom write

Recommended Posts

I use 24c04 eeprom.

pin 7 to gnd, bytewrite should work.

 

i can read it, can program it with a programmer.

 

but when i want to write it by pic, it fails (old data is still in)

 

 

code:

 

Sendstart();  // open i2c bus

Sendbyte(0xA0); // i2c adres for eeprom

Sendbyte(0x00); // first byte in eeprom

Sendbyte(0xC0); // data to put in eeprom, byte 0

Sendstop(); // close bus

 

Any thoughts?

 

DMB

Share this post


Link to post
Share on other sites
I use 24c04 eeprom.

pin 7 to gnd, bytewrite should work.

 

i can read it, can program it with a programmer.

 

but when i want to write it by pic, it fails (old data is still in)

 

 

code:

 

Sendstart();  // open i2c bus

Sendbyte(0xA0); // i2c adres for eeprom

Sendbyte(0x00); // first byte in eeprom

Sendbyte(0xC0); // data to put in eeprom, byte 0

Sendstop(); // close bus

 

Any thoughts?

 

DMB

 

 

I have the same problen with a 24LC32 useing the same code.

 

I also have a Phillips PCF8583 clock on the same bus and it works faultlessly whicj brings me to suspect the eeprom device BUT I dont know.

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...