CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Help on BIT definition please

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Rocket
Guest







Help on BIT definition please
PostPosted: Fri Aug 26, 2005 2:20 am     Reply with quote

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







PostPosted: Fri Aug 26, 2005 2:46 am     Reply with quote

The 'bit' seperator, is a '.' not a ','...

#bit CCP_Flag = 0xFA1.0 // CCP2IF FLAG

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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