' Purpose: Stamp Metal Detector ' 'Programmer: Beau Schwabe ' Date: Aug 29, 2004 ' ' Platform: original BS2 ' '{$STAMP BS2} '{$PBASIC 2.5} '{$PORT COM1} Sensor VAR Word ' Word to hold Sensor value Main: LOW 0 ' Discharge the cap PAUSE 1 ' for 1 ms RCTIME 0, 0, Sensor ' Measure RC charge time DEBUG ? Sensor ' Show value on screen if connected FREQOUT 15,10,Sensor ' Make Sensor value audable GOTO Main 'Additional Schematic Notes: ' ' ' The oscillator runs at about 750 kHz and is rich in harmonics. ' ' It is necessary to use an external regulator for the 5V supply. ' I used two 9V batteries... One just for the Stamp, and the other ' supplying the 5V regulator. Both of GND terminals must be tied ' together.