Monday, March 4, 2013

Arduino EEProm Explorer

NOTE: there would be a screenshot right here, but there's really no point. It'd just be a terminal window showing something like this:
Anyway... while working on the BL-238 uComputer, I wanted to add EEProm support to load and save programs. One of the things I needed was a way to probe into the EEProm to see if everything in there looked correct, or if things were going awry, a way to reformat it and so on.  In the process, I created this EEProm Explorer which is available on github.

It presents a shell interface over the serial connection, that has a few commands that can be typed in.  Perhaps some of you out there can use it to help snoop at the data for your own programs, or whatever.  I may be adding in functionality to this (along with in TinyBasicPlus) to load and save EEProm data directly to SD Cards as well, but that's in the future.

Commands are:

  • format - clear the EEProm - fill it with 0x00 (zeroes)
  • dump - display a fancy hexdump of the EEProm contents, hex values and ascii equivalents
  • print - display the contents as though they were a text file (ascii only)
  • record - capture user input until a "." starts a line.  Great for filling with textual content.
  • poke A D - poke the data value "D" into address "A".   Both values are decimal numbers.
  • ? - display the help message, along with RAM/EEProm sizes.

So, download this sketch to your Arduino, and connect via the serial monitor, and just type in the commands to use them.

Be aware that different micros have different amounts of EEProm storage.  The 168-based devices have 512 bytes, while the 328-based devices have 1024 bytes.  Arduino DUE (Arm CPU) devices have no EEProm (so far.)

Future versions of this may change the builtin commands, or add to them.  (Current version as of this post is v002.)

Hope y'all have use for this little tool!

1 comment:

  1. For what it's worth, I've rolled this functionality into my SDShell project;