Go Down

Topic: [SOLVED] Read & Write 24LC1025 with wire.h okay but problem after 65536 address (Read 10604 times) previous topic - next topic

Hackscribble

Yes, sounds like address not recognised by the EEPROM.

I don't have that EEPROM but I will see if I can trace the I2C data with a logic analyser.
Hackscribble.  Writing about making things
hackscribble@outlook.com

Hackscribble

Logic analyser is playing up, so I have marked up oscilloscope traces of two tests.

I modified your code from post #9 to add a writeEEPROM call in loop() with a 100ms delay.  I ran it twice.  First time, writing to address 32,768.  Second time, to address 80,000.  The traces are of the device address byte output by the Arduino in loop().

Traces are in the attached PDF.  Comparing them to the 24LC1025 datasheet (section 5.0), both have '1010' as the control code, A0 and A1 = '0', and R/W is low for a write.  Only difference is the block select bit is set for address 80,000, which is what I would expect. 

So, not sure what to suggest next.

How do you have these pins connected on the EEPROM: A0, A1, A2 and WP?

Regards

Ray
Hackscribble.  Writing about making things
hackscribble@outlook.com

axxel

On the definitive board, it will be connected like this:

A0 -> GND
A1 -> GND
A2 -> GND
WP -> GND

Hackscribble

Try connecting A2 to +5V.  There is a note in the datasheet saying:

Quote
A2: Non-Configurable Chip Select.
This pin must be hard-wired to logical 1 state (VCC). Operation will be undefined with this pin left floating or held to logical 0 (VSS).


Long shot - since why would this only affect the high-order half of the address space?!
Hackscribble.  Writing about making things
hackscribble@outlook.com

fat16lib

It must be A2 needs to be Vcc.

I have a 24FC1025 with A2 wired to +5V.

I ran your code unmodified and got this output:
Quote

21
145
203
42

axxel

OOOHHHHH!!! It works  :) :) :)

I made a printed circuit but first I based it with a 24xx256, so the pin 2 goes to GND.

I make the tests on a separeted protoboard and now it works! I have to change this on my printed circuit and this will correct the problem :)

Wonderful  :)

Thanks a lot for this help :)


Go Up