Low Level: Overload Protection
|
Using the Serial_LCD with a 16 MHz Arduino board raises no problem, due to the low speed of the main micro-controller and the capability of the screen 12 MHz Picasa processor.
However, graphic intensive use with the fast 80 MHz chipKIT board overloads the screen micro-controller. Especially, sent and received messages overlap and the ACK / NACK protocol is lost. |
|
Hence a solution to protect the serial connection from overload: all basic functions included in the proxySerial library invoke the _CheckSpeed procedure, which checks the securityDelay is respected.
|
#define securityDelay 3
void ProxySerial::_checkSpeed() { while((millis()-_millis< securityDelay)); // time in ms _millis=millis(); } |
|
I started with a 10 ms delay and tried shorter values.
3 ms seems correct. |
A nicely synchronised conversation recorded by Saleae Logic Analyser.