Re: PWM the most efficient way
- From: Chris Jones <lugnut808@xxxxxxxxxxxxxxxx>
- Date: Sat, 24 Jun 2006 01:18:56 +0100
frogfot wrote:
Alright, searched the google for several hours and found some reallyhttp://www.google.com/search?q=cache:S2jXt5C3IokJ:www.avrprojects.net/PWM.htm+avr+microcontroller+%22hardware+pwm%22&hl=sv&ct=clnk&cd=1
useful assembler code for AVR, the page is catched by google:
It's worth considering what the hardware will do if/when the microcontroller
I haven't tested the code yet but it seems to be easy to understand..
They use hardware PWM and change the pulse width from the usual program
loop.
As I see it now it would be probably easiest to setup one AVR
just to generate software PWM signals.. since these uC's are very fast
(4MHz) and motors would need maximum 1-5kHz PWM, one would easily set
up say 10-20 independant PWM "channels" on any AVR chip.
By independant I mean each "channel" can have own frequency, pulse
width and possibility to be changed at any time.
crashes. Some form of hardware watchdog timer which can shut off the motor
supply without software involvement when the code crashes might be
justified in some applications. This probably applies even if the
microcontroller with built in hardware PWM generators is used.
Chris
.
- Follow-Ups:
- Re: PWM the most efficient way
- From: Jamie
- Re: PWM the most efficient way
- References:
- PWM the most efficient way
- From: frogfot
- Re: PWM the most efficient way
- From: frogfot
- PWM the most efficient way
- Prev by Date: Re: PWM the most efficient way
- Next by Date: Re: Analog signal conditioning
- Previous by thread: Re: PWM the most efficient way
- Next by thread: Re: PWM the most efficient way
- Index(es):
Relevant Pages
|