Saturday, July 27, 2013

Advantages & disadvatages of microcontroller



Advantages & Disadvantages of Microcontroller

Advantages of Microcontrollers

i)      Microcontrollers act as a microcomputer without any digital parts.
ii)     As the higher integration inside microcontroller reduce cost and size of the system.
iii)    Usage of microcontroller is simple, easy for troubleshoot and system maintaining.
iv)     Most of the pins are programmable by the user for performing different functions.
v)      Easily interface additional RAM, ROM,I/O ports.
vi)      Low time required for performing operations.


Disadvantages of Microcontrollers

i)      Microcontrollers have got more complex architecture than that of microprocessors.
ii)     Only perform limited number of executions simultaneously.
iii)    Mostly used in micro-equipments.
iv)    Cannot interface high power devices directly.


microprocessor vs microcontroller


Microprocessors                                                                  Microcontrollers
1
It is only a general purpose computer CPU
It is a micro computer itself
2
Memory, I/O ports, timers, interrupts are not available inside the chip
All are integrated inside the microcontroller chip
3
This must have many additional digital components to perform its operation
Can function as a micro computer without any additional components.
4
Systems become bulkier and expensive.
Make the system simple, economic and compact
5
Not capable for handling Boolean functions
Handling Boolean functions
6
Higher accessing time required
Low accessing time
7
Very few pins are programmable
Most of the pins are programmable
8
Very few number of bit handling instructions
Many bit handling instructions
9
Widely Used in modern PC  and laptops
widely in small control systems
E.g.
INTEL 8086,INTEL Pentium series
INTEL8051,89960,PIC16F877


Block diagram & Microcontroller Functions



>  CPU

CPU is the brain of a microcontroller .CPU is responsible for fetching the instruction, decodes it, then finally executed. CPU connects every part of a microcontroller into a single system. The primary function of CPU is fetching and decoding instructions. Instruction fetched from program memory must be decoded by the CPU.


>  Memory

The function of memory in a microcontroller is same as microprocessor. It is used to store data and program. A microcontroller usually has a certain amount of RAM and ROM (EEPROM, EPROM, etc) or flash memories for storing program source codes.


>  Parallel input/output ports

Parallel input/output ports are mainly used to drive/interface various devices such as LCD’S, LED’S, printers, memories, etc to a microcontroller.


>  Serial ports

Serial ports provide various serial interfaces between microcontroller and other peripherals like parallel ports.



>  Timers/counters

This is the one of the useful function of a microcontroller. A microcontroller may have more than one timer and counters. The timers and counters provide all timing and counting functions inside the microcontroller. The major operations of this section are perform clock functions, modulations, pulse generations, frequency measuring, making oscillations, etc. This also can be used for counting external pulses.


>  Analog to Digital Converter (ADC)

ADC converters are used for converting the analog signal to digital form. The input signal in this converter should be in analog form (e.g. sensor output) and the output from this unit is in digital form. The digital output can be use for various digital applications (e.g. measurement devices).


>  Digital to Analog Converter (DAC)

DAC perform reversal operation of ADC conversion.DAC convert the digital signal into analog format. It usually used for controlling analog devices like DC motors, various drives, etc.


>  Interrupt control

The interrupt control used for providing interrupt (delay) for a working program .The interrupt may be external (activated by using interrupt pin) or internal (by using interrupt instruction during programming).

>  Special functioning block

Some microcontrollers used only for some special applications (e.g. space systems and robotics) these controllers containing additional ports to perform such special operations. This considered as special functioning block.

Microcontroller


A microcontroller is a compact microcomputer designed to govern the operation of embedded systems in motor vehicles, robots, office machines, complex medical devices, mobile radio transceivers, vending machines, home appliances, and various other devices. A typical microcontroller includes a processor, memory, and peripherals.



 i) A microcontroller basically contains one or more following components:

§   Central processing unit(CPU)

§   Random Access Memory)(RAM)

§   Read Only Memory(ROM)

§   Input/output ports

§   Timers and Counters

§   Interrupt Controls

§   Analog to digital converters

§   Digital  analog converters

§   Serial interfacing ports

§   Oscillatory circuits


ii) A microcontroller internally consists of all features required for a computing system and functions as a computer without adding any external digital parts in it.

iii) Most of the pins in the microcontroller chip can be made programmable by the user.

iv) A microcontroller has many bit handling instructions that can be easily understood by the programmer.

