Go Down

Topic: Serial port freezes (Read 1 time) previous topic - next topic


Version 0018 of the Arduino IDE.

Your sketch may really benefit with upgrading to IDE 1.0.3 as it runs both send and rec serial data in full duplex interrupt mode where as version 18 only used interrupts on receiving serial data from the USB.



So you are saying that the FPS is dependent on the speed of the data rate?  I would only transmit the updated control position only when they change.  You can only move a couple of controls at a time.


You are sending updates as fast as you can generate them. You should adopt a design that either only sends them when they change, or sends them at a defined frequency which the serial link can cope with.

ASCII encoding is easy to develop and debug and a good starting point, but if bandwidth is an issue then you may need to use a binary encoding scheme.
I only provide help via the forum - please do not contact me for private consultancy.


I downloaded the latest IDE (1.0.3) and tried that, and I get the same issue with the serial stream. It's just not sending the data as fast as it should be and freezing the Serial Monitor requiring me to end the javaw process through Task Manager (Windows 7 x64, I also forgot to include my OS, I'm sorry). As for how I send the serial stream, please just let me worry about that until I ask for help. The point is that this was working before, I added the time functions, it began freezing things, I remove the time functions, it's still freezing and I need to know how to fix it. All I want to do is get it back to the way it was before playing with time so I can then begin experimenting on other things.


Are you using the USB connection for the serial communication?  The serial CDC driver uses Bulk transfer which doesn't guarantee a set bandwidth or latency.  If you want that you should use a true RS-232 connection or a similar type of connection.  You can try connecting the Arduino board to another USB port - one that has fewer devices connected to it.  But for any of this to work, you must not fill the buffer on the serial interface faster than it can empty.  (115200bps/10cps = 11520Bps for 8N1, note: 1b for the start bit)

Don't use the Serial Monitor for high bandwidth traffic; it cannot handle it.  Use PuTTY, Hyperterminal, or some other terminal program.

Go Up