View previous topic :: View next topic |
Author |
Message |
mwildbolz
Joined: 26 Jul 2005 Posts: 16
|
EEPROM with HW I2C and PIC 16F747 |
Posted: Wed Jul 27, 2005 11:33 am |
|
|
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
|
|
Posted: Wed Jul 27, 2005 12:10 pm |
|
|
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
|
|
Posted: Thu Jul 28, 2005 12:26 am |
|
|
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
|
|
Posted: Thu Jul 28, 2005 12:44 am |
|
|
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
|
|
Posted: Thu Jul 28, 2005 1:30 am |
|
|
Oh god!
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 |
|
|
|