RCTIME -- Obsolete PBASIC routine
 
Syntax


  ' PBASIC library, these routines were written for ARMexpress, and included for general reference

#include <PULSE.bas>                           ' source in /Program Files/Coridium/BASIClib

FUNCTION RCTIME ( pin, level )

Description

Measure the time which pin remains at level, returning the value to variable.
The length of time is measured in microseconds(us). The minimum time measured is 1 microseconds.
If pin is not at level when the function is called variable is set to 1.
If pin remains at level longer than 1 second variable is set to 0.
Example

#include <PULSE.bas>

DIR(7)=0   

'... some external device has set input pin 7 to low or 0 volts

tim = RCTIME (7, 0)
PRINT "Pin 7 low for "; tim; " us"

'... function waits for input pin 7 to go to high state

Pin 7 low for 50 us

Differences from other BASICs

See also