Dear Robert, thanks for the quick response. I was actually using the MPLAB SIM but I nevered thought about what SIM stands for... Robert Rolf wrote: Antonis Iliopoulos wrote: > thanks for pointing out that the frequency is 250 Hz. This makes the resolution bits 14. No it doesn't. You only have 10 bits to work with CCP1L & 2 extended bits in ?? The two extended bits in CCP1con bits 4 and 5 clear and set them with BCF , bsf. > Does it effect the CCPr1l? probably not. > Also for a 18 ms period I need a 1 MHz clock and a 16 prescaler and this will give me a maximum 2 degree accuracy. Is that right? As I told you in a prior piclist posting, you CAN do it with a high crystal rate, but you have to use interrupts. Maybe later when you get better at coding. At the moment I am possitioning the servo, so it is doing the work. I will use interrupts when I am not under time pressure. What are the disadvantages of running at 1MHz instead of 4? regards Antonis > > Also where can I find a simulator in MPLAB? In MPLAB 6.x Debugger/Select Tool/MPLAB sim. PLEASE use the online help that comes with MPLAB. I don't mind helping you, but I EXPECT you to 'do your homework'. That means EXPLORING the tools you have. Robert -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist --------------------------------- ALL-NEW Yahoo! Messenger - all new features - even more fun! -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist