pot makes program hang

so i am using the arduino on the BlinkM MinM http://blog.thingm.com/2011/03/blinkm-smart-led-as-the-smallest-arduino/ its really cool so i am making essentially a microcontroller that will take a reading from a POT and translate it to PWM signal output to drive a servomotor HOWEVER sometimes when i turn the pot all the way up the program will hange and the light turns blue-green i need to check the pins but green usually is lit when the program starts when power is applied blue is normally on and is essentially the PWM output that the servo is connected to its connected just like this http://www.flickr.com/photos/todbot/5549460276/ the power source seems to be just about 5.1 volts so i think it MIGHT be that the high output on the analog read may be higher than the power source AKA higher than the reference voltage which may cause program hang i could REALLY use some help with this and i am not to my knowledge using the pullup resistor on that line thanks ~katzmatt

The output of the pot can't go outside the supply rail voltage range so no issue there (the maximum supply voltage is 6.0V, 5.1 is within spec). Suspect its the code, which I can't see. You might be having trouble with the servo knocking the supply down on transients (though NiMH battery pack ought to be powerful enough).