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

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
first seed value moving backward, you would end up with a list of the same numbers as
before, but in the reverse order. This is handy in many applications.
Here’s an example:
?X
The above shows the Random forward form; it uses
pseudo-random number in the forward direction and stores that number back in
?X
X?
The above shows the Random reverse form; it uses
pseudo-random number in the reverse direction and stores that number back in
X?
Since Random is always an assignment operator, the rules of Intermediate Assignments apply
to it (see page 253).
Bitwise Decode ‘
The Bitwise Decode operator decodes a value (0 – 31) into a 32-bit long value with a single
bit set high corresponding to the bit position of the original value. Bitwise Decode can be
used in variable and integer constant expressions, but not in floating-point constant
expressions. Example:
Pin := |<PinNum
The above example sets
position indicated by
If
If
There are many uses for Bitwise Decode, but one of the most useful is to convert from an I/O
pin number to the 32-bit pattern that describes that pin number in relation to the I/O registers.
For example, Bitwise Decode is very handy for the mask parameter of the
WAITPNE
Bitwise Decode becomes an assignment operator when it is the sole operator to the left of a
variable on a line by itself. For example:
|<PinNum
PinNum
PinNum
again results in yet a different number, again stored back into
again results in yet a different number, again stored back into
commands.
is 3,
is 31,
Pin
Pin
is set equal to %00000000 00000000 00000000 00001000.
|<
is set equal to %10000000 00000000 00000000 00000000.
PinNum
Pin
.
equal to the 32-bit value whose single high-bit corresponds to the
X
X
’s current value to retrieve the next
’s current value to retrieve the next
Propeller Manual v1.0 · Page 265
X
X
.
.
X
X
WAITPEQ
. Executing
. Executing
and

Related parts for 122-32000