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

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
loading process. The following example shows an object whose Spin code in the
method launches another cog to run the Propeller Assembly routine
{{ AssemblyToggle.spin }}
CON
PUB Main
{Launch cog to toggle P16 endlessly}
DAT
{Toggle P16}
Toggle
:loop
Pin
Delay
Time
Both assembly and data may be intermixed within the
arrange it such that all critical elements are loaded into the cog in the proper order for
execution. The
code, cause the cog to be loaded with 496 consecutive long values starting from the specified
address. Whether or not it is required by the code, any data intermixed with this 496 longs of
space will be loaded as well.
Each Propeller assembly instruction has common syntax elements consisting of an optional
label, optional condition, instruction, and optional effects. See Common Syntax Elements,
page 348, for more information.
Page 340 · Propeller Manual v1.0
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
cognew(@Toggle, 0)
long
long
COGNEW
and
ORG
mov
mov
add
waitcnt Time, Delay
xor
jmp
|< 16
6_000_000
res 1
COGINIT
0
dira, Pin
Time, cnt
Time, #9
outa, Pin
#:loop
commands, when used to launch Propeller Assembly
DAT
'Launch new cog
'Begin at Cog RAM addr 0
'Set Pin to output
'Calculate delay time
'Set minimum delay here
'Wait
'Toggle Pin
'Loop endlessly
'Pin number
'Clock cycles to delay
'System Counter Workspace
block but care should be taken to
Toggle
.
Main

Related parts for 122-32000