Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Most microcontroller manufacturers provide some sort of cross-compiler where you can compile the code on your PC and then transfer it over to the microcontroller. </p> <p><strong>Why C?</strong><br> An advantage of C is that your code will be easier to port to other microcontrollers in the future. The history of computing has shown that code typically outlasts hardware implementations.<br> A second advantage is control structures (if, for, while) that make code more readable and maintainable. </p> <p><strong>Why Assembly Language?</strong><br> You can hand craft optimizations. </p> <p><strong>Verdict</strong><br> As is often the case with this sort of question, the trade-offs are very dependent on the specific use.<br> Be aware that it is often possible to mix the two by making assembly calls within C code, so you can find a balance that is right for your project.</p> <p><strong>Specific to the PIC hardware</strong><br> It <a href="http://www.voti.nl/picfaq/index_1.html#Where%20can%20I%20get%20a%20GCC%20for%20PICs?" rel="noreferrer">seems</a> that you don't have the option of GCC with most PIC hardware. On the other hand, as a commenter noted, the Microchip C30 compiler for the 16-bit PIC24 and dsPIC33 is gcc.<br> PIC is also not yet supported by <a href="http://sdcc.sourceforge.net/" rel="noreferrer">SDCC</a>.<br> <strong><em>New Info: according to a comment, SDCC has workable support for PIC.</em></strong><br> There are some other open source <a href="http://en.wikipedia.org/wiki/PIC_microcontroller#Open_Source" rel="noreferrer">options</a>, but I don't have experience with them. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload