CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

EEPROM with HW I2C and PIC 16F747

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
mwildbolz



Joined: 26 Jul 2005
Posts: 16

View user's profile Send private message

EEPROM with HW I2C and PIC 16F747
PostPosted: Wed Jul 27, 2005 11:33 am     Reply with quote

Hi!

I've a very curious problem:
I try to communicate with a I�C EEprom (Microchip 24AA02). I think (but i'm not sure) that i am able to write data into the EEPROM but when i read the data, i get the right data back. And the problem is, that this happens every time and its equal if i change the address of the eeprom or not.

I am not able to understand this, don't ask me why this is, how it is.

Compiler version: 3.222
MPLAB: 7.20


Do you have any ideas?
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Wed Jul 27, 2005 12:10 pm     Reply with quote

Are you changing the 'slave' address for the eeprom or the 'location' address where the data is stored within the eeprom? You might want to make a very simple program that simply writes data and then reads it back and displays it. Change the addressing and if it doesn't seem to work properly then post that small program here so we can make a better determination of what's going on. Make sure you include your #fuses and #use information as well.

Ronald
mwildbolz



Joined: 26 Jul 2005
Posts: 16

View user's profile Send private message

PostPosted: Thu Jul 28, 2005 12:26 am     Reply with quote

Thanks for your respond!

But i change the Hardware address (the pins A0-A2 at the EEPROM) and i always get data even if the hardware address and the address specified in my program don't match.
And i've tried already to write a program, which writes data and reads it back and with this program i saw, that the EEPROM responds to all querys and it is not important, which address is set.

I've discovered one thing and this is, that if i disconnect the EEPROM from the bus, the �C isn't able to work (because he gets no acknowledge).
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Jul 28, 2005 12:44 am     Reply with quote

Quote:

But i change the Hardware address (the pins A0-A2 at the EEPROM) and i
always get data even if the hardware address and the address specified
in my program don't match

Download the data sheet for the 24AA02:
http://ww1.microchip.com/downloads/en/DeviceDoc/21709D.pdf
Read section 8.4 on page 11.
mwildbolz



Joined: 26 Jul 2005
Posts: 16

View user's profile Send private message

PostPosted: Thu Jul 28, 2005 1:30 am     Reply with quote

Oh god! Very Happy

I think, i haven't read this.
I always thought, that there could be mor than one EEPROMs of this type on the bus.

I thank you really very much and this is the explanation why i always get the data.

I am really stupid.
Oh god, oh god.

Thanks, Markus
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group