Skip to main content

DIR

Syntax

DIR ( expression )

Description

DIR (expression) can be used to set or read the direction of the 16 configurable pins.  If DIR (expression) is 1 then the corresponding pin is an output.  If the value is 0 then that pin is an input.

The ARMmite allows control of 24 pins (0..23), with pins 16..23 shared with the AD pins.

Example

' Set pin 4 as an input

DIR(4) = 0

' Set pin 12 as an output

DIR(12) =

1

Differences from other BASICs

  • no equivalent in Visual BASIC
  • equivalent to DIR0..15 in PBASIC

See also