Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 21194

BASCOM-AVR : Problem with bitwise operation inside sub - Please help. : REPLY

$
0
0
[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.

Viewing all articles
Browse latest Browse all 21194

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>