Jinx wrote: >>If I now set a high prescaler on timer0 this works fine. The problem >>is that if I use a high prescaler value I get to bad resolution. So I=20 >>lower the prescaler and also count timer owerflows. Now I just get >>very strange and random results. >> =20 >> > >Are you clearing TMR0 and the roll-over counter at each IRQ ? > > =20 > Yes I do that on the falling edge. /Ake --=20 --- Ake Hedman (YAP - Yet Another Programmer) eurosource, Brattbergav=E4gen 17, 820 50 LOS, Sweden Phone: (46) 657 413430 Cellular: (46) 73 84 84 102 Company home: http://www.eurosource.se =20 Kryddor/Te/Kaffe: http://www.brattberg.com Personal homepage: http://www.eurosource.se/akhe Automated home: http://www.vscp.org --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist