Hein (fub) wrote,
Hein
fub

  • 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.
Subscribe

  • Update

    Wow, what with one thing and another, I haven’t posted on here in a month! Time to give a short update on what’s been happening.…

  • Final RPG-a-Day: Thank

    The last prompt for RPG-a-Day this year is ‘Thank’. If you have read every entry of this year’s RPG-a-Day, then I certainly…

  • Next-to-last RPG-a-Day: Mention

    Today’s prompt is ‘Mention’. I guess this is where I mention people I look up to, or websites I frequent? Ok, here’s…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments