Page 1 of 2

What Microcontroller Language do you prefer?

Posted: Wed Sep 02, 2009 2:40 pm
by VernGraner
Please take a moment to let us know your preferred language for programming micro controllers. If your preferred language is not listed as a choice above, choose "other" and then reply to this thread with your preference. Thanks! :grin:

Re: Microcontroller Language Poll

Posted: Thu Sep 03, 2009 5:45 am
by gerty
We just got started usung Mikrobasic here at the school. I don't know enough about it to say if it's different from 'basic'. We picked Mikroe basic because it was touted as being the easiest to learn with only 35 or so commands. We purchased the EasyPic4 development board to go with it,
which we really like.

Re: Microcontroller Language Poll

Posted: Fri Sep 04, 2009 1:30 am
by MrAl
Hi,


I always use assembler because i like to always know exactly how the hardware and software
interact.

Re: Microcontroller Language Poll

Posted: Sun Sep 06, 2009 11:45 am
by Gorgon
I've used assembler for embedded projects at work and private for 30+ years, and I'm starting on C now, at least at work. If you use assembler, you get closer to the hardware. If you are programming an 8-bit micro you'll always need to get very close to the hardware anway, and any higher level language will impose limitations in some form.

TOK ;)

Re: Microcontroller Language Poll

Posted: Mon Sep 07, 2009 2:39 am
by Bob Scott
Around 1983 I attempted to write a simple program to translate assembly language into machine hex code for programming a 6809 uP, so that I might program in assembly instead of hex. However, I abandoned the project. My computer ran Basic only, and it apparently didn't have enough memory to store the required dimesional array. (It was and 8K PET.)

I would prefer Assembly, but I wouldn't mind a Basic compiler either if it is a dialect that can do math and logical functions. uP's would be absolutely necessary for making modern consumer equipment remote controls.

Presently I don't program microprocessors and do not plan to do so in the near future, so I didn't vote.

Bob

Re: Microcontroller Language Poll

Posted: Mon Sep 07, 2009 3:30 pm
by psycho
I use C for just about everything. The only time I use asm is where timing is critical - ISR's, tight timing loops, etc.

Psycho

Re: What Microcontroller Language do you prefer?

Posted: Mon Oct 12, 2009 7:24 am
by RiJoRi
Late entry! :shock:

Given my druthers, I druther program in BASIC. Realistically, I find myself using C. I also look over the assembly for the micro, as well as the Programming Model to get a feel for the micro.

--Rich

Re: What Microcontroller Language do you prefer?

Posted: Tue Oct 20, 2009 4:54 pm
by MrAl
Hi again,


I forgot to mention that i also use another language that i had developed myself for programming PIC's.
The language is fairly simple and like other languages it reads much better than pure ASM.
For example:

A=A+B would add A and B and place the result into A.
A=A|B would logically or A and B and place result into A.
<<A would shift A left.
>>A would shift A right.
A[3]=1 would set bit 3 of register A
A[3]=0 would reset bit 3 of A.
"if A[4]=0 then" would test bit 4 of register A and execute the next line if it is zero,
and skip the next line if it is 1.

Etc., etc.

This makes it a lot faster to get a program up and running when it's a new project.

Re: What Microcontroller Language do you prefer?

Posted: Sat Nov 07, 2009 7:29 am
by wd5gnr
I'm surprised no one has mentioned Forth. I do a lot in assembly and some C on the "big" micros (like the big Arm boards I use). But Forth -- especially cross compiled -- is clean and efficient even on small processors.

One of my "hobbies" is building custom CPUs in FPGAs. I have a very novel architecture for my current machine that is pretty powerful (about 12MIPs, 32-bit machine) and I have a great Forth cross compiler for it. Took about a day to write the compiler--its that easy. Took a few more hours to add the single step debugger and some other things like the cooperative multitasking "kernel" (both in Forth).

A few choice articles on Forth:
http://www.annexia.org/forth - Build a Forth system on Linux step by step. Of course, there is gForth, but what you LEARN by doing these steps is awesome. Well done and true literate programming.

http://www.rfc1149.net/devel/picforth - Forth for PIC.

http://tutor.al-williams.com/picforth1.htm - Tutorial for PIC Forth.

Re: What Microcontroller Language do you prefer?

Posted: Thu Jan 07, 2010 5:51 pm
by don87109
For many years I was an assembler programmer on communications computers, and my own home-built 1802 elf computer. I have used C, basic, and Cobol(yeah, I'm an old guy).

I love assembler, but when you need fancy math a higher level language is really needed (I think C is queen of the pigs). The problem with higher level languages is that you spend more time trying to figure out how to use the commands then actual hardware debugging. Most of the error messages have no relevance and frequently you have to use trial and error to figure things out. Very frustrating.

I did not vote because I haven't programed in a modern environment in about 10 years so my opinion is probably outdated.

I'm thinking about getting into modern micro-controller programming as a hobby, electronics was my first love. So I'll be interested in what everyone else says.

Don

Re: What Microcontroller Language do you prefer?

Posted: Tue Jan 12, 2010 10:13 pm
by stevech
C is like a portable assembler.
Not so C++, C#.
Not much code written in other languages today.
Zbasic.net is a nifty language for humble 8 bitters.

Re: What Microcontroller Language do you prefer?

Posted: Sat Jan 16, 2010 10:30 pm
by alicia ortis
i am using the C language too.. and its more convenient than any other languages...

Re: What Microcontroller Language do you prefer?

Posted: Sun Jan 17, 2010 2:29 pm
by denkiguy
I think C it the way to go except when you are doing something timing critical on an 8 bit processor where it is necessary to use assembly. That said, I have recently started to move away from the 8-bit PICs in favor of the 16-bit variety. I will not miss assembly language programming.

Re: What Microcontroller Language do you prefer?

Posted: Sun Jan 24, 2010 7:08 am
by seraulu1
I try to use C language too.

Re: What Microcontroller Language do you prefer?

Posted: Tue Jan 26, 2010 9:44 am
by Volter
You may like whatever language but if the MC comes preloaded with a specific language you won’t have much choice but to use what’s available unless you can figure out how to use your favorite MC for your project. :grin: