Editing Programming Languages

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 
== Introduction ==
 
== Introduction ==
  
Perhaps the title should be for '''Programming Languages Microcontrollers''', in any case that is what the content is now and probably should stay.
+
Very high level languages are less suitable for microcontrollers, so the choices are less then one would find on a PC.  The main programming languages used in microcontrollers are Basic, C, and assembly.
 
+
Microcontrollers are generally harder to program then PCs because it isn't as easy to view debugging output, it takes more time to flash a new firmware, and the tools are generally less developed then PC tools.  One suggestion is to learn basic programming on a PC first and then migrate to embedded systems after gaining some understanding.  One hint on selecting a language is to always consider using the same language as the people you work ( play ) with do.  This makes getting help much easier.  Or pick a language with a strong support system on the internet.  Of course the language cost and features matter too.
Very high level languages are less suitable for microcontrollers, so the choices are less than one would find on a PC.  The main programming languages used in microcontrollers are Basic, C, and assembly.
 
Microcontrollers are generally harder to program than PCs because it isn't as easy to view debugging output, it takes more time to flash a new firmware, and the tools are generally less developed than PC tools.  One suggestion is to learn basic programming on a PC first and then migrate to embedded systems after gaining some understanding.  One hint on selecting a language is to always consider using the same language as the people you work ( play ) with do.  This makes getting help much easier.  Or pick a language with a strong support system on the internet.  Of course the language cost and features matter too.
 
  
 
== Basic ==
 
== Basic ==
Line 31: Line 29:
 
C is a middle level language that is considered to be high enough for productivity but close enough to the hardware to have some of the power of assembly. C has free form formating rules so the look of C varies according to style and C compilers tend to produce harder to debug error messages.  C is gaining in popularity over assembly with microcontrollers as embedded systems are becoming more and more complex.
 
C is a middle level language that is considered to be high enough for productivity but close enough to the hardware to have some of the power of assembly. C has free form formating rules so the look of C varies according to style and C compilers tend to produce harder to debug error messages.  C is gaining in popularity over assembly with microcontrollers as embedded systems are becoming more and more complex.
 
<s>C is almost always compiled instead of interperated.</s>
 
<s>C is almost always compiled instead of interperated.</s>
Advanced C requires understanding of pointers which requires lower level understanding of the hardware than some people are interested in going.  C compilers can be very expensive, however several free or demo versions of compilers are available.  
+
Advanced C requires understanding of pointers which requires lower level understanding of the hardware then some people are interested in going.  C compilers can be very expensive, however several free or demo versions of compilers are available.  
  
 
=== For Pics ===
 
=== For Pics ===
 
* [[Use C for PIC Programming!]]
 
* [http://sdcc.sf.net/ SDCC] supports 16fxxx and 18fxxx parts from Microchip. Open source. Integrates with [http://piklab.sf.net/ Piklab] and [http://eclipse-sdcc.sf.net/ Eclipse].
 
* [http://www.htsoft.com/products/ Hi-Tech PICC] Pro, Standard and Freeware compilers for PIC10/12/16, PIC18, PIC24, dsPIC, and PIC32. OS X, Linux and Windows compilers available.
 
 
* [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010014&part=SW006011 Microchip C18] For 18fxxxx parts from Microchip.  Integrates with MPLAB. Free student/Demo version is available that has some optimizations disabled.
 
* [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010014&part=SW006011 Microchip C18] For 18fxxxx parts from Microchip.  Integrates with MPLAB. Free student/Demo version is available that has some optimizations disabled.
 
* [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010065&part=SW006012 Microchip C30] For Microchip's DsPIC and PIC24 microcontrollers.  GCC based with extensions.  Free student/Demo version available.  
 
* [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010065&part=SW006012 Microchip C30] For Microchip's DsPIC and PIC24 microcontrollers.  GCC based with extensions.  Free student/Demo version available.  
Line 57: Line 51:
 
* [http://www.ram-tech.co.uk/ IRTC], a Forth for the PIC18Fxxx microcontroller family.
 
* [http://www.ram-tech.co.uk/ IRTC], a Forth for the PIC18Fxxx microcontroller family.
 
* [http://mary.pepix.net/ mary], an Optimizing Forth Compiler for the PIC
 
* [http://mary.pepix.net/ mary], an Optimizing Forth Compiler for the PIC
* [http://flashforth.sourceforge.net/ FLASHFORTH] for the PIC18 and PIC24 microcontrollers and for the dsPIC30 and dsPIC33 DSPs.
+
* [http://flashforth.sourceforge.net/ FLASHFORTH] for the PIC18Fxxx microcontroller family.
 
* [https://devel.goto10.org/packets/wiki/purrr Purrr] is a Forth dialect for microcontrollers. Currently has a PIC18Fxxx microcontroller implementation.
 
* [https://devel.goto10.org/packets/wiki/purrr Purrr] is a Forth dialect for microcontrollers. Currently has a PIC18Fxxx microcontroller implementation.
 
* [http://pic18forth.sourceforge.net/ Pic18Forth] is a 16-bit implementation of the Forth programming language for Microchip PIC18Fxx2 microcontroller devices.
 
* [http://pic18forth.sourceforge.net/ Pic18Forth] is a 16-bit implementation of the Forth programming language for Microchip PIC18Fxx2 microcontroller devices.
 +
  
 
=== Forth for other microcontrollers ===
 
=== Forth for other microcontrollers ===
Line 70: Line 65:
 
== C++ ==
 
== C++ ==
  
 +
''Alas, there is no C++ compiler for Microchip PIC.''
  
 
C++ is an extension of C.  Many people consider C++ an object oriented language.  
 
C++ is an extension of C.  Many people consider C++ an object oriented language.  
Line 81: Line 77:
 
C++ is not as common as C for microcontrollers mostly because many microcontrollers are not powerfull enough to run software large enough where the extra features become imporant.  C++ is not supported by as many compilers as C for microcontrollers.
 
C++ is not as common as C for microcontrollers mostly because many microcontrollers are not powerfull enough to run software large enough where the extra features become imporant.  C++ is not supported by as many compilers as C for microcontrollers.
  
*[http://www.sourceboost.com/Products/BoostCpp/Overview.html BoostC++ Compiler Overview]
+
TODO: Give an example of a C++ compiler for microcontrollers.
  
 
== Assembly ==
 
== Assembly ==
Line 92: Line 88:
  
 
== Other ==
 
== Other ==
 
* See the compiler section of [[PIC Links]]
 
  
 
We should expand this section, but for now will just mention some names, you can google them:
 
We should expand this section, but for now will just mention some names, you can google them:
 
  
 
* JAL Just another Language
 
* JAL Just another Language
* [http://pyastra.sf.net/ Python]
+
* Forth, a fourth generation language
 
+
* C++
[[Category:Microcontroller]][[Category:PIC]]
 

Please note that all contributions to OpenCircuits may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see OpenCircuits:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)