Also just tried this on another computer with MPLAB v8.76 and C18 =20 v3.42. Same non-working behaviour. Cheers, -Neil. Quoting Neil : > Happy Thanksgiving US folks, > > Trying to figure out why code isn't working, I've whittled it down to > this oddity: > > This works, toggling LED's repeatedly as expected... > > while (1) > { > TRISC =3D 0b10101010; // '0's will turn LED's on. > for (x=3D0; x<200; x++) > { > Delay10TCYx(255); > res++; // Dummy task > } > TRISC =3D 0b01010101; // '0's will turn LED's on. > res++; // Dummy task > for (x=3D0; x<200; x++) > { > Delay10TCYx(255); > res++; // Dummy task > } > } > > > However, when I switch delay functions and adjust the time units > accordingly, the code stalls at the delay... > > while (1) > { > TRISC =3D 0b10101010; // '0's will turn LED's on. > for (x=3D0; x<200; x++) > { > Delay100TCYx(26); > res++; // Dummy task > } > TRISC =3D 0b01010101; // '0's will turn LED's on. > res++; // Dummy task > for (x=3D0; x<200; x++) > { > Delay100TCYx(25); > res++; // Dummy task > } > } > > > This is a fresh install of MPLAB 8.66 with C18 v3.46. I've disabled > all optimizations in the project's build options. What else should I > be checking, or is this a legitimate bug with the compiler/libraries? > FWIW, I also noticed that I could previously use "while (1)" for > infinite loops, but now the compiler hangs for several minutes, memory > usage climbs significantly, then just fails to compile. > > Cheers, > -Neil. > > > > -- > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > --=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 .