Welcome in the fascinating world of PSoCs!
To give you a bit more help it is advisable to post the complete project here. So we all can have a look at your settings and at your code. To do so: In Creator 3 File -> Create Workspace Bundle (minimal) and the attach the resulting file (DO NOT USE CHROME!!! That will not work, use ie).
In order to up the swing across the Piezo wire it between 2 pins,
and drive the pins 180 out of phase. In a 5V system that = 10 Vp-p
Also some piezos, if buzzers, have a narrow band spectrum response,
so drive it with as function generator, simulating psoc, and look at its
resonances on a scope.
1. As suggested by Dana, driving the speaker with two 180 out of phase signal is better. You can drive the signal with square wave just to test.
2. Do you have the whole speaker or just the speaker element? If it is just the element, you need to mount the piezo element to some hard surface. I used to glue a dead TO-92 (without the legs) on a piece of unused PCB to the middle of the speaker.
Have you check that you are using a piezo speaker and not a buzzer?
Thank you bob, my project should be posted below. I use fire fox (because who uses IE?) so maybe it will work from here.
blast, it is a buzzer. I got it in my Bora Board kit. So I tried it with a small speaker I pulled out of a dead laptop. That didn't work either. Not a peep.
Its not clear to me what the project is doing, some obervations -
1) You did not start WaveDAC8_2.
2) What pins are the peizo connected to ?
3) Both WaveDAC8s are configed as current source, not voltage
source which they should be. You should config as 0 4 V, buffered,
4) If you want to use WaveDAC8 as tone source, use an opamp and build
a G = -1 inverting amp, and use that to drive phase reversed output for piezo.
Use an amplifier and a schottky-diode to short negative voltages to ground.
Your code (as simple as it is) looks alright. Only the output pin I would set it to "analog Hi-z"
Forgot to add, when configing the Wavedac choose the buffered output.
For interface circuits, etc -
If at any time you tristate both outputs to piezo then use a ~ 1M Ohm R across it to
bleed off potential voltage buildup.
That did it! thank you Dana. Eventually I'll understand what all the options in the drop downs do, and how to get at wat I want. This was very helpful getting me over the inital difficulties of dealing with how this stuff works. If anyone is interested, the final design is attached below for this problem.