I'm receiving a number (1-10) from PC via USART.It must turn on & off the RA0 number of times.
Means if I receive "4" it must turn on & off "4" times the RA0.
But the problem is it always looping more than 50 times every time.
Means if I receive "4" it must turn on & off "4" times the RA0.
But the problem is it always looping more than 50 times every time.
Code:
Begin call Update ;get the USART number
movf Data1,W
movwf Repeat ;move to Repeat
bsf PORTA,0 ;turn on LED for a while
call Delay
call Delay
call Delay
RepCircle bcf PORTA,0 ;turn off LED
call Delay
bsf PORTA,0 ;turn on LED
call Delay
decfsz Repeat,F
goto RepCircle
call Delay
Waithere goto Waithere