RB7 is multiplexed. In the ISR for every 500ms the RB7 toggles (on/off).
What I need is to turn on /off (toggle) the LED1.In my coding both the LEDs toggle.I don’t need to toggle both I need only LED1.
Please help me to solve it.
Thanks
What I need is to turn on /off (toggle) the LED1.In my coding both the LEDs toggle.I don’t need to toggle both I need only LED1.
Please help me to solve it.
Thanks
Code:
MTPX bsf PORTA,0 ;turn on LED0
movf M1,W ;get the jump value
call Delay
bsf PORTA,1 ;turn on LED1
movf H1,W ;get the jump value
call Table
btfsc PORTB,7
iorlw b'10000000'
movwf PORTB
call Delay1
goto MTPX
Delay call Table
btfsc PORTB,7 ;has the bit7 is set?
iorlw b'10000000' ;yes,then keep the bit7 show
movwf PORTB
Delay1 decfsz Del,F
goto $-1
clrf PORTA ;clrf PORTA
movlw b'10000000' ;clrf PORTB without harming bit7
andwf PORTB,F
return
Attachments
Last edited: