vijayanmct
Newbie level 4
- Joined
- Sep 18, 2013
- Messages
- 6
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 44
Hi, kindly correct my code for LED Chaser on PORTB in a PIC16F628A. I am using MikroBasic Pro.
I wish to have a continuous loop from RB0 to RB7 and back to RB0 to RB7.
By using my code, given below, LED moves from RB0 to RB7 and goes off for ever and required a reset for the next run.
thank you.
I wish to have a continuous loop from RB0 to RB7 and back to RB0 to RB7.
By using my code, given below, LED moves from RB0 to RB7 and goes off for ever and required a reset for the next run.
thank you.
Code:
'4Mhzs internal Osc
Dim Cnt as Byte
main:
trisB = 0
portB = 0
Cnt = 1
loop:
portB = Cnt
delay_ms(1000)
Cnt = Cnt*2
goto loop
End.
Last edited by a moderator: