<PULSE.bas> ' PBASIC library, these routines were written
for ARMexpress, and included for general reference
FUNCTION COUNT ( pin, milliseconds )
Count the number of pulses low-high-low or
high-low-high on pin over a duration of milliseconds, returning
the value to variable.
'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
Differences from other BASICs
- no equivalent in Visual BASIC
- different syntax from PBASIC, and times in milliseconds rather than