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 support@ccsinfo.com

direct register access

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



Joined: 09 Mar 2004
Posts: 52
Location: Greater Manchester - UK

View user's profile Send private message

direct register access
PostPosted: Wed Mar 10, 2004 3:40 pm     Reply with quote

Hi All,

Does anyone know how to test/set bits in the registers in the PIC

i.e

Option, Intcon, TMR0 register etc...

I know that the commands in the ccs manual automatically
test and set bits in these registers.

I there anyway to get direct access to these registers. To set bits
or test diffrent bits.

One option would to insert asm code, but this would take away the point of using C in the first place.

I would much value your opinions/answers
_________________
Best Regards
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Mar 10, 2004 4:00 pm     Reply with quote

See my response in this recent thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=18641&highlight=bit

Also:
Here is a file in which all SFR register bits are defined
as bitfields within a structure. He gives examples of
how to access them at the top of his post.
http://www.ccsinfo.com/forum/viewtopic.php?t=296
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