27220 Parallax Inc, 27220 Datasheet - Page 115

BOOK STAMPWORKS

27220

Manufacturer Part Number
27220
Description
BOOK STAMPWORKS
Manufacturer
Parallax Inc
Datasheet

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
This is another situation where conditional compilation directives are particularly
useful. To accommodate COUNT using any BASIC Stamp 2 module, we can add this
block to our program:
Now that we have a multiplier for the
modified like this:
… and the program will behave in the same manner using an BS2-family module.
Take it Further
Improve the responsiveness (make it update more frequently) of this program by
changing the COUNT period. What other adjustment has to be made? How does this
change affect the ability to measure very low frequency signals?
#SELECT $STAMP
#ENDSELECT
#CASE BS2, BS2E
#CASE BS2SX
#CASE BS2P, BS2PX
#CASE BS2PE
DurAdj
DurAdj
DurAdj
DurAdj
COUNT FreqIn, OneSec */ DurAdj, cycles
CON
CON
CON
CON
$100
$280
$37B
$163
Duration
parameter, the COUNT code is
' Duration / 1
' Duration / 0.400
' Duration / 0.287
' Duration / 0.720
' count for for 1 second

Related parts for 27220