can anyone find an error in here that would prevent it from switching states?
Code:static unsigned char state; static unsigned char countdown; TMR3CN &= ~(0x80); // clear TF3 countdown = countdown-1; if (countdown == 0){ state = state + 1; } if (state > 4){ state = 1; } switch (state){ case 1: P1 = 0x44; countdown = 100; break; case 2: P1 = 0x06; countdown = 16; break; case 3: P1 = 0x11; countdown = 100; break; case 4: P1 = 0x09; countdown = 16; break; }