Timer control using ADC
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2008-08-26 10:09 PM
Posted on August 27, 2008 at 07:09
Timer control using ADC
This discussion is locked. Please start a new topic to ask your question.
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 3:42 AM
Posted on May 17, 2011 at 12:42
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? AROptions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 3:42 AM
Posted on May 17, 2011 at 12:42
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 AROptions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 3:42 AM
Posted on May 17, 2011 at 12:42
you could use the adc analog watchdog (the analog bounds checker, whatever the name is) and restart the timer from the watchdog ISR.
