27220 Parallax Inc, 27220 Datasheet - Page 118
27220
Manufacturer Part Number
27220
Description
BOOK STAMPWORKS
Manufacturer
Parallax Inc
Datasheet
1.27220.pdf
(230 pages)
Specifications of 27220
Accessory Type
Booklet
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
StampWorks
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Not applicable / Not applicable
- Current page: 118 of 230
- Download datasheet (3Mb)
The BASIC Stamp’s PULSIN function is designed to measure the width of an
incoming pulse. By using PULSIN to measure the high and low portions of an
incoming signal, its period and frequency can be calculated. The result of PULSIN
(on the BS2) is expressed in units of two microseconds. First the PULSIN values
are converted to µs by the following formula:
Scale refers to the units of the PULSIN command. Thus, the formula for calculating
frequency becomes:
This creates a problem for BASIC Stamp math though, as values are limited to 16
bits (maximum value is 65,535). To fix the formula, we can divide 1,000,000 by 16
(62,500) and rewrite the formula like this:
This formula works with any BS2 module – after the raw measurements from
PULSIN have been converted to microseconds. This is the purpose of the Scale
constant in the program: it converts the raw input from PULSIN to microseconds for
the generalized frequency calculations.
Run the program and adjust the 10 kΩ potentiometer. Notice that the Debug
Terminal window is updated without delay and that there is no waiting as when
using COUNT to determine frequency. This method of measuring a frequency works
better at higher frequencies (above 100 Hz).
period = (pLow + pHigh) */ Scale
Frequency = 1,000,000 / period (µs)
Frequency = 62,500 / period (µs) * 16
Related parts for 27220
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
COMPETITION RING FOR SUMOBOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
TEXT INFRARED REMOTE FOR BOE-BOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
CONTROLLER 16SERVO MOTOR CONTROL
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BASIC STAMP LOGIC ANALYZER
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: