Lock-Bit Demo

Share this object
<

Overview

  • Object ID : 2174 (2015-10-02)
  • Author : Jon Titus | added by Archiver
  • Content :
  • Microcontroller :
  • Language :
  • Category :
  • Licence :

Content

This code demonstrates the use of a lock bit to "protect" the USB serial port on a Propeller I QuickStart board so two new cogs can run programs and both can have exclusive use of the Parallax Serial Terminal.spin object to display information in the Parallax Terminal window. Each cog routine waits for the lock bit to become "open." Then it closes the lock and uses the serial communications. At the end of its task, the cog opens the lock so the other cog may then lock it and have exclusive use of the serial communications. At the end of its task, the second cog "opens" the lock bit. The Terminal window displays information about the progress of the code in each cog.


Downloads  
Zip archive download

Leave a Reply