Joined: 09 Mar 2004 Posts: 52 Location: Greater Manchester - UK
literal values in PIC regs
Posted: Tue Mar 30, 2004 8:36 am
I am trying to set bits on specific values in the PICs registers:
using a 16F84
-------------------------
#define STATUS 0x03 //0x03 is the address of status on the PIC
I try to do the followng but get an error:
"bit_set(STATUS,5);" //select bank 1
ANY IDEAS???? _________________ Best Regards
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Tue Mar 30, 2004 11:32 am
bit_set() operates on a memory location or register.
You're giving it a constant. You need to use the #byte
directive to declare STATUS, instead of #define.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum