This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Send a file thru RS232

What is the best protocol to use to send a file thru RS232. It is gonna be a 256Kbyte of data.

Parents
  • Depending on how fast the EEPROM can be programmed, and how fast the incoming data is, you will probably need some kind of handshake to allow time for the programming to complete, or to handle error cases. You will also need a buffer large enough on the receiving end to store the data to be programmed.

Reply
  • Depending on how fast the EEPROM can be programmed, and how fast the incoming data is, you will probably need some kind of handshake to allow time for the programming to complete, or to handle error cases. You will also need a buffer large enough on the receiving end to store the data to be programmed.

Children
  • The incoming data is much slower than the speed I am writing to the EEPROM. Therefore, whenever there is an incoming data, I will write straight to EEPROM.

  • Tommy, as you say that speed is not a problem, my personal inclination would be to keep things as simple and convenient as possible. Go for Intel format and start with a prototype version that simply ignores all those checksums. Get things working and add the bells and whistles that experience (and common sense) tells you are necessary.

    If you really want to keep things simple, consider having a write command and a verify command. In the case of a verify, the file is downloaded again, and the receiver simply checks that the data is identical to that received previously. This will save you from having to worry about checksums, CRCs etc.

    If you are actually downloading code that ends up getting executed, the code could include its own CRC check - which is not a bad idea anyway.