In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Peter Van der Zee wrote: Hi Dan; Attached are two files; the SyncDemoMaster which generates the sync pulse, and one SyncDemoSlave which locks on to it. I have purposely left things in the most basic state. In real life, one would fill the NOP's with real things instead of just wasting time. You can place some unrelated instructions ahead of the level sample isntruction in the slave, caveat that in order for the unit to remain synced, their execution path MUST take exactly the same number of cycles every time. If the time of the sync sample wanders around, the thing will unlock. Naturally it will relock, but this is not the purpose of the exercise. If you want to have the sync pulse longer (although I would not know why), simply move the clear data line instruction down by however many, and fill the gap with NOP's or whatever. Probably I would not exceed half of the interrupt period and that would generate a square wave. I suspect you can now see how easy it is to append data bits to the sync pulse, and you have a locked sampler at the slave end where you would sample those data bits in their middle. It's still a bit of work, but it IS all predictable, and works very well. Cheers, Peter (pjv) ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=2&m=88814#m89739 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)