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

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
returns the current value of the System Counter, so this line means “wait for System Counter
to equal 3 million plus its current value.” In this code example, we didn’t specify any clock
settings for the Propeller chip, so by default it runs with its internal fast clock (about 12 MHz)
meaning a delay of 3 million clock cycles is about ¼ second.
Remember how we said to pay close attention to each line’s indenting? Here is where
indenting is required: the Spin language uses levels of indention on lines following
conditional or loop commands (
structure. In this case, since the two lines following
least one space beyond
repeat
can make them more visible on-screen through the Block-Group Indicators feature. Use
Ctrl+I to toggle this feature on or off. Figure 3-8 shows our example code with these
indicators visible.
If you haven’t saved this example object yet, you may do so by pressing Ctrl+S (or selecting
File → Save from the menu). You may save it in a folder of your choosing but make sure to
save it with the filename “Output.spin” since some exercises below rely on it.
loop. If you have trouble recognizing these structural groupings, the Propeller Tool
repeat
’s column, those two lines are considered to be a part of the
IF
,
CASE
,
REPEAT
, etc.) to determine which lines belong to that
repeat
are indented to the right by at
Propeller Manual v1.0 · Page 95
Figure 3-8: Block-
Group Indicators
Ctrl+I toggles them on
and off.

Related parts for 122-32000