Servo motor attachment line stops my dc motor.

I have included both servo motor and dc motor in my program.. For controlling my dc motor speed i used pwm pins with analogWrite function. When i include attachment line (myservo.attach(9);) my dc motor stops rotating. When i upload my program without this line my motor works properly. If i include this line(myservo.attach(9);) then dc motor wont rotates.

*Servo motor supply was given individually and board was also individually supplied and dc motor was also individually supplied..

What to do?? with out that line i cant attach my servo motor. If i include servoattach line then dc motor stops working..

On boards other than the Mega, use of the library disables analogWrite() (PWM) functionality on pins 9 and 10, whether or not there is a Servo on those pins.

http://www.arduino.cc/en/Reference/Servo

Welcome to the forum.

Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code. It will be formatted in a scrolling window that makes it easier to read.

Thanks.. Tom... :)

Thanks a lot!!!!!!!!!!! :):)