Page 1 of 1

problems with variables

Posted: Fri Feb 01, 2008 9:28 am
by Andi
Hi all!
Here is my problem:

Image
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?

Re: problems with variables

Posted: Fri Feb 01, 2008 10:27 am
by Benj
Hello

Try using this code instead.

MOVWF _FCV_TEST

This should solve the problem.