In SX Microcontrollers, SX/B Compiler and SX-Key Tool, robotworkshop wrote: [quote="JonnyMac"]I've attached a program (16 channel, MiniSSC-compatible servo controller for the Prop-SX) that uses a minor update to my serial stuff. Whenever there is anything in the receive buffer a flag called [i]rxReady[/i] is set. If you need to wait for a specific number of bytes you can always check [i]rxBufCnt[/i].[/quote] Hello Jon, I'm confused. I've looked at the Serial code in your 16 Channel servo controller and compared it to the previous code for the ISR based serial routines. It appears that both are using an 8 byte circular buffer to store incoming serial characters. The part that is confusing is that you check a different bit in the latest code to see if the buffer is full: JB rxBufCnt.4, RX_Done and in the older version you have: JB rxBufCnt.3, RX_Done From looking at the code I would expect that the .3 is correct for an 8 byte buffer and the .4 would be for a 16 byte buffer. If that is the case I can see where some of your variables might get overwritten if the data came in fast enough. Is there another reason for this? Robert ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=252933#m253862 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)