Let's Make Robots!

Writing/Reading with EEPROMs

Hi guys!

i would like to write and read this kind of EEPROM http://ww1.microchip.com/downloads/en/DeviceDoc/21711G.pdf 

the problem is that i don't really know how to.

My aim is to establish a serial connection with it via my picaxe (it's gonna be one of the "M" series), and of course, once i've done this, to read it and write on it. 

does picaxe have some simple code to read/write them?

Another thing: in the pin description it says i have to connect a pin to a "serial clock". What is that? or what pin would it be on the picaxe?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

There is something completely wrong here. Sorry, I do not have the time to get 100% into the case right now, but here are some "I am pretty sure"'s:

  • Any Picaxe supports I2C.. and, but!:
  • When writing to/from EEPROM's with Picaxe, you want to use some of the commands dedicated to it in the Picaxe library - "EEPROM" and "DATA"..

eeprom and data are only for internal memory, yes.

i'll check the spi/shift and the other sub procedures, and see if i can get something useful out of it :)

From my understanding, the eeprom/data command are for the internal eprom....I believe the OP was mentioning an external memory chip.

Not all of the PICAXE chips appear to support the spiin/spiout (aka shiftin/shiftout) commands, hence my reason to point out the manual has documention for sub procedures that should do a similar job for those chips that don't support them. Page 156 of the picaxe manual(commands) mentions this and specificly states spi enabled eeprom memory. I wouldn't say I'm completely wrong.....yes/no?

 

Seriously, take a look at the manuals for the picaxe, I think there is code in there to do what  you want. due to memory constraints thoughif you are using an 8m, it could be tight because the functions take up about half the memory. I beleive the info is in the shift in and shift out commands. they don't work on the 8m/14m/ maybe 18x...but again...they have code to do the actual functions. I was going to try it myself, but ended up not doing it due to the whole memory issues....I have some 16lc256(I thnk thats the number)memory chips that I had considered using for memory storage as well...
You can take a look at http://www.societyofrobots.com/member_tutorials/node/35 if you still want to know about I2C.
that sounds really hard...
yup! better get an 'X' picaxe that has i2c build in. :)
i think you are right, only reason i wanted the "M" series was because of the infraout. i guess i'll just figure out how to modulate an IR, that sounds simpler

The picaxes with i2c pins has commands to take care of sending the start/stop sequences and handling the timing.

I think you can use any I/O pins, since it's a matter of setting/resetting the pins in the right order. A did a google search and found http://www.phanderson.com/picaxe/ds1624_28x.html. Maybe you can use that as inspiration. 

aah ok i see. But then why do some Picaxes have "i2c pins" (as listed in the schematics) and some others just have serial in and serial out pins (the one that go to the stereo jack)?

 Anyways say i'll be using bit banging, do you have idea of where i am going to stick those pins from the EEPROM memory? (since my current i2c port only has 3 pins)