| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| Frans 
 
 
 Joined: 19 Jan 2004
 Posts: 5
 
 
 
			      
 
 | 
			
				| using INDF and FRS register in ccs? |  
				|  Posted: Wed Jan 21, 2004 11:23 am |   |  
				| 
 |  
				| 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
 
 
			    
 
 | 
			
				| Re: using INDF and FRS register in ccs? |  
				|  Posted: Wed Jan 21, 2004 12:16 pm |   |  
				| 
 |  
				|  	  | 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
 
 
			      
 
 | 
			
				|  |  
				|  Posted: Wed Jan 21, 2004 12:20 pm |   |  
				| 
 |  
				| Yes, you can. 
 But this is C.  Do it the right way: use pointers.
 |  | 
	
		|  | 
	
		| Mark 
 
 
 Joined: 07 Sep 2003
 Posts: 2838
 Location: Atlanta, GA
 
 
			      
 
 | 
			
				|  |  
				|  Posted: Wed Jan 21, 2004 2:01 pm |   |  
				| 
 |  
				| 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  But I agree with Darren to use a pointer unless it is abolsutely necessary. |  | 
	
		|  | 
	
		|  |