In SX Microcontrollers, SX/B Compiler and SX-Key Tool, peterverkaik wrote: Thanks Guenther for that explanantion. You said: So, in general, a Virtual Peripheral is "simply" a piece of code that "mimics" a hardware peripheral in software. Such VP code must not necessarily be implemented as part of an interrupt routine. When timing is not critical, VPs can nicely be implemented in some part of the main program loop. An I²C master VP may be an example. I think without an isr part, it is no longer a 'peripheral' but just a subroutine. The idea of a peripheral is that does its thing while the main code continues to do its own, hence a VP must have an isr part, because that is the only way two pieces of code can appear to run simulteneously. However, if that subroutine is programmed as a statemechine called frequently from the mainloop (think of this as a programmed interrupt call), then it can be considered a VP. regards peter ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=103848#m104092 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)