skyrock
New Member
Hi everyone,
Once i've tried to use a variable to change for bit number but it wouldn't work.. didn't know whether this can be done. can anyone point out if this is workable? (it is not a full code but just to get the picture across)
It actually worked if I define "var1 equ 1", but it wouldnt work with the code above?
Regards..
Once i've tried to use a variable to change for bit number but it wouldn't work.. didn't know whether this can be done. can anyone point out if this is workable? (it is not a full code but just to get the picture across)
Code:
pic=16f628
cblock
var1
endc
movlw .1
movwf var1
bsf STATUS, var1
It actually worked if I define "var1 equ 1", but it wouldnt work with the code above?
Regards..