fara793
Newbie level 4
a beginner needs help!!
i am working in project, and i dont how to complete, so please help me, its urgent!!
i need this code to be in a loop:
but if portB=%00000001, i need it to stop the loop and do this:
and then get back to the beginning of the loop,
and the same thing when portB= %00000010
and the same here when portB= %00000100
and the same here too when portB= %00001000
THANK YOU!!!
i am working in project, and i dont how to complete, so please help me, its urgent!!
i need this code to be in a loop:
Code:
portA =%00001100 '(1)
portD =%00001001
delay_ms (2000)
portA =%00010010 ' 1-2
portD =%00001001
delay_ms (2000)
portA =%00100001 '(2)
portD =%00001001
delay_ms (2000)
portA =%00010001 ' 2-3
portD =%00001010
delay_ms (2000)
portA =%00001001 ' 3-4
portD =%00010010
delay_ms (2000)
portA =%00001001 '(4)
portD =%00100001
delay_ms (2000)
portA =%00001010 ' 4-1
portD =%00010001
delay_ms (2000)
but if portB=%00000001, i need it to stop the loop and do this:
Code:
portA =%00001100
portD =%00001001
delay_ms (5000)
and the same thing when portB= %00000010
Code:
portA =%00100001
portD =%00001001
delay_ms (5000)
and the same here when portB= %00000100
Code:
portA =%00001001
portD =%00001100
delay_ms (5000)
and the same here too when portB= %00001000
Code:
portA =%00001001
portD =%00100001
delay_ms (2000)
THANK YOU!!!