Servo control using dsPIC33's Output Compare and Timers
I figured out my problem: my microcontroller was apparently resetting each time the servo was activated because of too much current draw. So I got it working by supplying a separate voltage source to the servo.