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

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
Example Object: Output.spin
{{ Output.spin }}
VAR
PUB Start(Pin, DelayMS, Count): Success
{{Start new blinking process in new cog; return True if successful.}}
PUB Stop
{{Stop toggling process, if any.}}
PUB Active: YesNo
{{Return TRUE if process is active, FALSE otherwise.}}
PUB Toggle(Pin, DelayMS, Count)
{{Toggle Pin, Count times with DelayMS milliseconds clock cycles
Page 134 · Propeller Manual v1.0
long Stack[9]
byte Cog
Stop
Success := (Cog := cognew(Toggle(Pin, DelayMS, Count), @Stack) + 1)
if Cog
YesNo := Cog > 0
in between. If Count = 0, toggle Pin forever.}}
dira[Pin]~~
repeat
while Count := --Count #> -1
Cog~
cogstop(Cog~ - 1)
!outa[Pin]
waitcnt(clkfreq / 1000 * DelayMS + cnt) ' Wait for DelayMS…
'Stack space for new cog
'Hold ID of cog in use, if any
'Set I/O pin to output…
'Repeat the following
' Toggle I/O Pin
'While not 0 (make min…
'Clear Cog ID variable

Related parts for 122-32000