jmgelba, Because "While" it is the loop A is being incremented until it equals 6 right?
Dave Purola,
N8NTA
jmgelba, Because "While" it is the loop A is being incremented until it equals 6 right?
Dave Purola,
N8NTA
I thought I was incrementing it until it reached 5? If its equal or less than 4 (>=4) is does something, if it is =5 than it does something else. After it has reached either of those conditions it shouldnt increment again.
jmgelba, Yes it could... You understand why the counter = 6 dont you?
while A <= 5 'follow status of i/p turn off fets if i/p goes away
PORTB = %00001100
A = A + 1
IF (PORTA.5 = 1) THen
PORTB = %00000111
WEND
Because if A = 5 you still increment A. Right? So when you drop out of the loop A = 6..
Dave Purola,
N8NTA
Bookmarks