how does microcontroller work with assembler ?

Thread Starter

vead

Joined Nov 24, 2011
629
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:

Papabravo

Joined Feb 24, 2006
21,225
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?
 

tshuck

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

Papabravo

Joined Feb 24, 2006
21,225
You should look up a RTL implementation of a simple processor. The placement and numbering of control bits dictate the opcodes...
To clarify, I think RTL = Register Transfer Level (Language), and NOT Resistor Transistor Logic, which was a precursor of DTL and TTL
 

sirch2

Joined Jan 21, 2013
1,037
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.
 

embpic

Joined May 29, 2013
189
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.
 

atferrari

Joined Jan 6, 2004
4,771
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.
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,


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:
Top