Embedded programming

Aashish Joshi

Aashish Joshi

@aashish-VrevFC Oct 26, 2024
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

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • durga ch

    durga ch

    @durga-TpX3gO Aug 22, 2009

    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.

    <a href="https://www.cdac.in/" target="_blank" rel="nofollow noopener noreferrer">C-DAC: Centre for Development of Advanced Computing, India</a>
  • Aashish Joshi

    Aashish Joshi

    @aashish-VrevFC Aug 22, 2009

    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

    @debu-62iszV Aug 22, 2009

    @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

    @aashish-VrevFC Aug 22, 2009

    @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

    @nocker-Qfmb9K Aug 22, 2009

    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

    @aashish-VrevFC Aug 23, 2009

    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

    @wassup-ayhA3F Aug 23, 2009

    @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

    @aashish-VrevFC Aug 23, 2009

    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

    @wassup-ayhA3F Aug 23, 2009

    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

    @aashish-VrevFC Aug 23, 2009

    Thank you 😁