Programming a microcontroller: Use High level langyage or Assembly?

Discussion in 'Embedded Systems and Microcontrollers' started by sireiz, Feb 25, 2014.

  1. sireiz

    Thread Starter New Member

    Dec 28, 2013
    6
    0
    I want to build a car security system(Supposition) with the following features:
    a. Auto door lock after 5 minutes
    b. GPS tracking system shutting the engine while we left from our city
    c. Sound/Jerks detection and raising alarm

    I want to provide all of above features making use of micro-controller with the following specifications:
    a. 4 I/O ports
    b. 1 Serial port
    c. 512 KB of code memory


    Should I use any higher level or assembly language?
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,446
    3,362
    There are pros and cons. Six of one and half-dozen of the other.

    Besides we would not allow discussion of this project on AAC if it is related to automotive modification.
     
  3. sireiz

    Thread Starter New Member

    Dec 28, 2013
    6
    0
    Thanks, please if you can give me any link where i can find the advantages and dis advantages. I would be grateful.
     
  4. MrChips

    Moderator

    Oct 2, 2009
    12,446
    3,362
    It also depends on your tastes and personality.

    Do you prefer Pepsi or Coke?
    Are you a day person or night person?
    Do you pee with the lid up or down?:)
     
    absf and tshuck like this.
  5. sireiz

    Thread Starter New Member

    Dec 28, 2013
    6
    0
    :D In fact it is my homework so, you know, i needed some help on that.
     
  6. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    If you use a high level language like C. You will probably save a lot of time coding your project. And you also have a vast program memory. Using assembler will be like flogging your self. But some like that to. What kind of microcontroller do you plan to use
     
  7. MrChips

    Moderator

    Oct 2, 2009
    12,446
    3,362
    In a nutshell, if you are a working engineer needing to get a product out the door, program in C.

    If you are a student learning about embedded systems, learn to program in asm at some point in your education.
     
  8. sireiz

    Thread Starter New Member

    Dec 28, 2013
    6
    0
    thank you both of you. :)
     
  9. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,392
    1,606
    512KB of memory is HUGE for this app.

    Go for C so it can be done in a week.

    Go for assembler if you need something to do during a 2-3 year graduate program and brag you got it under 12K (so you waste the extra 500K).
     
  10. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    512k to use with assembler that would be a pain.

    Even 4k binary produced by assembler is a pain.
     
  11. Art

    Distinguished Member

    Sep 10, 2007
    785
    61
    Left over memory can be random numbers to make the Tetris brick selector appear more random :)

    512K might just be the size of the chip being used, not memory that must be used.
    If a teacher is telling a student that he must consume resources because they are available,
    and judging any quality of a program that way, he shouldn't be a programming teacher.
    Send him here if he's doing that.
     
Loading...