Hello again, I figured out my first problem, but now I am having problems changing the PWM frequency on the fly. Initially, I set the frequency to 20KHz, then later I go and try to change it to 5KHz, however it continues to stay at 20KHz. I have tried to turn the PWM off before setting the new PR2 and prescale values, however it still refuses to change frequency after the first time. Any more ideas? Regards, James -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads