Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: MaltiK on January 23, 2009, 02:57:18 PM
-
.?
-
because a MCU pin can only handle around 40mA of current and motors draw much more than 40mA
-
Ahhh, ok and can any output pin on a MCU connect to an h-bridge to create a PWM cycle to be used by a motor, or does it have to be a PWM pin?
-
You can create the PWM signal in software, but that ties the MCU to that task.
-
Ahh right so it doesnt have to be a PWM Output made by the manufactorer, I can check the C++ library on this site and dedicate a couple of outputs to PWM right?
-
Unless you do somthing like SSC-32, you'll be limited to a few. And by limited, I mean your MCU can't do anything else but software PWM.
-
Open up the datasheet of your mcu and *read* it ;)
Probably on the first 2-3 pages you will see a pin out. Look for the pins that say PWM or OC01A or OC01B . . . stuff like that.
-
Ahh right so it doesnt have to be a PWM Output made by the manufactorer, I can check the C++ library on this site and dedicate a couple of outputs to PWM right?
My C++ library in the member tutorials generates PWM in software, for DC motor controllers, so can actually use ANY output pin.
The library also includes hardware PWM for driving servos on the dedicated PWM output pins.