' Time Signal Generator, aka BBC Pips ' by Charlie Davy, February 2010 : updates and information via http://www.charliedavy.co.uk ' ' This code produces a sequence of 5x 100mS 1KHz pips followed by a 500mS pip just like the ' Greenwich Time Signal as used by the BBC. It is triggered by a +5v pulse on PIN0 of the Stamp module. ' Please see my "PIPS" software which can provide this (via serial port). ' ' Remember to keep the trigger pin grounded (via a resistor) to avoid erractic behaviour and false triggering! ' You will need to filter the outputted tone with a couple of capacitors. ' ' {$STAMP BS2} ' {$PBASIC 2.5} ' {$PORT COM1} TRIGGER PIN 0 PIPS PIN 5 LED PIN 7 TONEFREQ CON 1000 ' 1KHz tone, change it if you want! MAIN: IF TRIGGER = 1 THEN DO_PIPS: GOTO MAIN DO_PIPS: DEBUG "PIP!" , CR HIGH LED FREQOUT PIPS,100,TONEFREQ LOW LED PAUSE 900 DEBUG "PIP!" , CR HIGH LED FREQOUT PIPS,100,TONEFREQ LOW LED PAUSE 900 DEBUG "PIP!" , CR HIGH LED FREQOUT PIPS,100,TONEFREQ LOW LED PAUSE 900 DEBUG "PIP!" , CR HIGH LED FREQOUT PIPS,100,TONEFREQ LOW LED PAUSE 900 DEBUG "PIP!" , CR HIGH LED FREQOUT PIPS,100,TONEFREQ LOW LED PAUSE 900 DEBUG "PIP!" , CR HIGH LED FREQOUT PIPS,500,TONEFREQ LOW LED GOTO MAIN END