In SX Microcontrollers, SX/B Compiler and SX-Key Tool, PJMonty wrote: Tony, What specific VPs do you have in mind? Are they all communication related? I ask because communication related VPs tend to be more critical of timing issues than some other VPs (such as PWM) are. However, you need to also look into how critical is critical? In the case of UART VPs, you are definitely allowed some slack. In the serial data stream, each new start bit essentially re-synchronizes the receiver to the stream. This means that if there is some small timing discrepancy, as long as the error doesn't add up to over 1/2 a bit duration by the end of 10 bits (assuming an 8N1 serial stream), then you're pretty much golden. With this in mind, you need to see if it's possible to find a common denominator for the multiple VPs you wish to run, even if it means the UART VP has some built in error. As long as the error is manageable, it won't be a problem. Another alternative is to consider the possibility of dithering the VP execution. In other words, lets say you have a VP interrupt rate that creates too big an error in the UART stream by the end of ten bits of transmitted data. The error might get too big after only 4 or 8 bits. It is possible that you could skip an interrupt (or add one depending on which way the error is going) so that you shrink or stretch the bit length of one of the middle bits. By doing this, you could still end up with the per bit error being in the acceptable level, at the expense of a tiny bit of additional code. [list]Thanks, PeterM[/list] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=95480#m95525 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)