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

How to enter the 2bytes register in the SFR?

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



Joined: 05 May 2011
Posts: 10

View user's profile Send private message

How to enter the 2bytes register in the SFR?
PostPosted: Tue Aug 09, 2011 12:17 am     Reply with quote

Hi guys,

I have to enter the RPINRx and RPORx registers in the SFR of 24FJ family pics.
Till now I used the getenv() function in the way for example:
Code:

#byte INTCON = getenv(SFR:INTCON)

The both registers RPINRx and RPORx have yet 2 bytes.
Do you have any idea how to enter bitwise the registers?

Much 10x in advance!

greets GR
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Tue Aug 09, 2011 4:42 am     Reply with quote

Simply refer to #bit syntax, it allows bit a index up to 15 for 16 bit processors.

Code:
#bit INTCONxx12 = INTCON.12
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Aug 09, 2011 9:03 pm     Reply with quote

Also look at #word in the PCD manual.

For examples of how it's used, look in these files:
Quote:

c:\program files\picc\drivers\lcd.c
c:\program files\picc\drivers\addr_trap.h
c:\program files\picc\drivers\pic24_usb.c
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