How do I use the analog out pins of PSoC to generate waves, say triangle wave etc?
PSoC 1 has a digital to analog converter (DAC) which can be used for this.
A good place to start would be this application note - AN2025 - Analog – Sine Wave Generation with PSoC® 1
The first example project shows how you can define your waveform using a lookup table, and then feed it to the DAC to generate a scaled, proportional analog voltage.
Thanks for the suggestions. With the WaveDAC or VDAC, the output range is limited to 0 to 4.080V. Is there something internal to PSoC which can scale to 5V like a PGA?
Otherwise I might go with the PSoC 1 approach, simple 8 bit DAC updates.
The PSOC III PGA is rated to swing to 150 mV of either rail with a 100K ohm load.
An alternative approach is to use an integrator approach, step response of an integrator
is a ramp. Note in PSOC 1 the output buffer does not have R-R performance either.
Use of an integrator can give you more linearity, and with a simple AGC loop will handle
different frequencies to yield a constant amplitude output. Additionally should be able
to achieve higher frequencies than with DAC/LUT approach. The only significant downside
would be lowest ramp rate achievable due to leakage.
The prior post has severe limits on frequency output, LUT case, < 1 Khz for 64 bit LUT.
1) Use BPF and feed it with a square wave, you can get 100 Khz like performance.
Limitation is tuning BPF, calculations and register writes needed to do this. And
limits on low frequencies obtainable.
2) PSOC 3/5 Wavedac component. www.cypress.com/
3) External DDS, DC to 100 Mhz +. www.psocdeveloper.com/.../an-pointer/an2380/an-file/an2380.pdf.html