On 21 Dec 2017 at 1:14, andrew kelley wrote: > Still it bothers > me as to why the code runs fine on a 18f4550, but not a 18f2550. Not the > target code mind you, but the simplest test code that reproduces the > issue. > > > char degCtr; > void main(void) > { > char tmp; > TRISB=3D0; > degCtr=3D0; > while(1) > { > tmp=3D255; > while(tmp) tmp--; > tmp=3D255; > while(tmp) tmp--; > degCtr++; > LATB=3DdegCtr; > } > } > I have in the past had problems with compiler supplied header files alterin= g the=20 behaviour of the config macros, between chips and between compiler versions= ,=20 although in my case it was Hi-Tech/MicrochipXC8. With that in mind, and if = not tried=20 already, I'd double check with and without WDT enabled, even change the WDT= =20 period to see if it's related. Not shown in your code above is disabling of interrupts. Perhaps the bootlo= ader is=20 leaving something in an unexpected state. --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .