Embedded programming

I would like to learn assembly language, or something similar which will help me in programming embedded devices. Since I am a complete novice to this, could anyone suggest a good book that introduces the subject "easily".

Also, I have a book on embedded programming with C. Which language would you recommend, C/C++ or Assembly? Also, time is not a factor. I want to master embedded programming, not just cram "widely used" syntax and be done with it. I need flexibility in whichever language i learn

Found a nice article on embedded.com, according to the author, most widely used language for embedded programming is C.

#-Link-Snipped-#

Replies

  • durga ch
    durga ch
    Hi Maddie,

    Embedded C is a good choice. I don't know about the better one between assembly as I don't know too much hands on on assembly. i am not sure if you already know about this,in case you would want to learn it in a defined way we have CDAC institutions in INDIA. They train you on Embedded systems.

    C-DAC: Centre for Development of Advanced Computing, India
  • Aashish Joshi
    Aashish Joshi
    I didn't know CDAC conducted courses on embedded systems!! Thanks for the info

    I am leaning towards C as well. Since I already have a little experience in C/C++ it would be a better choice I think.

    [EDIT]
    Just checked CDAC's website, I am not eligible to take up the embedded system (diploma) course!! They need IT, Comp Science, Electronics,etc engineers only. Plus, it is offered only at their hyderabad centre!! ๐Ÿ˜”
  • debu
    debu
    @mad_scientist: Personally, I feel more comfortable using assembly for programming. IMO, assembly is the only way to accurately describe, the task that you want to perform (Isn't that what programming is all about?). When working with C/C++, one often tends to "leave-it-to-the-compiler-to-figure-out-how-to-do-this-task". As far as C++ is concerned; Generally people using it for embedded projects are using some RTOS or Windows Embedded or something with a high level of hardware abstraction. Since you are interested, google for #-Link-Snipped-#, it allows using JAVA for embedded applications.

    Regards,

    Debu ๐Ÿ˜€
  • Aashish Joshi
    Aashish Joshi
    @debu: you reminded me of a good point I forgot to mention, I would most likely be using uClinux (URL) or something similar (read linux based OS) as my OS.

    Keeping that in mind, which is a better choice: java, c, c++ or assembly.
    Also, I will need to interface my bot with lots of add-ons like colour cameras, thermal imaging cameras, microphone, wireless transmitter/receiver (to control the bot from a distance)..

    Will my ability to interact with these devices depend on the language I choose, or will they provide more or less the same level of control??
  • Nocker
    Nocker
    mad_scientist: I'm not that experienced but would think that C is the way to go... from the point of view of maintainability and getting assistance when required. Also a lot of microprocessors out and coming out in the market have C compilers where they didn't used to.
  • Aashish Joshi
    Aashish Joshi
    Nocker
    mad_scientist: I'm not that experienced but would think that C is the way to go... from the point of view of maintainability and getting assistance when required. Also a lot of microprocessors out and coming out in the market have C compilers where they didn't used to.
    I have heard the same, that most of the microprocessors out there have C compilers..

    Thanks for your feedback guys. Appreciate it!! ๐Ÿ˜
  • wassup
    wassup
    @maddy Most embedded processors use GCC based C compilers, which are advanced and the code generated are very well optimized. C is the prefered choice when you are working at he lowest elve, interacting with hardware etc. You move on C++/JAVA at levels where you need more datastructures and UI stuff.
    In your case say for the control of robots C is prefered. In case you need optimization of the code you use inline assembly (that you write only some part of the codes in assembly,say where u need faster mathematical operations).
    In most cases control of the hardware is about setting bits in register, all the languages provide you with equal cabalities. The difference is when you are implementing things like memory managment (data structure stuff) you need to choose between C/C++/JAVA. So for robotic controls go with C, learn to optimise C code,learn processor archtecture,and learn assembly of one processor (8085,8051, PIC) just to know what compiler does when it generates assembly code for you.
  • Aashish Joshi
    Aashish Joshi
    wassup
    @maddy Most embedded processors use GCC based C compilers, which are advanced and the code generated are very well optimized. C is the prefered choice when you are working at he lowest elve, interacting with hardware etc. You move on C++/JAVA at levels where you need more datastructures and UI stuff.
    In your case say for the control of robots C is prefered. In case you need optimization of the code you use inline assembly (that you write only some part of the codes in assembly,say where u need faster mathematical operations).
    In most cases control of the hardware is about setting bits in register, all the languages provide you with equal cabalities. The difference is when you are implementing things like memory managment (data structure stuff) you need to choose between C/C++/JAVA. So for robotic controls go with C, learn to optimise C code,learn processor archtecture,and learn assembly of one processor (8085,8051, PIC) just to know what compiler does when it generates assembly code for you.
    Thanks for answering my question in such detail. I have decided to use C for use with my bot.

    Do you know of any good book? I found a couple of books on Amazon; Embedded C (by Michael J Pont) and Programming Embedded Systems: With C and GNU Development Tools (Michael Barr)

    Should one of these be OK, or do you know of any other book which I should follow!!
  • wassup
    wassup
    If you haven't already read this #-Link-Snipped-#
    It won't teach you embedded C in specific. But use it for reference. It will teach you lot things you will need. Embedded C is not special, regular C with good practices and optimization, you can go through them on the net like this one #-Link-Snipped-#

    For anything else there is #-Link-Snipped-# ๐Ÿ˜€
  • Aashish Joshi
    Aashish Joshi
    Thank you ๐Ÿ˜

You are reading an archived discussion.

Related Posts

this is the first draft of the poster I made for our college all girls techfest. Its still rough around the edges and not the final draft. I'd like to...
plz help if anyone have poster of Mechanical Geometry or related to mechanical plz share with us.. i need this poster:
was wondering if two nodes in a given wi-max or for that matter in a wi-fi network can communicate with each other without actually going through internet back haul?
The satellites were put in orbit by the French rocket Ariane 5 rocket, operated by Arianespace.This satellite will be co ordinating with the existing fleet of satellite to provide high...
hi i looking forward to do a final year project in following domains 1.SECURITY 2.WEB BASED APPLICATION /Networking using the JAVA or DotNet technologies it would be a real help...