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.