Syntax
#include <PULSE.bas>
FUNCTION COUNT
( pin, milliseconds )
Description
Count the number of pulses low-high-low or high-low-high on pin
over a duration of milliseconds, returning the value to variable.
Example
#include <PULSE.bas>
'Report the number of transition cycles on pin 7
during a 10 second interval
ct =
COUNT
( 7, 10000 )
PRINT "Pin 7 transitioned "; ct; " times"
Pin 7 transitioned 3 times
Differences from other BASICs
- no equivalent in Visual BASIC
- different syntax from PBASIC, and times in
milliseconds rather than "ticks"
See also