Author Topic: What language do the micro controllers use?  (Read 1795 times)

0 Members and 1 Guest are viewing this topic.

Offline jocatchTopic starter

  • Jr. Member
  • **
  • Posts: 29
  • Helpful? 0
What language do the micro controllers use?
« 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

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,166
  • Helpful? 111
Re: What language do the micro controllers use?
« Reply #1 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.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 98
Re: What language do the micro controllers use?
« Reply #2 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


Offline jocatchTopic starter

  • Jr. Member
  • **
  • Posts: 29
  • Helpful? 0
Re: What language do the micro controllers use?
« Reply #3 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

Offline jocatchTopic starter

  • Jr. Member
  • **
  • Posts: 29
  • Helpful? 0
Re: What language do the micro controllers use?
« Reply #4 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

Offline macdad-

  • Robot Overlord
  • ****
  • Posts: 131
  • Helpful? 5
Re: What language do the micro controllers use?
« Reply #5 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.

Offline idee17

  • Full Member
  • ***
  • Posts: 71
  • Helpful? 1
Re: What language do the micro controllers use?
« Reply #6 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
There are 10 types of people in the world: those who understand binary, and those who don't.

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: What language do the micro controllers use?
« Reply #7 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
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

 


Get Your Ad Here