Lock-Bit Demo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Request group membership
By: Jon Titus, 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
AttachmentSize
Binary Data simple_multicore_demo3d.spin6.51 KB