View previous topic :: View next topic |
Author |
Message |
leejok2003 Guest
|
Need help with ccstcpip.h... |
Posted: Thu Dec 25, 2008 9:15 am |
|
|
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
|
Re: Need help with ccstcpip.h... |
Posted: Thu Dec 25, 2008 9:42 am |
|
|
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
|
|
Posted: Thu Dec 25, 2008 9:48 am |
|
|
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
|
|
Posted: Thu Dec 25, 2008 9:57 am |
|
|
Oh...now i see...thanks guys |
|
|
|