Which programming language should I learn first?

Discussion in 'Programmer's Corner' started by epic_newb, Apr 15, 2011.

  1. epic_newb

    Thread Starter Member

    Apr 10, 2011
    44
    0
    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?
     
  2. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    2,908
    2,169
  3. epic_newb

    Thread Starter Member

    Apr 10, 2011
    44
    0
    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 :)
     
  4. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    2,908
    2,169
    C is a great language for micro-controllers because it was created to build programs that deal directly with hardware with none of the OO goop that tries to make programming a abstraction of human thought instead. That has its place but usually not at the bit-bang level.
    http://www.uow.edu.au/~hasan/buss930/prog/paradigm.htm
     
  5. nerdegutta

    Moderator

    Dec 15, 2009
    2,515
    785
  6. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    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.
     
  7. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    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.
     
  8. epic_newb

    Thread Starter Member

    Apr 10, 2011
    44
    0
    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
     
  9. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    2,908
    2,169
    Your teacher is right, but C is THE "general" high level macro assembly language. You will have to "Grok" the hardware which means a understanding of specific processor registers and systems is necessary to write hardware interface modules.
    http://en.wikipedia.org/wiki/Grok
     
  10. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    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.
     
  11. epic_newb

    Thread Starter Member

    Apr 10, 2011
    44
    0
    I like that word :) Grok :p

    Ok, I have my books. Now all I need is an IDE for windows. Any suggestions?
     
  12. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    2,908
    2,169
  13. epic_newb

    Thread Starter Member

    Apr 10, 2011
    44
    0
    ok :) and what are your views regarding visual studio? someone said I could get a free copy because I'm a student.
     
  14. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    2,908
    2,169
    Never used it but it should be ok for writing Windows system based software.

    OT:
    Reading the books of http://en.wikipedia.org/wiki/Robert_A._Heinlein when I was young totally changed my outlook of life, in a good way.
     
  15. DumboFixer

    Active Member

    Feb 10, 2009
    219
    34
    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.
     
  16. JoeAnt

    New Member

    Apr 15, 2011
    6
    0
    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.
     
  17. epic_newb

    Thread Starter Member

    Apr 10, 2011
    44
    0
    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.
     
  18. magnet18

    Senior Member

    Dec 22, 2010
    1,232
    124
    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 ;)
     
  19. JoeAnt

    New Member

    Apr 15, 2011
    6
    0
    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.
     
  20. epic_newb

    Thread Starter Member

    Apr 10, 2011
    44
    0
    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: Apr 17, 2011
Loading...