[quote:a0188053ec]What happens is that the timing of the pin toggle is not regular when the code is compiled with the line "bit_1 = bit_2" in the sub routine. It seems that the bit "tick" is corrupted. With the line removed the timing of the pin toggle is perfect. [/quote:a0188053ec]
I can confirm it.
I have tested on my board with mega88, 8 MHz.
I have set prescaler and OCR for 1 sec interrupt.
With this it looks like every 14th toggle in main is missing.
When the Bit_operation() is not called then the code works well.
Strange.
↧