Extra Memory EEPROM for the Logochip

Using the lab notes from Prof. Robbie Berg I hooked up a memory chip to a Logochip using an I2C interface. So if somebody would want their Logochip to remember a bunch of numbers like a data pattern or say an audio track this could help. It could also be helpful if you wanted to use another device that had an I^2C (also called”2 WIRE”) interface. Memory is saved when the power is off too. The PDF formatting of his lab notes kind of screwed the line feeds so I tried to tidy things up. But it’s real easy to hook up. The part only costs a buck. You can paste this code in, load, and go. Might be a good thing to put in the wiki.

  LogoEEPROM 

Logo code for reading and writing data to a 24LC64The Logo code below (also stored in the course conference is the file calledeeprom.txt) contains the procedures needed for a LogoChip to be able to write and read data to and from a 24LC64.To write a byte of data to the 24LC64 usewrite-eeprom <address> <value>where <address> is an integer from 0 to 8191 and <value> is an integer from 0 to 255.For example trywrite-eeprom 100 57This command stores the number 57 in memory location 100 in the 24LC64 To read a byte of data from the 24LC64 useread-eeprom <address>where <address> is an integer from 0 to 8191 and <value> is an integer from 0 to 255.If you tryprint read-eeprom 100you should see the number 57 print in monitor window.
Here’s the code:

              TextPage 

Leave a Reply

You must be logged in to post a comment.