Hi Every one....After My lots of experiments with a little monster called microcontroller, i would like to share my practical experience and knowledge to help you out with,how to use them in the real world to make things sensible!!!!!!!!.
Before going in to the detailed Description of microcontrollers,I just give you a breif introduction.
Basically a microcontroller is a microprocessor with on chip RAM,ROM,I/O ports...etc.

A microcontroller provides intelligence to any system.
suppose that an air conditioning(a.c) system is a system with a microcontroller inside,provides intelligence to it.like sensing the outside temperature,if temperature is high then increase the cooling from a.c and if outside temperature is cool then decrease the cooling of the a.c.
There are several types of microcontrollers used in practice but 3 types are very famous!!

To provide intelligence we must give the instructions to the microcontroller.
so we need to make our microcontroller to understand what our instructions are.So how to do this???
microcontroller is not a human to instruct him what to do,but a machine so we some how communicate with it to make it understand our instructions.....:)
Microcontroller is a digital device it knows only machine language(low level language) that is zeros and ones(0 s,1s).
and what we know is a a simple 'c' programming language(high level language) in which we can give instructions and Microcontrollers cannot directly understand that.so we have to bridge both the human and microcontroller.so here is how to proceed!!!!!!!!!


so this is overveiw of how to provide intelligence in the microcontrollers with the instructions given by the human.
usully we write a program in our PC and then connect the microcontroller to the computers serial port(com1) or parallelport(lpt1).and then flash the program into the target microcontroller.The program in the form of bits is stored in the EEPROM(flash memory).
a microcontroller can be reprogrammed some 10,000 times.
so the tools required are .................
HARDWARE:
In order to connect the microcontroller with the PC to Flash the program in to the microcontroller we need an interface.
The microcontroller can be programmed in two methods
1.using serial port of PC(DB-9).

2.using parallel port of PC(DB-25).

SOFTWARE:
1.cross compiler
eg:KEIL for 8051 and WINAVR for AVR microcontrollers.
2.isp burner program
eg: isp pgm for 8051 and pony prog for AVR microcontrollers.
HOW THE CODE is EXECUTED IN MICROCONTROLLER:A cross compiler to covert 'C" code in to HEX code and a ISP BURNER program to convert the HEX code in to BITS(0s and 1s).
eg: 1. c=b // assigning value of 'b' to 'c'. in 'c' programming.
(cross compilr converts a c program toHEX(assembly) so now the instruction is converted as shown below)
2. MOV c,b //moving value of 'b' to 'c'. in HEX.
MOV is a mnemonic(user convinience) in HEX it is equivalent to E590h.
here E5 is a machine code for move in to accumlator from specific memory location and 90h the address for 'b' together those two bytes make up an instruction.
(A burner converts a HEX content to BITS(0s and 1s) as shown below)
3. E590h
now writing bit equivalent to the HEX instruction.
E------->1110
5------->0101
9------->1001
0------->0000
so the final BIT instruction that a microcontroller can understand is "1110010110010000" is sent to the UART(inside microcontroller) in the serial format by the computer so the bits are then converted parallelly by UART and executed as instruction by CPU of microcontroller.
IN NEXT tutorials we discuss each microcontroller programming and flashing the program in to microcontroller in detail....:)
Feel free to post your comments and doubts, i will be waiting for them!!!!!!!!!
for any help mail me at microcontrollersmadeeasy@gmail.com
thank u
------Regards
venkatesh