and the IF THEN statement will have to be modify.
Code:
IF (PORTB.2 = 0) AND (PORTB.3 = 0) AND (PORTB.6 = 0) AND (PORTB.4 = 0) AND (PORTB.5 = 1) Then CounterStop = 9: GoTo Horn_Loops
to something like that
Code:
IF (PORTB.2 = 0) AND (PORTB.3 = 0) AND (PORTB.6 = 0) AND (PORTB.4 = 0) AND (PORTB.5 = 1) Then
CounterStop = 9
GoTo Horn_Loops
endif
in case you don't modify, PBP will not execute the GOTO Horn_Loops statement.
Input/output statements are great, but i'll prefer to use only TRIS and comment it on the right like
Code:
TRISA=%10101010 'PORTA definition
'Input on bits : 1,3,5,7
'output on bits : 0,2,4,6
it's my own opinion. I can agree it can be a bit more readable when using Input/Output statement.
Bookmarks