I'm using STK500 and STK501 with ATMega128L.
I'm getting strange behaviors with my code. I'm removed all but the simplest of code from my app and it still acts strange.
The code enters the BlinkLED routine just fine but then gets stuck there. I set a break point inside the while loop and watch i change from 0, 1, 2, 3, 4 but then the loop executes again and i goes 0, 1, 2, 3, 4 again. I just repeats this over and over and never jumps past the while loop.
It's driving me nuts. Any ideas?
/* ATMEGA128L */ /* GNU GCC */ void BlinkLED(void) { uint8_t i; i=0; while(i<4) { i = i + 1; LED_SET_ON; _delay_ms(200); LED_SET_OFF; _delay_ms(200); } }
Edit: Removed irrelevant code.