Wave generate using PSoC?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi there.

   

 

   

How do I use the analog out pins of PSoC to generate waves, say triangle wave etc?

0 Likes
4 Replies
ArvindK_86
Employee
Employee
10 sign-ins 5 sign-ins 10 solutions authored

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.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

The prior post has severe limits on frequency output, LUT case, < 1 Khz for 64 bit LUT.

   

 

   

Alternatives -

   

 

   

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/

   

 

   

www.element14.com/community/docs/DOC-48063/l/cypress-ce56171--training-document-on-sine-wave-generat...

   

 

   

3) External DDS, DC to 100 Mhz +.     www.psocdeveloper.com/.../an-pointer/an2380/an-file/an2380.pdf.html

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

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.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

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.

   

 

   

Regards, Dana.

0 Likes