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

Need help with ccstcpip.h...

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







Need help with ccstcpip.h...
PostPosted: Thu Dec 25, 2008 9:15 am     Reply with quote

Hi, recently i am do some study regarding CCS tcpip. When i look into the codes, i get stucked with these:


Code:

*0xF92=*0xF92 & 0xFC;   //a0 and a1 output
 *0xF93=*0xF93 & 0xCF;   //b4 and b5 output


What does it means with 0xF92? And where can i find them? Thanks...[/code]
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

Re: Need help with ccstcpip.h...
PostPosted: Thu Dec 25, 2008 9:42 am     Reply with quote

leejok2003 wrote:
Hi, recently i am do some study regarding CCS tcpip. When i look into the codes, i get stucked with these:


Code:

*0xF92=*0xF92 & 0xFC;   //a0 and a1 output
 *0xF93=*0xF93 & 0xCF;   //b4 and b5 output


What does it means with 0xF92? And where can i find them? Thanks...[/code]


0xF92 is the address of TRISA
0xF9B is the address of TRISB

The code is setting up a0, a1, b4 and b5 as outputs.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Thu Dec 25, 2008 9:48 am     Reply with quote

It's an alternative syntax for accessing PIC18 SFRs, curiously never mentioned in a CCS C manual, as far as I'm aware.

A more usual syntax would be

#byte TRISA = 0xf92
#byte TRISB = 0xf93
TRISA &= 0xFC;
TRISB &= 0xFC;
leejok2003



Joined: 25 Dec 2008
Posts: 32

View user's profile Send private message

PostPosted: Thu Dec 25, 2008 9:57 am     Reply with quote

Oh...now i see...thanks guys Very Happy
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