Skip to main content
paulh100
Associate
January 16, 2010
Question

DAC

  • January 16, 2010
  • 2 replies
  • 1472 views
Posted on January 16, 2010 at 13:10

DAC

    This topic has been closed for replies.

    2 replies

    paulh100
    paulh100Author
    Associate
    May 17, 2011
    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
    Associate II
    May 17, 2011
    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