Re: PWM the most efficient way



Alright, searched the google for several hours and found some really
useful assembler code for AVR, the page is catched by google:

http://www.google.com/search?q=cache:S2jXt5C3IokJ:www.avrprojects.net/PWM.htm+avr+microcontroller+%22hardware+pwm%22&hl=sv&ct=clnk&cd=1

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.


--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
.



Relevant Pages

  • Re: Need Advice on PWM and other stuff
    ... I decided that using the motor driven potentiometer was folly, ... the duty cycle) in my PWM control module. ... Since you have an AVR, you might want to replace the 555 ... you may already have a couple of PWM counters on board. ...
    (comp.robotics.misc)
  • Re: PWM the most efficient way
    ... They use hardware PWM and change the pulse width from the usual program ... As I see it now it would be probably easiest to setup one AVR ... supply without software involvement when the code crashes might be ...
    (sci.electronics.misc)
  • Re: Need Advice on PWM and other stuff
    ... Depending on which AVR you have ... Even if you don't have the PWM counters you can build one ... than one pin. ... the PWM output and one pin for the direction. ...
    (comp.robotics.misc)
  • Re: Need Advice on PWM and other stuff
    ... Depending on which AVR you have ... Even if you don't have the PWM counters you can build one ... Just one pin? ... and Dhananjav Gadre's "Programming and Customizing the AVR ...
    (comp.robotics.misc)
  • Re: PID Controller using Microcontrollers
    ... > Need to get an algo/C Code for implementing PID controller in ... > Microcontrollers - if any one has it for AVR Microcontrollers,please ... Google is your friend. ...
    (comp.arch.embedded)