V/F Converter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-09-08 01:31 PM
Any Forum Discussions, App Notes or sample projects on using a micro to create a simple V/F converter? This isn't rocket science, but I do not want to reinvent the wheel either.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-09-08 05:28 PM
http://www.digikey.ca/product-detail/en/microchip-technology/TC9400EOD/TC9400EOD-ND/6152269
from Microchip.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-09-09 04:09 AM
Use ADC samples to update a TIM configured for PWM.
As you say, not rocket science.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-09-09 04:56 AM
what i would do configure both adc and timer in a way that the dma will transfere the adc-value directly into the timer-compare register without software interaction.
i just like to let the hardware do its job :D- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-09-09 04:59 PM
Unfortunately, it's not that simple. In order to change the frequency of a PWM signal, you need to change both the ARR and CCRx registers (or, just the PSC - but that gives poor granularity and linearity). Some manipulation of the ADC value is probably required as well (e.g. divide-by-2 before loading into CCRx). I can't see a way to make it a purely hardware process; CPU time is required, probably in an ADC interrupt, to process the ADC output and use the results to update multiple TIM registers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-09-10 01:26 PM
For 50% duty the toggle mode can be used, with compare set very low. Then it's enough to manipulate ARR.
But I can't see why manipulating PSC would yield different resolution and ''linearity'' (except in the 32-bit timers). Period is always reciprocal to frequency. JW- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-09-10 03:46 PM
Toggle mode hadn't occurred to me, possibly because I've never had cause to use it. That would solve one problem.
Fair point about PSC -v- ARR; they're on the same number line, which is always non-linear (y=1/x). Some alternate approach - an NCO, perhaps - would be required for linearity. I still can't see any way to avoid needing to process the ADC output.