Jan-Erik Soderholm wrote: >Ake Hedman wrote : > > =20 > >>I have an ICD 2 and set a breakpoint in the main loop where I do a=20 >>calculation from a running mean of the sampled values every=20 >>second. The results a "strange and random" (probaly not when >>I know why as always :-) ) as they are not related to the actual >>signal in any way (as seen on the scope and expected result). >> =20 >> > >OK. I see. I've never use any ICDx, so I've no idea what happens to >the timers and other "free-running" stuff when it hits a breakpoint. >I think I have seen something about problems to "debug" I2C and >similiar when using breakpoints and the ICDx, but I'm not sure. >Or was it interrupts ? Never mind... > >But, I would guess that that info (that you use the ICD2 to read out >the values) could have been a great value to others if it had been >known earlier in the thread. > > =20 > >>But I will go over the code again (round 3275-- ;-). >> =20 >> > >What *I* would do in this case, would be to write up a short >test-case that only (more or less) has the duty cycle calculation. >Or are all those 3275 lines (or words) part of the calculation ? > > =20 > You misunderstood me here. Probably my fault... What I tried to say=20 (write!) was that I have checked the code 3275 times all ready... But as you say it's time to take it all apart and do check 3276... ;-) Thanks for your kind help. Let you know what a I find.... /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