how does microcontroller work with assembler ?

Discussion in 'Embedded Systems and Microcontrollers' started by vead, Sep 23, 2013.

  1. vead

    Thread Starter Active Member

    Nov 24, 2011
    621
    8
    I am confused actually I don’t know how hardware of microcontroller work with assembly instruction .
    I have read many time that assembler convert assembly code into machine codelike (MOV A, #10H convert in machine code like 01010101). . But I want to know internal process of hardware when assembler work . how the hardware work (what is work of flip flop, gates) I know this is large bunch of electronics I tried google but I did not found exact answer this question is irritated me can someone able to explain with basic example it will be great help for me ......
     
    Last edited: Sep 23, 2013
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,500
    2,366
    Seems this request will run quite gamut!
    From simple flip-flops to the internal workings of an assembler!
    Max.
     
  3. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    The simple answer is that the hardware is a machine that fetches a string of bits (binary digits) from a memory (program store) and interprets the meaning of those bits in a way that certain functions are enabled for a given set of bits while others are not.

    The assembler converts a human readable string of characters into a string of binary digits in such a way as to map the human readable strings of characters into a machine readable string of bits.

    Got it?
     
  4. MrChips

    Moderator

    Oct 2, 2009
    12,415
    3,354
    Microcontroller does not work with assembler.

    Microcontroller works with binary code, ones and zeros.
     
  5. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    Being a bit pedantic today -- are we?
     
  6. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    You should look up a RTL implementation of a simple processor. The placement and numbering of control bits dictate the opcodes...
     
  7. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    To clarify, I think RTL = Register Transfer Level (Language), and NOT Resistor Transistor Logic, which was a precursor of DTL and TTL
     
    tshuck likes this.
  8. sirch2

    Well-Known Member

    Jan 21, 2013
    1,008
    351
    Microcontrollers work with electricity - i.e. current flow, it is just (supposedly) convenient to represent current flowing as 1 and not flowing as 0. The microcontroller has a clock which is a circuit that regularly switches from "on" to "off" – i.e. allows current to flow and then turns it off.

    In a very simple model, every time the clock ticks some other set of "switches" change state. The state they change to depends on the state they and other "switches" were in last time. So as soon as the MCU is powered on the switches are in a default state that connects them to the first "instruction" (i.e. a set of "switches" that you set in your program). Depending on how the first "instruction" switches are set other switches get set then the clock ticks again and the current state gets transformed into some other state.

    Hope that helps.
     
  9. vead

    Thread Starter Active Member

    Nov 24, 2011
    621
    8
    thanks everyone for help. can anyone suggest me site where i can learn easily about how the hardware of microcontroller work i want to know hardware of micro controller
     
  10. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    The term "microcode" may lead to some useful finds on internal operations.

    http://en.wikipedia.org/wiki/Microcode

    Also check the links in that article.
     
  11. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    The datasheets from Microchip for the PIC processors have nice descriptions of the internal workings. At 400 pages typical, they take a few days to swallow.

    www.microchip.com
     
  12. MrChips

    Moderator

    Oct 2, 2009
    12,415
    3,354
  13. vead

    Thread Starter Active Member

    Nov 24, 2011
    621
    8
    really very excellent introduction
     
  14. MrChips

    Moderator

    Oct 2, 2009
    12,415
    3,354
    Glad to help. You read the whole thing already, all 332 pages?
     
  15. Eric007

    Senior Member

    Aug 5, 2011
    1,041
    33
    Lolol...:)
     
  16. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,500
    2,366
    http://www.winpicprog.co.uk/pic_tutorial.htm
    Max.
     
  17. embpic

    Member

    May 29, 2013
    187
    3
    As this silicon chips are bunch of transistor and as per condition then network of transistor work together to form logic.
    that simple example if you make any controller pin as input then it connect it to vcc that is collector of transistor connected to Vcc and tharnsfer like wise every condition is satisied.
     
  18. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,644
    759
    ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,


    The preceding commas, all U+002C, are for you to distribute judiciously along your text. No need to use all of them.

    If you speak as you write...:eek:
     
    Last edited: Oct 6, 2013
    ErnieM likes this.
Loading...