You are here: About the Hardware > System Counter

System Counter

The System Counter is a global, read-only, 32-bit counter that increments once every System Clock cycle.  Cogs can read the System Counter (via their CNT register) to perform timing calculations and can use the WAITCNT command to create effective delays within their processes. 

The System Counter is one of the common Shared Resources  so every cog can read it simultaneously.  The System Counter is not cleared upon startup since its practical use is for differential timing.  If a cog needs to keep track of time from a specific, fixed moment in time, it simply needs to read and save the initial counter value at that moment in time, and compare all of the later counter values against that initial value.

Propeller Help Version 1.1

Copyright © Parallax Inc.

5/13/2009