Hi. I'm using MPLAB X IDE v3.2 and I've just realised I can turn the xc16 optimisation level up to 1 free-of-charge. However now my code doesn't work. I have a simple while loop as an example
Compiles to the below, which clearly doesn't loop after decriminenting W8
xc16 Battling the optimiser
Code (Text):
- unsigned short i;
- i = 2000;
- while(i>0)
- {
- __delay_ms(1);
- Lcd_Process();
- i--;
- }
Code (Text):
- 997: unsigned short i;
- 998: i = 2000;...