System

BlocklyProp reference for SYSTEM blocks

The System menu is only available for the Other board type.

Using these blocks takes some in-depth knowledge of the Propeller chip's 8-core architecture. See the P8X32A Propeller Datasheet or the Propeller Manual for detailed information.


Wait until


The Wait until block pauses program execution until a timing event is reached. Most of the time it is used with the system counter block and an inserted value.  This technique can guarantee a specific number of system clock ticks elapse before code execution continues. It can also be used to coordinate code execution in separate cores, where both processes pause until the system counter reaches the same specified value.


cog set register

The cog set register block allows you to set the value of the read/write Cog RAM register selected from the drop-down menu.

  • pin output: I/O pin output states for P31-P0 (OUTA)
  • pin direction: I/O pin directions for P31-P0 (DIRA)
  • counter A: Counter A control (CTRA)
  • counter B: Counter B control (CTRB)
  • frequency A: Counter A frequency (FRQA)
  • frequency B: Counter B frequency (FRQB)
  • phase accumulator A: Counter A phase (PHSA)
  • phase accumulator B: Counter B phase (PHSB)

Each Propeller core has its own set of registers; this block interacts with the core executing the block code.  See the Cog RAM Sepcial Purpose Registers in the P8X32A Propeller Datasheet or the Propeller Manual for detailed information on these registers.


cog get register

The cog get register block retrieves the value from the read-only or read/write Cog RAM register selected from the drop-down menu:

  • pin input:  I/O pin input states for P31-P0 (INA, read-only)
  • pin output: I/O pin output states for P31-P0 (OUTA)
  • pin direction: I/O pin directions for P31-P0 (DIRA)
  • counter A: Counter A control (CTRA)
  • counter B: Counter B control (CTRB)
  • frequency A: Counter A frequency (FRQA)
  • frequency B: Counter B frequency (FRQB)
  • phase accumulator A: Counter A phase (PHSA)
  • phase accumulator B: Counter B phase (PHSB)

Each Propeller core has its own set of registers; this block interacts with the core executing the block code.  See the Cog RAM Sepcial Purpose Registers in the P8X32A Propeller Datasheet or the Propeller Manual for detailed information on these registers.


system

The system block can provide one of two different values based on your dropdown menu choice.

  • system counter provides the current system counter value at the moment it is asked for.  When the system counter reaches 4,294,967,295 it resets back to zero. The Propeller chip's system counter increases by 1 for every system clock “tick.”,  There are 80,000,000 ticks every second on the Propeller Activity Board, Propeller FLiP, Propeller Project Board USB, and any Propeller board using a 5 MHz oscillator running at PLL16x. 
  • system clock frequency provides the clock frequency in use by your Blockly project.

This block appears in the System menu for the Other board type. It appears in the Values menu for the Activity Board, FLiP, and Badge board types. It is not available for the S3.  For a tutorial using this block, see the Precision Timing with the Propeller tutorial.