Society of Robots - Robot Forum

Software => Software => Topic started by: jocatch on July 22, 2010, 03:44:56 PM

Title: What language do the micro controllers use?
Post by: jocatch on July 22, 2010, 03:44:56 PM
I am trying to fast forward from the 1980's and 1990's when I built my 8085 and 8052 BASIC based robots. Back then I used BASIC and assembly lang to program them.

Now I am thinking about building a new SOTA project using Arduino or Axon. Looks like these are based on C or C++. I have used BASIC, Pascal, Fortan and machine langs in the past but never could get my hands around C. Will I have to learn C or C++ for anything I build today using Arduino or Axon? I have heard of the BASIC STAMP but looking at its code, it doesn't look like any basic I have ever seen. Plus I want something more powerful and expandable than the Stamp. Any inputs? Thanks.

JC
Title: Re: What language do the micro controllers use?
Post by: Webbot on July 22, 2010, 04:09:16 PM
You CAN use assembly - but I wouldn't recommend it for anything unless its so time critical and your higher level language is not fast enough. ie use it by exception. Its not always portable and its not very easy to understand/write unless you are using it day in day out.

You really need to learn C. Not always a million miles away from Basic in that you have many of the same constructs: IF/THEN/ELSE, DO/WHILE, FOR etc etc

Do not attempt C++ (object orientated C) until you understand C as it is built on top of C.

At the end of the day the language you use is fed through a compiler to produce assembly code which is then uploaded to the micro controller.
Title: Re: What language do the micro controllers use?
Post by: waltr on July 22, 2010, 08:17:48 PM
If you know Pascal and Fortran then C should be hard, it has similarities to both.

Get the book: The C Programming Language, by Kernigham & Ritchie
http://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628 (http://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628)

Title: Re: What language do the micro controllers use?
Post by: jocatch on July 22, 2010, 09:19:13 PM
I used Fortran and Pascal a very long time ago, I am sure I remember 0% about them. I need a really basic book on C. I'll find one soon as I think I have decided on the Arduino Mega controller.

JC
Title: Re: What language do the micro controllers use?
Post by: jocatch on July 23, 2010, 10:06:47 AM
Well, I went up in my attic and found a book I got years ago called "New C Primer Plus" by the Waite group. It is the first edition from 1990 but I figure C hasn't changed that much over the years and the C that runs on the microcontrollers would be the same. I hope!

JC
Title: Re: What language do the micro controllers use?
Post by: macdad- on July 23, 2010, 01:46:43 PM
C has pretty much been the same structure for the past decade, so any book on C will be sufficient.
Title: Re: What language do the micro controllers use?
Post by: idee17 on January 24, 2013, 09:13:51 PM
If you needed something more powerful then the stamp and Arduino uno I would take a look at the Arduino DUE they use 32 arm core so beating out 8 bit processors are pretty easy. Also the DUE as UART and various other differences over the  Arduino uno.

~Idan
Title: Re: What language do the micro controllers use?
Post by: newInRobotics on January 25, 2013, 01:19:38 AM
I used Fortran and Pascal a very long time ago, I am sure I remember 0% about them. I need a really basic book on C. I'll find one soon as I think I have decided on the Arduino Mega controller.

JC
Why not try internet tutorials? Follow links in this post --> http://www.societyofrobots.com/robotforum/index.php?topic=14947.msg109175#msg109175 (http://www.societyofrobots.com/robotforum/index.php?topic=14947.msg109175#msg109175)