However, I added some debug code, which was causing me to lose data without a large serial receive buffer.I am using the Windows Hyperterminal, and it is sending 1024-byte packets. It will be very usefull for sending files back-and-forth between the Prop and the PC.I'll do some more timing tests to see what the maximum baud rate is for a small buffer.A lot of Spin code is executed in each call, so I don't think it would keep up with the 57,600 baud rate without a large receive buffer.Even with the tight loop for the 1024-byte receive code, it still contains a call to ser.rx in each loop.I was able to run at 57,600 by using a very large receive buffer in the serial driver. for the first 128-byte packets and subsequent 128-byte packets computes the CRC.I noticed that the receive loop for 1024-byte packets writes directly into the buffer, and then does the CRC computation after receiving the packet.The main problem was that my serial receive buffer was too small, and it was wrapping around.I was able to download a 13Kbyte file from my PC to the EEProm file system on the Prop.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |