Shop OBEX P1 Docs P2 Docs Learn Events
how to make the eb500 work with the buzzer(very urgent) — Parallax Forums

how to make the eb500 work with the buzzer(very urgent)

minminminmin Posts: 1
edited 2006-12-12 15:54 in BASIC Stamp
following is the sound source code. and when i put it into pin 9 it does sound. the·buzzer works on one of the PIO lines which is pin 9 with no eb500,·how can I add eb500 to support it and they can work together? can anyone provide me with useful source code?

is very urgent please reply asap. thans


' {$STAMP BS2}
' {$PBASIC 2.5}

SOUND VAR Byte

··· 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 0··· ' Silent pause (rest).
··· '
··· FOR i = 0 TO 28 ' Play the 29 notes of the LOOKUP table.
····· LOOKUP i,[noparse][[/noparse]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 9,225,f,(f MIN 8) - 8
····· NEXT
Sign In or Register to comment.