Preloading data in I2C EEPROM

Steve Widmark

New Member
Is there an "easy" way to preload data into an 24LC256? I want to put about 3kB worth of ASCII data into one. I can only think of two ways:
1. Make a purpose-built circuit incorporating a PICAXE and a keyboard or...
2. Load the data one block at a time using 12 separate PICAXE programs each incorporating table commands with different data sets.

-Steve
 

MPep

Senior Member
If you are using an X2 chip (also X1?), use one of the 'slots' to provide for just this function. This feasible for you? Just an idea, as I haven't used Xx chips yet.;)
 

Buzby

Senior Member
I'm making the assumption that your finished project will have a PICaxe reading data from the LC256.

1 - Build the project hardware.

2 - Load some temporary PICaxe code to read from a serial input, and write the data to the LC256 a byte at a time.

3 - Send the ASCII from a serial port on a PC, or similar.

4 - When you have all the data in the LC256, re-programme the PICaxe with the required project code.

The serial input could be a spare input pin, or re-purpose one just for the loading phase.

This way you could load the full LC256, or any other size I2C EEPROM, using a PICaxe of any size, even an O8.
 

westaust55

Moderator

Buzby

Senior Member
@Mpep,

http://www.picaxeforum.co.uk/showthread.php?p=45143&highlight=bit+bang+i2c#post45143

http://www.picaxeforum.co.uk/showpost.php?p=119651&postcount=42

These two links show the general principal.
The 18X code pokes to the tri-state registers. I don't think this can be done on an 08, so some kind of diode + pullup resistor would be needed to replicate the effect. Just using a pullup, then switching pins between 'input' and '0 level output' would have the same effect, but with horrendous code.

As Hippy pointed out in one of the linked posts, I2C on an 08 is possible, but it needs a lot of work !.
 
Last edited:

rhaseman

New Member
If you need to do this more than once with different sized EEPROMs you might want to look at the PONYPROG software and interface. This would give you the ability to program a number of different types of EEProms from a PC. It might be helpful if you don't know exactly what data you need to preload or want to try variations on the data set. The software works very well and the interface is fairly simple.

Rick
 
Top