IN 
 

Syntax

int IN (int expression )

Description


IN returns the value on the Port 0 pin corresponding to expression.

0 is returned for 0V and 1 for 2.5V or above.

With the SuperPRO and PROplus, NXP has added more configurable port pins.  We are adopting their convention for control of those pins.  FIO0DIR, FIO1DIR, FIO2DIR, and FIO4DIR control the input/output status.  Writing 1 to a bit  will make it an output.  More details in the>NXP user manuals.

Example


    printStr("Pin 15 is ");
    INPUT(15);                          // make pin 15 an INPUT

    printDec(IN(15));                  // now read the value on that pin
    printCh('\n');

See also