Home \ Help \ Search \ Login RSS

Welcome, Guest. Please Login

This forum is now READ-ONLY! Please visit http://forum.wiring.co/ for the new forum.

Wiring ForumWiring HardwareTroubleshooting › pwm making servos not work

Page Index Toggle Pages: 1
pwm making servos not work (Read 3208 times)
03/29/07 at 20:37:44

hack314   Offline
YaBB Newbies
I Love YaBB 2!

Posts: 2
*
 
I currently have 3 servos attached to my wiring board.  They work just fine.  As soon as I add some LEDs to the PWM pins, the servos stop working, and go all crazy.  This only happens when pins 0, 1, or 2 are used on the PWM.  I tried attaching my servos to a bunch of different I/O pins, but it doesn't seem to matter.  It's like having servos attached "uses" up PWM pins 0, 1, and 2.  But the leds attached work just fine on all 6, only the servos are affected.  This is the weirdest crap I have encountered.  Is there something wrong with my board?  Please help.

Embarrassed
 
IP Logged
 
Reply #1 - 03/29/07 at 20:43:03

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
hi, there is nothing wrong with the board, the Servo library uses Timer3 to control the servos, which means that PWM pins 0. 1 and 2 will not work properly when using the Servo library. You could use PWM output pins 3, 4 and 5 with no problem while using Servo, those run on Timer1.
 
IP Logged
 
Reply #2 - 03/31/07 at 21:47:33

hack314   Offline
YaBB Newbies
I Love YaBB 2!

Posts: 2
*
 
Yeah, I figured something like that was going on... there should probably be a mention of this "issue" somewhere in Servo library documentation, it's kind of a big deal.  Maybe it is there and I just didn't see it.  Whatever, thanks for the quick response!
 
IP Logged
 
Page Index Toggle Pages: 1