Shop OBEX P1 Docs P2 Docs Learn Events
Problem with Freqout in BS2_Functions — Parallax Forums

Problem with Freqout in BS2_Functions

JohnBFJohnBF Posts: 107
edited 2007-01-28 17:04 in Propeller 1
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)······

Comments

Sign In or Register to comment.