5: BASIC Stamp Command Reference – FREQOUT
BASIC Stamp Programming Manual 2.0c • www.parallaxinc.com • Page 125
'{$STAMP BS2} 'STAMP directive (specifies a BS2)
i VAR BYTE ' Counter for position in tune.
f VAR WORD ' Frequency of note for FREQOUT.
C CON 2092 ' C note
D CON 2348 ' D note
E CON 2636 ' E note
G CON 3136 ' G note
R CON 8 ' Silent pause (rest).
FOR i = 0 TO 28 ' Play the 29 notes of the LOOKUP table.
LOOKUP i,[E,D,C,D,E,E,E,R,D,D,D,R,E,G,G,R,E,D,C,D,E,E,E,E,D,D,E,D,C],f
FREQOUT 11,225,f,(f-8) MAX 32768
NEXT
STOP