Table of Contents

Advertisement

BASIC Stamp II

COUNT

Count cycles on a pin for some milliseconds.
usage:
COUNT pin,period,wordvariable
Pin will be placed in input mode. For period milliseconds, cycles will
be counted on the designated I/O pin. Both sides of the waveform
must be at least 4µs in duration, which limits the input frequency to
125-kHz (assuming a 50/50 duty cycle). The result (0-65535) will be
written into wordvariable.
Note that a word variable (16 bits) must be used to count above 255.
If you only need values between 0-255, then a byte variable will work.
BASIC Stamp II Manual 0.94 • Parallax, Inc. • (916) 624-8333 • Page 29

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the BASIC Stamp II and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents