Just to try a piezo to see if it works, just use the HPWM 1,127,2000 command and connect your piezo to the PWM output. I found some processors the SOUND command doesn't work so well for. I would be chasing my tail trying what you are with what I was working on.
Once you know the piezo is good for a PWM output, then work on the SOUND software. My opinion, and I reserve the right to be wrong.
Bookmarks