Problem with Freqout in BS2_Functions
JohnBF
Posts: 107
I'm having trouble using the Frequout routine in Martin Hebel's BS2-like routines. I'm sure it's an obvious mistake but I can't figure it out. I wired a piezo speaker to pin 8, and it makes a nice tone with a simple routine that toggles the pin 8 output on and off rapidly. But the program below (the first four blocks copied from BS2_Functions as directed) compiles and runs without an error message, but produces no sound. Is the mistake obvious?
/John
CON
··· _clkmode = xtal1 + pll16x
··· _xinfreq = 5_000_000····················
VAR
··· Long stack1[noparse][[/noparse]50]······· ' Stack for 2nd BS2 Cog
OBJ
··· BS2 : "BS2_Functions"· ' Create BS2 Object
PUB Start | x
····· BS2.start (31,30)··· ' Initialize BS2 Object, Rx and Tx pins for DEBUG
PUB MakeSound
· BS2.FREQOUT(8, 500, 2500)······
/John
CON
··· _clkmode = xtal1 + pll16x
··· _xinfreq = 5_000_000····················
VAR
··· Long stack1[noparse][[/noparse]50]······· ' Stack for 2nd BS2 Cog
OBJ
··· BS2 : "BS2_Functions"· ' Create BS2 Object
PUB Start | x
····· BS2.start (31,30)··· ' Initialize BS2 Object, Rx and Tx pins for DEBUG
PUB MakeSound
· BS2.FREQOUT(8, 500, 2500)······
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
StampPlot - GUI and Plotting, and XBee Wireless Adapters
Southern Illinois University Carbondale, Electronic Systems Technologies
Post Edited (Martin Hebel) : 1/28/2007 4:59:37 PM GMT