Lock-Bit Demo

Warning message

The Propeller Object Exchange system is decommissioned and replaced with a GitHub repository to house the same existing and future Propeller objects. As of 12/5/2019, this site is read-only. You can continue to browse and download objects from here for a limited time; however, please begin using the Parallax Propeller repository for future reference.
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Request group membership
By: created: 2015-10-01 | updated: 2015-10-01

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.

Original File Upload
Binary Data simple_multicore_demo3d.spin6.51 KB