problems with variables
Posted: Fri Feb 01, 2008 9:28 am
Hi all!
Here is my problem:
![Image](http://img511.imageshack.us/img511/8315/unbenanntuu9.jpg)
as you can see in the picture, i first set the variable "test=0"
Then i check if an interruptflag is enabled (IRVST)
If the interruptflag is enabled, i whould like to set "test" to 1
i tryed this with:
MOVLW 0x01
MOVWF gbl_FCV_TEST
if the flag is not enabled, i whould like to set "test" to 0
MOVLW 0x00
MOVWF gbl_FCV_TEST
then i leave the assembly label and i check with an if request if "test" is 1 or 0
if "test" is 1 i whould like to put out 1 on port A0
else do nothing
but this isnt working... how can i manage it to get it working?
Here is my problem:
![Image](http://img511.imageshack.us/img511/8315/unbenanntuu9.jpg)
as you can see in the picture, i first set the variable "test=0"
Then i check if an interruptflag is enabled (IRVST)
If the interruptflag is enabled, i whould like to set "test" to 1
i tryed this with:
MOVLW 0x01
MOVWF gbl_FCV_TEST
if the flag is not enabled, i whould like to set "test" to 0
MOVLW 0x00
MOVWF gbl_FCV_TEST
then i leave the assembly label and i check with an if request if "test" is 1 or 0
if "test" is 1 i whould like to put out 1 on port A0
else do nothing
but this isnt working... how can i manage it to get it working?