Which programming language should I learn first?

Thread Starter

epic_newb

Joined Apr 10, 2011
44
Hey guys

I have recently become interested in circuits and have slowly been learning things but one thing I have noticed is that alot of the cool projects require some sort of programming.

I know there are many programming languages out there, many which are used primarilyin web development.What kind of programming language would be good for me to learn to do things such as programming microcontrollers and such?

Also, are there any good places you would reccommed for me to learn the language? Or perhaps specific books that you used that helped?
 

Thread Starter

epic_newb

Joined Apr 10, 2011
44
Thanks! I was kind of hoping you would say c actually. I learned a little bit about a year ago but my interest and motivation was a 0. I think I'm going to try my hand at it and see what happens. If I have to I'll take your seconday suggestion. wish me luck :)
 

t06afre

Joined May 11, 2009
5,934
C is a good choice for micro controller work. A book I like is the Beginning C: From Novice to Professional by Ivor Horton. it is on google books. So you can take a look at it. The same is the book. The C Programming Language (sometimes referred to as K&R) written by Brian Kernighan and Dennis Ritchie. Which also is a good book on C.
 

John P

Joined Oct 14, 2008
2,025
I would say be slightly cautious here. I learned C for "big computers" before I got into microcontrollers, and making the logical changes was easy enough. But if you started out with Kernighan and Ritchie and wanted to work with microcontrollers, you might think that you were being given a lot of stuff that wouldn't apply to your projects. Like, features that handle lots of data rather than just testing and setting individual bits. So I'd suggest looking around for a way to learn C specifically for small processors. Sorry, no exact suggestions here.
 

Thread Starter

epic_newb

Joined Apr 10, 2011
44
Thanks for all the suggestions guys! I found two books at my local library that should help "C programming for the absolute beginner" and "C programming a modern approach" and I intend to find more if needed.

A teacher I used to know always talked about how assembly is the best language because it is such a basic machine language. I tried learning it but that didn't work out well. I think learning "C" first will allow me to learn it in the future if i need to.

:D
 

GetDeviceInfo

Joined Jun 7, 2009
2,192
Thanks for all the suggestions guys! I found two books at my local library that should help "C programming for the absolute beginner" and "C programming a modern approach" and I intend to find more if needed.

A teacher I used to know always talked about how assembly is the best language because it is such a basic machine language. I tried learning it but that didn't work out well. I think learning "C" first will allow me to learn it in the future if i need to.

:D
Personally, I don't consider 'assembly' to be a language. Although MASM was one of the predominant tools of the 80's, I cringe when I need to review machine code.
C, and it's available compilers, will give you the largest support across most platforms, and as such should be your default. As most compilers allow you to list machine code, an 'assembler' is not required, however understanding machine code is.
 

DumboFixer

Joined Feb 10, 2009
217
ok :) and what are your views regarding visual studio? someone said I could get a free copy because I'm a student.
You can download Visual Studio Express for free from the Microsoft site http://www.microsoft.com/express/downloads/

There you can download the entire image set as an ISO image and burn it to DVD though be warned it is a very large file.

The express versions are cut down versions of the versions you can buy but they still offer you much much more than you're probably like to need.
 

JoeAnt

Joined Apr 15, 2011
6
If you're looking at using PIC's then 'Programming 8-bit PIC Microcontrollers in C' is a very good book, and MPLAB is a great IDE.

When I started out I learnt assembly, I think it helps you understand exactly what the microcontroller is doing.
 

Thread Starter

epic_newb

Joined Apr 10, 2011
44
Man, just learning how to use this software is going to be a feat unto itself. This information is pretty overwhelming for a complete newb but I'm going to stick to it :p

And I've always said, I'll read any book suggested to me. If you think it is worth suggesting it is probably worth reading so that is on my to-do list as well.
 

magnet18

Joined Dec 22, 2010
1,227
Do you have a graphing calculator?
Most are programmable from within the calculator itself.
I taught myself to program in TIbasic on the TI84, it's beautifully simple and the syntax is almost impossible to mess up if you have the guidebook or google.
Plus you can use it on tests ;)
 

JoeAnt

Joined Apr 15, 2011
6
MPLAB looks quite daunting at first but you won't use most of it to start off, you just want somewhere to write and compile code. I started writing assembly in notepad then compiling in MPASM.

Have you got an application in mind or are you just learning because you know it'll be useful?

I've always found it easier to learn things when I've actually got a practical use for it, it's all well and good working through examples in a text book but I find I take things in quicker if I'm actually working on a project.
 

Thread Starter

epic_newb

Joined Apr 10, 2011
44
Well, I think I have a general feel for how mplab is supposed to work if I have a pic and know assembly language. I wrote some code in notepad, saved it as .c and have been trying to compile c, but I'm not sure how to do it yet :(

help?

And, I planned on just doing the examples in the book until I could get a feel for the lanuage and assign myself some tasks.
 
Last edited:
Top