Creative Works of Tom McGuire

Extra Memory EEPROM for the Logochip

2007/04/15 · No Comments

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 24LC64

The 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 use write-eeprom <address> <value> where <address> is an integer from 0 to 8191 and <value> is an integer from 0 to 255. For example try

   write-eeprom 100 57

 This command stores the number 57 in memory location 100 in the 24LC64

To read a byte of data from the 24LC64 use read-eeprom <address> where <address> is an integer from 0 to 8191 and <value> is an integer from 0 to 255. If you try

   print read-eeprom 100

you should see the number 57 print in monitor window.
Here’s the code:

 

 

  TextPage

Just stuff all this in your program somewhere or put it in a library and include it in you code.

Categories: Logochip



0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below..

You must log in to post a comment.