2008-08-26 10:09 PM
Timer control using ADC
2011-05-17 03:42 AM
Hello everyone
I have a small doubt in implementing the TIM1 control using the ADC. I have modified the peripheral transfer example (ADC-DMA-TIM1) to my need. Here is my question. I should have a timer running 50% duty cycle (constant period) always and if my ADC value goes more than 7FF, the timer should immediately break and restart again after the set period. Anyone has an idea to implement this? AR2011-05-17 03:42 AM
Thanks.. Thats a good idea.. I am a newbie to this controller. I checked the interrupt (using CRO) from the ADC and the output toggled as coded. How do i restart the timer from here (in the ADC interrupt routine)?
Thanks AR2011-05-17 03:42 AM
you could use the adc analog watchdog (the analog bounds checker, whatever the name is) and restart the timer from the watchdog ISR.