Sorry for my bad Eng
Can't find bug (compiler or not?)!
It must toggle Port D pins each 400 mseconds.
But each 30 switches it toggle faster then 30 switches smooth and ....
If move this peace of code to timer isr then no bug
How to fix it ?
Please help )
Thank You!
Project in attach.
Code: Select all
main:
.......................................
Wait:
_tsec_now=Tsec
If (_tsec_now-_tsec_old>400*msec) Then
PORTD=not PORTD
_tsec_old=Tsec
End If
GoTo Wait