v) A microcontroller is capable of handling Boolean functions.

vi) Higher speed and performance.

vii) On-chip ROM structure in a microcontroller provides better firmware security.

viii) Easy to design with low cost and small size.

Bus system


system bus is a single computer bus that connects the major components of a computer system. The technique was developed to reduce costs and improve modularity. It combines the functions of a data bus to carry information, an address bus to determine where it should be sent, and a control bus to determine its operation. Although popular in the 1970s and 1980s, modern computers use a variety of separate buses adapted to more specific needs.

There are three buses in Microprocessor:

1.Address Bus

2.Data Bus

3.Control Bus


1.Address Bus: Generally, Microprocessor has 16 bit address bus. The bus over which the CPU sends out the address of the memory location is known as Address bus. The address bus carries the address of memory location to be written or to be read from.

The address bus is unidirectional. It means bits flowing occurs only in one direction, only from microprocessor to peripheral devices.


2.Data Bus: 8085 Microprocessor has 8 bit data bus. So it can be used to carry the 8 bit data starting from 00000000H(00H) to 11111111H(FFH). Here 'H' tells the Hexadecimal Number. It is bidirectional. These lines are used for data flowing in both direction means data can be transferred or can be received through these lines. The data bus also connects the I/O ports and CPU. The largest number that can appear on the data bus is 11111111.

It has 8 parallel lines of data bus. So it can access upto 2^8 = 256 data bus lines.


3.Control Bus: The control bus is used for sending control signals to the memory and I/O devices. The CPU sends control signal on the control bus to enable the outputs of addressed memory devices or I/O port devices.




Some of the control bus signals are as follows:

1.Memory read

2.Memory write

3.I/O read

4.I/O write.

Internal Structure and Basic Operation of Microprocesor


Internal Structure and Basic Operation of Microprocesor

 

 

Arithmetic Logic Unit The ALU, or the arithmetic and logic unit, is the section of the processor that is involved with executing operations of an arithmetic or logical nature. It works in conjunction with the register array for many of these, in particular, the accumulator and flag registers. The accumulator holds the results of operations, while the flag register contains a number of individual bits that are used to store information about the last operation carried out by the ALU. More on these registers can be found in the register array section. 
 


Control Unit The control unit is arguably the most complicated part of this model CPU, and is responsible for controlling much of the operation of the rest of the processor. It does this by issuing control signals to the other areas of the processor, instructing them on what should be performed next

Accumulator or A register is an 8-bit register used for arithmetic, logic, I/O and load/store operations.

Program counter
 is a 16-bit register.

Stack pointer
 is a 16 bit register. This register is always incremented/decremented by 2.

Fetching and execution cycle


Fetching cycle is the basic operation cycle of a computer. It is the process by which a computer retrieves a program instruction from its memory, determines what actions the instruction requires, and carries out those actions. This cycle is repeated continuously by the central processing unit (CPU), from bootup to when the computer is shut down.

Execute cycle 
is the instruction in order to work out what actions should be performed to execute it. This involves examining the opcode to see which of the machine codes in the CPU's instruction set it corresponds to, and also checking which addressing mode needs to be used to obtain any required data. Therefore, using the CPU model from this tutorial, bits 16 to 23 should be examined.

Definition/meanings


 

Nibble - In computers and digital technology, a nibble (pronounced NIHB-uhl; sometimes spelled nybble) is four binary digits or half of an eight-bit byte. A nibble can be conveniently represented by one hexadecimal digit.

 

Byte - In most computer systems, a byte is a unit of data that is eight binary digits long. A byte is the unit most computers use to represent a character such as a letter, number, or typographic symbol (for example, "g", "5", or "?"). A byte can also hold a string of bits that need to be used in some larger unit for application purposes (for example, the stream of bits that constitute a visual image for a program that displays images or the string of bits that constitutes the machine code of a computer program).In some computer systems, four bytes constitute a word, a unit that a computer processor can be designed to handle efficiently as it reads and processes each instruction. Some computer processors can handle two-byte or single-byte instructions.

 

Word - word is a term for the natural unit of data used by a particular processor design. A word is basically a fixed-sized group of bits that are handled as a unit by the instruction set and/or hardware of the processor. The number of bits in a word (the word size, word width, or word length) is an important characteristic of any specific processor design or computer architecture.

microprocessor evolution


Basic Components Computer System using Block Diagram


Basic Components Computer System using Block Diagram

The Figure of Basic Computer System with block diagram..