|
|
View previous topic :: View next topic |
Author |
Message |
Rocket Guest
|
Help on BIT definition please |
Posted: Fri Aug 26, 2005 2:20 am |
|
|
Hi all. I need to make a driver, that works for the 16 and 18 parts.
And the input signal can be on CCP1 in or CCP2 in, so this is where I fall off the bus. My code looks like this..
Code: |
#if defined(__PCH__)
#if defined use_CCP2
#byte CCP_CON = 0xFBA // CCP2CON Reg
#bit CCP_Flag = 0xFA1,0 // CCP2IF FLAG
#else
#byte CCP_CON = 0xFBD // CCP1CON Reg
#bit CCP_Flag = 0xF9E,2 // CCP1IF FLAG
#endif
#byte PIR1 = 0xF9E // PIR1 Reg
#else
#if defined use_CCP2
#byte CCP_CON = 0x1D // CCP2CON Reg
#bit CCP_Flag = 0x0D,0 // CCP2IF FLAG
#else
#byte CCP_CON = 0x17 // CCP1CON Reg
#bit CCP_Flag = 0x0C,2 // CCP1IF FLAG
#endif
#byte PIR1 = 0x0C // PIR1 Reg
#endif
|
the "#bit" does not work, and i need to test for the relevant CCP interupt flag in my program..
Thanx.. |
|
|
Ttelmah Guest
|
|
Posted: Fri Aug 26, 2005 2:46 am |
|
|
The 'bit' seperator, is a '.' not a ','...
#bit CCP_Flag = 0xFA1.0 // CCP2IF FLAG
Best Wishes |
|
|
|
|
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
|
Powered by phpBB © 2001, 2005 phpBB Group
|