Ake Hedman wrote : > The problem was me nulling TMR0L before TMR0H on one of the edges. > > I still don't understand what the differens is but reversing > the order resolves my problem. If anyone know why this is > like this I'm very interested to learn why!? You should write the *high* byte before the *low* byte. See the data sheet for details (section 11.4, page 111). (And read the *low* byte before the *high*, if reading...) Jan-Erik. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist