Hi Bob, When you write to a timer (including clearing it), you also reset the prescaler. It sounds like you are resetting the prescaler *after* the pulse you are expecting has been received (and it appears like it's never coming in). This could happen if you are running this code in an interrupt handler which is actually taking more time than you expect it to (ie taking more cycles than you are expecting). Hopefully this will give you some ideas - if not, maybe you can give us some more details. Good luck, myke >'Help!' > >I am new to PICs and need some help > >I have written a program to position a target at various positions, >At first I used TMR0 (no pre-scaler) with no problems! (well not many) >However as I needed more accuracy I altered the program to use TMR1 >(asynchronous, prescaler 1) >The problem is that each time I write, or clear the counter it does not >appear to count the first pulse after these operations, but in simulation >it does. > >any ideas, am I just doing something stupid? > > >Many thanks > > >Bob > > "If people don't know what you're doing, they don't know what you're doing wrong." - Sir Humphrey Appleby K.C.B