This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DAC with out timers

i am a begginer to development of bsp's...i have a lot of problems to add timers for dac progrmming..can i do with out timers ...
if i do with out timers what will be happens ..can any one explain me about with and with out timers for dac programming.please

  • You don't need any timers for using a DAC if all you want is to generate an analog DC voltage.

    But if you want to create a wave form, then the timers are great to make sure you emit each new sample at the correct time. An alternative to timers if you have a pre-recorded waveform is to use DMA.

    An advantage with timers is that if the DAC isn't just emitting a pre-recorded wave-form but is part of a control loop, you can compute new output values each iteration based on sensor data - a DMA-driven DAC assumes you already have multiple known samples ready.

    Anyway - it isn't hard to combine code that makes use of timers with code that uses the DAC and end up with timer-driven DAC output. If it's ok to lock up the main loop and only do wave-form output, then it's possible to code without interrupts, i.e. to just poll the timer to figure out when it's time to update the DAC. But it's way better to have a timer IQR and have the interrupt service routine update the DAC - then the main loop can do other stuff while the DAC keeps getting serviced.

  • Maybe you want to look at some more board support packages, and read the documentation.

    Placing samples in the time domains seems to be a quite important consideration in most cases.