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

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
{{Output.spin
Toggles Pin with Delay clock cycles of high/low time.}}
CON
PUB Toggle
''Toggle Pin forever
{Toggles I/O pin given by Pin and waits Delay system clock cycles
in between each toggle.}
Single line comments begin with at least one apostrophe (
line. Executable code can be to the left of a single-line comment but not to the right of it
since that would make it “commented out.”
following…
Multi-line comments begin with at least one open curly brace (
close curly brace (
the right of multi-line comments. Multi-line comments can actually be entirely on one line,
or can span across multiple lines.
given...}
If a comment begins with just one apostrophe (
comment. This is a comment meant to be read by code developers while reviewing the
source code itself.
If a comment begins with either two apostrophes (
no spaces in between, it is a “document” comment. This is a special type of comment that is
visible within the code, but can also be extracted by the Propeller Tool into a document
formatted for easier reading, containing no executable code.
As discussed in Chapter 2View Modes on page 61, the Propeller Tool’s editor has a
Documentation view mode.
Documentation view mode is selected, the code is compiled and the document comments are
Pin
Delay = 3_000_000
dira[Pin]~~
repeat
!outa[Pin]
waitcnt(Delay + cnt)
” comments are both examples of a multi-line comments.
= 16
” comments are examples of single-line comments.
}
). Unlike single-line comments, executable code can be to the left and
With the above code entered into the editor, if the
{ I/O pin to toggle on/off }
{ On/Off Delay, in clock cycles}
'Set I/O pin to output direction
'Repeat following endlessly
' Toggle I/O Pin
' Wait for Delay cycles
The “
{On/Off Delay...}
'
) or one open curly brace (
''
The “
) or two open curly braces (
'
'Set I/O pin…
) and continue until the end of the
Propeller Manual v1.0 · Page 101
{
” and “
) and end with at least one
{Toggles I/O pin
{
” and “
), it is a “code”
{{
'Repeat
), with

Related parts for 122-32000