BSF command will not work as it should HELP
Posted: Wed Jan 11, 2017 1:03 am
with a great deal of help from Martin medelec35
we have come stuck on a simple command that is not doing what it should, so im asking if anyone else could shed some light on to this for me please
I using the EB006v9 board with the pic16f1937 that come with it
uisng pic basic assembly NOT FLOWCODE
I have a program that lights up portb leds in order from portb 0 to 7 then repeats.
It's meant to light them up in order and keep the last led lit showing all 8 lights lit at the end then repeat all over again
The program is very simple just using the bsf command, However when we run the program on the board, the port b led comes on 1 by 1, like the knight rider, however portb 0 comes on then portb 1 comes on but turns off portb 0 led this should not be happening
why are the led's turning off during the sequence??
See attached e03 v2 asm
I then modified the program completely removing the bsf command And instead added the Movlw command Now the program does what it should do,
Attached is the sequence asm file
My question is why is the simple bsf command not doing what it should The leds are turning off by themselves, there is no bcf command We are at a loss. Please help
chloe
we have come stuck on a simple command that is not doing what it should, so im asking if anyone else could shed some light on to this for me please
I using the EB006v9 board with the pic16f1937 that come with it
uisng pic basic assembly NOT FLOWCODE
I have a program that lights up portb leds in order from portb 0 to 7 then repeats.
It's meant to light them up in order and keep the last led lit showing all 8 lights lit at the end then repeat all over again
The program is very simple just using the bsf command, However when we run the program on the board, the port b led comes on 1 by 1, like the knight rider, however portb 0 comes on then portb 1 comes on but turns off portb 0 led this should not be happening
why are the led's turning off during the sequence??
See attached e03 v2 asm
I then modified the program completely removing the bsf command And instead added the Movlw command Now the program does what it should do,
Attached is the sequence asm file
My question is why is the simple bsf command not doing what it should The leds are turning off by themselves, there is no bcf command We are at a loss. Please help
chloe