cancel
Showing results for 
Search instead for 
Did you mean: 

DAC

paulh100
Associate
Posted on January 16, 2010 at 13:10

DAC

2 REPLIES 2
paulh100
Associate
Posted on May 17, 2011 at 13:38

Hi All,

I have just managed to get the on board DAC up and running with the assistance of the TwoChannels_TriangleWave standard peripheral example.

I can see how to change the amplitude of the triangle wave by defining 'DAC_TriangleAmplitude_2047' etc... however I want to be able to change the amplitude (or the frequency) of the DAC output on the fly with a variable.

Is this possible?

FYI The plan is for the end device (with a filter etc...) to output a 4-20mA signal proportional to an RMS approximation of a recorded ADC buffer.

Many Thanks,

Paul.

Chris1
Senior III
Posted on May 17, 2011 at 13:38

Paul,

You may want to consider using a timer (for example, in PWM mode) to create your current output.  The pulse width and frequency of the timer can be easily modified ''on the fly''.

Regards,

Chris