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

CCS #bit question

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







CCS #bit question
PostPosted: Fri Apr 29, 2005 9:41 am     Reply with quote

I am new to CCS I have a question about the #bit. Currently I am using it in this manner.

#bit TXEN=0x98.5
#define dTX_ENABLE 1
...
TXEN=dTX_ENABLE;
....
TXEN=~dTX_ENABLE;

On the last asssignment of TXEN, I get an error stating that a constant value of 254 is out of range 0...1. I can't figure out how this value is getting stored.
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

View user's profile Send private message Visit poster's website

PostPosted: Fri Apr 29, 2005 9:49 am     Reply with quote

I think you want the uinary operator. "!" The "~" is typecasting your bit to a byte and the doing the ones compliment.
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