# Learning MPLAB XC [closed]

I am trying to learn mplab xc8. I am familiar with C and C++. I have written some code using these languages. But while I am trying to learn mplab, I couldn't find any good source or book. For example I know what TRIS means but I don't know how to write it to program (btw I know how).

Neither datasheet nor mplab help section worked for me. I mean for example while I am learning C language there are a lot of books which explain code and how to use it.

Where should I start to study?

There is some resources about Microchip on their developer's website. You will find some example about 8,16,32 bits microcontrollers and more.

You can also take a look on some code examples.

Did you ever write some code for microcontrollers? If not, buy a development board, you will have plenty of code examples for a specific dev board.

• Thank you. Then you mean I can learn these concepts with examples. – Anıl Kırıkkaya May 22 '18 at 5:53

(Note that, when I last checked, MPLAB X IDE is supplied separately from the compilers XC8, XC16, and XC32.)

XC8 compiles C89 a.k.a. C90 with a few extensions, all documented in the User Guide. (Soon it will compile C99 and C11 when asked, but that has not yet been released.)

When you #include <xc.h>, that pulls in declarations for the various Special Function Registers on the chip you select at compile-time. These SFRs are specified as integers and bitfields of appropriate sizes. You simply read from them and write to them just like you would any other variable.