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

using INDF and FRS register in ccs?

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



Joined: 19 Jan 2004
Posts: 5

View user's profile Send private message Send e-mail

using INDF and FRS register in ccs?
PostPosted: Wed Jan 21, 2004 11:23 am     Reply with quote

hi there,

Is it posible to have access to the INDF and FSR registers in a PIC 16F876.

In Mplab it is possible to use indirect adressing using these registers.but in the CCS (C programming)manual I can't find the use of this kind of data storage?

Greetz
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

Re: using INDF and FRS register in ccs?
PostPosted: Wed Jan 21, 2004 12:16 pm     Reply with quote

Frans wrote:
hi there,

Is it posible to have access to the INDF and FSR registers in a PIC 16F876.

In Mplab it is possible to use indirect adressing using these registers.but in the CCS (C programming)manual I can't find the use of this kind of data storage?

Greetz


If you define those bytes you need to access then you can use them directly.

Another solution would be to use an Array. You dont have to do indirect addressing in assembly. There are several examples included with the CCS compiler that use a buffer with an indirect addressing index.
Darren Rook



Joined: 06 Sep 2003
Posts: 287
Location: Milwaukee, WI

View user's profile Send private message Send e-mail

PostPosted: Wed Jan 21, 2004 12:20 pm     Reply with quote

Yes, you can.

But this is C. Do it the right way: use pointers.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Wed Jan 21, 2004 2:01 pm     Reply with quote

Yep, it is C but its embedded C. There are certain occassions where you might want to. I have had to locate variables and use indirect addressing to cut down on code size to get the code to fit Smile But I agree with Darren to use a pointer unless it is abolsutely necessary.
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