Hello,
I have spent hours to check why my code below cannot show Number 3 in my seven segment display.
I have 3 sensors (all OK, receive logic 1 and logic 0 output) and connect them to PIC). I can get output shows Number 0, 1 and 2 to the seven segment except Number 3.
It has something to do with counter. Your help is highly appreciated.
UP MOVLW h'00'
MOVWF COUNTER,0 ;CLEAR COUNTER ZONE A
BTFSS PORTC,1 ;CHECK SENSOR 1
BRA SENSOR2
INCF COUNTER,1,0
SENSOR2 BTFSS PORTC,2 ;CHECK SENSOR 2
BRA SENSOR3
INCF COUNTER,1,0
SENSOR3 BTFSS PORTC,3 ;CHECK SENSOR 3
BRA DECISION
INCF COUNTER,1,0
BRA DECISION