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

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
DIRA, DIRB
Direction Register for 32-bit Ports A and B.
((PUB ┆ PRI))
((PUB ┆ PRI))
Returns: Current value of direction bits for I/O Pin(s) in Ports A or B, if used as a source
variable.
Explanation
DIRA
the I/O pins. The
bits 0 through 31 correspond to P0 through P31. The
for each of the 32 I/O pins in Port B; bits 0 through 31 correspond to P32 through P63.
NOTE:
pins so only
DIRA
A low (0) bit sets the corresponding I/O pin to an input direction. A high (1) bit sets the
corresponding I/O pin to an output direction. The
cog startup; all I/O pins are specified as inputs by that cog until the code instructs otherwise.
Each cog has access to all I/O pins at any given time. Essentially, all I/O pins are directly
connected to each cog so that there is no hub-related mutually-exclusive access involved.
Each cog maintains its own
Each cog’s
32-bit value becomes the I/O directions of Port A pins P0 through P31. The result is that
each I/O pin’s direction state is the “wired-OR” of the entire cog collective. See I/O Pins on
page 26 for more information.
Page 212 · Propeller Manual v1.0
DIRA 〈
DIRB 〈
and
is used to both set and get the current direction states of one or more I/O pins in Port A.
Pin(s)
pins, to access in Port A (0-31) or Port B (32-63). If given as a single expression,
only the pin specified is accessed. If given as a range-expression (two expressions in
a range format; x..y) the contiguous pins from the start to end expressions are
accessed.
DIRB
DIRB
[Pin(s)]
[Pin(s)]
DIRA
DIRA
is reserved for future use; the Propeller P8X32A does not include Port B I/O
is an optional expression, or a range-expression, that specifies the I/O pin, or
are one of six registers (
register is OR’d with that of the other cogs’
is discussed below.
DIRA
〉 (Reserved for future use)
– Spin Language Reference
register holds the direction states for each of the 32 I/O pins in Port A;
DIRA
register that gives it the ability to set any I/O pin’s direction.
DIRA
,
DIRB
,
INA
DIRA
,
DIRB
INB
register defaults zero, all 0 bits, upon
,
OUTA
register holds the direction states
DIRA
and
registers and the resulting
OUTB
) that directly affect

Related parts for 122-32000