Hugo,

I've had a bit of play with these numbers but given I don't really know exactly what they are doing, I haven't been real successful.

I have tried the 100ms delay as both shorter (50ms) and longer (166 and 200ms) and the problem only seems to get worse either way. I tried changing the length of the for (a=0;a<50;a++) loop to 25 on line 1016 for a worse result. I also replaced the for loop with the original udelay(1), which seemed to really slow things down.

You say you think it's not temperature related - however if you are only using a ceramic resonator for the PIC then surely that could/would affect the frequency that it's operating at. Mine definitely gets much much worse when it's "warmed up" (40C according to hijack) as compared with cold (about 25C) here in Oz.

If there's anything you think I should try let me know. As I said, I'm guessing big time from what you have recently said so I'm probably wasting my time.


Edited by Shonky (20/02/2002 07:43)
_________________________
Christian
#40104192 120Gb (no longer in my E36 M3, won't fit the E46 M3)