My problem seems trivial, but I'm having huge troubles while trying to send file from PC to Arduino... The final goal is to transfer about 32KB at minimum speed about 33600bps without errors.
Let me tell what I've tested so far:
First I used Arduino UNO with 9600bps, 8N1 to read data from 10 bytes at a time and then it sent out 1-byte as "send me more data". The idea was that this way I don't overrun FIFO in any case... This works quite fine (as expected) until 12KB has been transferred... After 12KB the speed suddenly drops to ridiculous speed that is about 200bps. That is WAY too slow for my needs.
I found out that when I remove the 1-byte return value the speed will not mystically drop anymore, so now I send only 1-byte at a start as "GO, PC" and then the PC outputs all of the file to Arduino... This is fine, but not fast enough. Now when I change the speed to ie. 14400 or 33600bps the number of errors in transfer increases a lot and I need error free data. Going beyond 33600bps does not help much as this seems to be pretty close to maximum speed Arduino UNO can take (!?) from serial port. To fix these errors I tried sending each byte 3-times and selecting the value that appears same 2 times on Arduino end. This corrected the errors and verified that the problem is in between Arduino and PC, but yet again the communication is too slow. (Only little faster than with 9600 without errors)
I thought this might be some sort of hardware problem, so I uploaded same program to Arduino Pro Nano V3. With this device I can use any speed from 9600bps to 115200 without communication errors, but it seems that the actual throughput in serial port input is only about 2000bps (!?) that is even slower than Arduino UNO error free 9600
Can someone help me, what I can do to get this sorted out? Is this normal with UNO that there is errors at these speeds? Is there any other way to solve this on UNO except implementing some complex error correcting protocol? Is there a way to communicate 2-way without speed dropping to ~200bps after 12KB? Why the speed even drops? Is there a way to boost the communication on Arduino Pro Nano V3 beyond 2000bps?
The server side of this software is running on WinXP and it is written with VB6 using MSCOMM.
Thank you for your time. I really hope I can get this solved.