Hello Stephen, When you're coding for C compiler, normally you will not need to bother about the compiler managed resources (check the compiler user's guide for the list of all compiler managed resources). Now for your specific question: Say if you want to assign a value 10 to SFR, you could just write: SFR = 10; where SFR is defined in the corresponding processor header file that you're using. So you might need to include the header file for the processor you're using (at the beginning of you source file). The more elegant way would be include the generic header file . Then make sure you're choosing the correct processor in MPLAB menu. If you want to assign something to user define variable: int user_variable; user_variable = 10; Note: as you can see from above example, you don't need to worry about the W0 or whatever the compiler might use as the 'intermidiate' register... Though you might want to check the disassembly listing to see what actually happen behine the scene! Best regards, WH Tan > -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu]On Behalf > Of Stephen D. Barnes > Sent: 28 November 2005 11:48 > To: Microcontroller discussion list - Public. > Subject: Re: [PIC]:MPLAB C30 question > > > Stephen D. Barnes wrote: > > >I am new to C in general. I have considered using MPLAB C30 for my dsPIC > >experiments but have run into a stumbling block. Pouring through the > >docs related to C30, I seem to find only compiler info. What I need to > >find for my educational use is any info an the C language as pertains to > >the PIC processor. Do I have to look at the includes and header files in > >order to glean this info on my own with no ecperience with C at all? > >What is the reccommended path for learning C on the PIC? I am a good > >self starter and just need a kickstart in the right direction thast will > >get me over the initial hump. Thanks. > > > > > > > Thanks for the replies! To narrow this down a little bit...I have > recently acquired the books, software, etc. related to C and C++ on the > PC. I am doing the reading and some exercises in an attempt to > familiarize myself with the language, so I beleive I am on the right > track in that regard. What I need is target specific language reference > relating to the dsPIC processors. Most of what I find is compiler > specific which does not give me any concept of how to configure the chip > in C30 or make use of peripheral functions of the chip. For example, in > ASM30 (assembly), one would in general, do the following to place a > value into a register: > MOV #literal_value, W0 ; move literal value into working register 0 > MOV W0, SFR ; move contents of working register 0 to > special function register (or any other specified) > > How are the registers manipulated in C30.....what are they called in > C30....are the register names the same as in assembly? > I see some C code using #pragma's to do things that other code examples > do withuot using the #pragma. It is the target specific info I need. If > gleaning this info from includes and header files is required, then that > is what I will do. I was curious if there existed any handy reference > for these things. Again, all I seem to find is compiler specifics that > do not guide one in the use of the language specific to the chip. Thanks > again for any replies. > > -- > Regards, > Stephen D. Barnes -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist