Jinx wrote: >>>Are you clearing TMR0 and the roll-over counter at each IRQ ? >>> >>> =20 >>> >>Yes I do that on the falling edge. >> =20 >> > >Hmmm. OK, you think the values you get are "random". But are >they really - is there any kind of pattern or similarity ? Have you >looked at the difference between consecutive readings ? Is there >any change if you put TMR0 in 16-bit mode ? INT0 and TMR0 >IRQ bits are all in INTCON - no mix-up with bit numbers ? > > =20 > Good (and helpful) questions. I shall do a double check on these=20 parameters. You guys gave me some energy now again :-) /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