122-32000 Parallax Inc, 122-32000 Datasheet - Page 322

MANUAL PROPELLER

122-32000

Manufacturer Part Number
122-32000
Description
MANUAL PROPELLER
Manufacturer
Parallax Inc
Datasheets

Specifications of 122-32000

Accessory Type
Manual
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
Propeller Education (PE) Kit
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
WAITCNT
Pause a cog’s execution temporarily.
((PUB ┆ PRI))
Explanation
WAITCNT
WAITPNE
pauses the cog until the global System Counter equals Value.
When executed,
System Clock from causing further code execution within the cog until the moment the
System Counter equals Value. The wait hardware checks the System Counter every System
Clock cycle and the cog’s power consumption is reduced by approximately 7/8
time.
consumption anywhere in the program where time is wasted waiting for low-bandwidth
events.
There are two types of delays
Both are explained below.
Fixed Delays
Fixed delays are those that are all unrelated to one specific point in time and only serve the
purpose of pausing execution for a fixed amount of time. A fixed delay, for example, may be
used to wait for 10 milliseconds after an event occurs, before proceeding with another action.
For example:
CON
Page 322 · Propeller Manual v1.0
WAITCNT
_clkfreq = xtal1
_xinfreq = 5_000_000
repeat
!outa[0]
waitcnt(50_000 + cnt)
, “Wait for System Counter,” is one of four wait commands (
, and
Value
In normal applications,
( Value )
is the desired 32-bit System Counter value to wait for.
WAITVID
– Spin Language Reference
WAITCNT
) used to pause execution of a cog until a condition is met.
activates special “wait” hardware in the cog that prevents the
WAITCNT
WAITCNT
can be used for: fixed delays and synchronized delays.
'Set for slow crystal
'Use 5 MHz accurate crystal
'Toggle pin 0
'Wait for 10 ms
may be used strategically to reduce power
WAITCNT
ths
during this
,
WAITPEQ
WAITCNT
,

Related parts for 122-32000