Hein (fub) wrote,

  • Mood:

EEPROM programmer features

The EEPROM programmer I'm going to build will consist of two parts: a program on the PC and firmware in the PIC.
Every byte that the PC sends to the PIC will be prepended with a 'type'-byte to signify the type of the following byte. There will be two types: Command bytes and Data bytes.

Valid commands are:
Acknowledge -- The PIC sends back an acknowledge message.
Adress -- Followed by two bytes. Sets those two bytes as an EEPROM memory address in the PIC.
Read -- The PIC sends the contents of the adress set with the Adress-command.
Write -- Followed by a single byte. Writes this byte at the adress set with the Adress-command.
Sequential Write -- The data bytes in the buffer are written sequentially in the EEPROM, starting with the adress set with the Adress-command.
Sequential Read -- Followed by a single byte. Reads as many bytes from the EEPROM as the next byte, starting with the adress set by the Adress-command.

The PIC will have a (circular) buffer for data that has to be burned into the EEPROM. If the buffer is full, the PIC will signal this to the PC, via a protocol that I need to hash out so that status bytes that the PIC sends to the PC will not be confused with data bytes that result from a read-operation. Perhaps the PIC needs to send type-bytes as well...

After the Sequential Writing command is issued, the PIC will burn the contents of the buffer into the EEPROM.

I need to think about this some more, but I think this is a good start.

  • Gundam

    My love for the mecha anime genre is well-documented on this blog and elsewhere. And of course, Gundam is the granddaddy of the genre, such a huge…

  • Kakiage

    I’ve been on a manga-reading spree these days. It all started out with Dungeon Meshi, which merges my interest in RPGs and dungeon delving…

  • Anime movie introduction

    Two weeks back, a colleague wore a shirt with a text that also included ‘NEO-TOKYO’. I asked him if this was a reference to Akira, and…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded