On 28 April 2010 09:46, Erik Christiansen <[email protected]> wrote:

>> It is also rather out of the scope of the AVR microcontrollers, which
>> have a max PWM rate of (Base Clock / 512)
>
> Err, have you examined the range of AVR microcontrollers, and their
> variety of on-chip hardware enhancements?

Clearly not. I should have been more specific that I had only looked
at the options on the Arduino boards.
But more importantly I am completely wrong about them too! I have
managed to make the initial error of confusing PWM rate with PWM Clock
Timer Rate in the other direction when looking at the capabilities of
the Arduino board. I was thinking that the 2kHz sine wave I am using
for the Resolver interface meant that that was the max PWM rate, but
of course that is the sinusoidal modulation that I am superimposing on
the 31kHz PWM, so not only is 10kHz PWM trivial for an Arduino, I am
actually already using it at three times that frequency

> Just glancing at the AT90PWM3
> datasheet shows that each PSC will clock at 64 Megahertz, with 12 or 16
> bit resolution.                             ============
>
> At first glance, that suggests that on 12 bit resolution, it can't quite
> get _down_ to 10 kHz!

If it is anything like the Atmega328 used on the Arduino board I have
then there is a programmable divider between the system clock and the
PWM timer clock, so getting down to 10kHz is straightfoward. The uC
used in the Arduino boards have a 1024 max divisor which gives 30Hz
PWM and the other versions might have a wider divisor range.

-- 
atp

------------------------------------------------------------------------------
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to