the general principle is that u make a little routine with say 1 ms delay then u repeat that the number of times u need to get the desired longer delay. Depending on if u need the pic to perform other tasks while in the delay-routine u must count in the time it takes for it to do that so the delay is accurate, this can be very tricky and should be avoided if possible. Also, u could use a IRQ routine but that usually insn't on the beginners first-to-do list. I haven't used the '84 so i am not sure if it has a PWM output, that should be possible to use for servocontroll ??? > I am new to the PIC microcontrollers and would like to ask if anyone here > could help me with this simple problem. I would like a delay that I can vary > between 1ms and 2ms, and I am not sure how to do it. I have a crystal > (3,579545) with two caps (22pF) if that helps. I want to have a variable > that I can change in order to change the length of the delay. If you want to > know I need this to control some servo motors and I use a pic16F84 because I > think it's perfect to be able to erase it so easily. > > /Johan