0
\$\begingroup\$

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 book which explains codes and how to use them.

Where should I start to study. Thanks a lot.

\$\endgroup\$
0
\$\begingroup\$

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.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Thank you. Then you mean I can learn these concepts with examples. \$\endgroup\$ – Anıl Kırıkkaya May 22 '18 at 5:53
0
\$\begingroup\$

(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.

| improve this answer | |
\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.