BASIC Stamp II Manual 0.94 • Parallax, Inc. • (916) 624-8333 • Page 29
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.
Summary of Contents for BASIC Stamp II
Page 2: ...BLANK PAGE...