Hi all,
I am a newbie to CCS compiler. I am trying to setup the device header file to point to the specific address and it's not working for me. see example below
I don't want to use the setup_ccp1(CCP_PWM) function as it doesn't give me much info.
Mark
Ttelmah Guest
Posted: Mon Nov 26, 2007 5:52 am
Just use the #byte declaration:
#BYTE CCP1CON=0x0FBD
Your pointer declaraion, ought to be possible to make work, probably with:
#define CCP1CON (*(int8 *)(0x0FBD))
However the byte declaration is easier, especially since it also allows #bit declarations as well. It is the volatile keyword, that will prevent it working.
Best Wishes
Ken Johnson
Joined: 23 Mar 2006 Posts: 197 Location: Lewisburg, WV
Posted: Mon Nov 26, 2007 8:28 am
I like these:
#pragma BYTE T0CON = getenv("SFR:T0CON")
#pragma BIT INT0IF = getenv("BIT:INT0IF")
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