0% found this document useful (0 votes)
21 views9 pages

MICROCONTROLLER

Microcontroller

Uploaded by

ps1378312
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views9 pages

MICROCONTROLLER

Microcontroller

Uploaded by

ps1378312
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Microcontroller

A microcontroller is a small computer on a single integrated circuit (IC). A microcontroller is


self controlled system with peripherals, memory and processor that can be used as an embedded
system. It is also known as embedded controller.
The first microprocessor was the 4 bit Intel 4004 released in 1971, with the Intel 8008 and other
more capable microprocessors becoming available over the next several years. It is a system
which is built on a chip. It is often small and low cost. The components are chosen to minimize
size and to be as inexpensive as possible Microcontrollers are designed for embedded
applications, in compare to the microprocessor used in personal computers or other general
purpose applications. Some embedded systems are more sophisticated, while others have
minimum requirements for memory and programming length and a low software complexity.
Input and output devices include solenoids, LCD displays, relays, switches and sensors for data
like humidity, temperature or light level, amongst others. It is used in automatically controls
products and devices like remote controls, automobile engine control system, medical devices
and other embedded system.

QUES -Features of microcontroller 8051

There are some important features of microcontroller which are given below,

o The 89c51 is compatible with MCS 51 family.


o It has 8 bit data bus and 8 bit (arithmetic logic unit).
o It has 4k bytes of on chip reprogrammable flash memory.
o It supported three level program memory lock.
o It has 16 bit of address bus and 64 kb of RAM (random access memory) and ROM (read
only memory).
o It has on chip RAM 128 bytes data memory.
o It has four 8 bit bidirectional input or output ports that is 32 programmable input or
output lines.
o It can execute 1 million one cycle instructions per second with a clock frequency of
12MHz.
o It has one UART programmable serial ports.
o It has six interrupts source.
o It has two multimode 16 bit timers.
o It has two level interrupts priority.
o It has power saving mode.
QUES -Advantages and disadvantages of microcontroller

There are some advantages of microcontroller are given below,


o Low time required for performing operation.
o The processor chips are very small and flexibility occurs.
o Due to their higher integration, cost and size of the system is reduced.
o The microcontroller is easily to interface additional RAM, ROM and I/O ports.
o Once microcontrollers are programmed then they cannot be reprogrammed.
o At the same time many task can be performed so human effect can saved.
o Without any digitals parts it can be act as microcomputer.
o It is easy to use, troubleshooting and systems maintain is simple.
There are some disadvantages of microcontroller are given below,
o The microcontroller cannot interface high power devices directly.
o It has more complex structure as compared to microprocessor.
o It only performed limited number of executions simultaneously.
o It is generally used in micro equipment.

QUES -Difference between microprocessor and microcontroller

The difference between microprocessor and microcontroller is given below,

Microprocessor Microcontroller

The Von-Neumann architecture is used The Harvard architecture is used


in microprocessor. in microcontrollers.

It does not have inbuilt memory RAM It has inbuilt memory RAM and
and ROM. ROM.

Microprocessor is a heart of computer Microcontroller is a heart of


system. embedded system.

It does not have I/O ports. It has inbuilt I/O ports.

It is used only one memory for data and It uses separate memory for data
program. and program.

The power consumption is high due to The total power consumption is low
external components. due to external component is less.

Cost of the entire system is high as The cost of the entire system is low
compared to microcontroller. as compared to microprocessor.
It is widely used in personal computers It is widely used in MP3 player,
(PC). washing machine and etc.

It works on low frequency as compared It is usually works on higher


to microcontroller i.e. 3 MHz to 6 frequency i.e. 12 MHz to 26 MHz.
MHz.

QUES -PIN DIAGRAM OF 8051 :


Pins 1 to 8 − These pins are known as Port 1. This port doesn’t serve any other functions.
It is internally pulled up, bi-directional I/O port.


Pin 9 − It is a RESET pin, which is used to reset the microcontroller to its initial values.


Pins 10 to 17 − These pins are known as Port 3. This port serves some functions like
interrupts, timer input, control signals, serial communication signals RxD and TxD, etc.


Pins 18 & 19 − These pins are used for interfacing an external crystal to get the system
clock.


Pin 20 − This pin provides the power supply to the circuit.


Pins 21 to 28 − These pins are known as Port 2. It serves as I/O port. Higher order
address bus signals are also multiplexed using this port.


Pin 29 − This is PSEN pin which stands for Program Store Enable. It is used to read a
signal from the external program memory.


Pin 30 − This is EA pin which stands for External Access input. It is used to
enable/disable the external memory interfacing.


Pin 31 − This is ALE pin which stands for Address Latch Enable. It is used to
demultiplex the address-data signal of port.


Pins 32 to 39 − These pins are known as Port 0. It serves as I/O port. Lower order
address and data bus signals are multiplexed using this port.


Pin 40 − This pin is used to provide power supply to the circuit.

QUES -ARCHITECTURE OF 8051 :

8051 microcontroller is designed by Intel in 1981. It is an 8-bit microcontroller. It is built with


40 pins DIP (dual inline package), 4kb of ROM storage and 128 bytes of RAM storage, 2 16-bit
timers. It consists of are four parallel 8-bit ports, which are programmable as well as addressable
as per the requirement. An on-chip crystal oscillator is integrated in the microcontroller having
crystal frequency of 12 MHz.

Let us now discuss the architecture of 8051 Microcontroller.

In the following diagram, the system bus connects all the support devices to the CPU. The
system bus consists of an 8-bit data bus, a 16-bit address bus and bus control signals. All other
devices like program memory, ports, data memory, serial interface, interrupt control, timers, and
the CPU are all interfaced together through the system bus.

CPU (Central Processing Unit): CPU act as a mind of any processing machine. It synchronizes
and manages all processes that are carried out in microcontroller. User has no power to control
the functioning of CPU. It interprets the program stored in ROM and carries out from storage
and then performs it projected duty. CPU manage the different types of registers available in
8051 microcontroller.
Interrupts: Interrupts is a sub-routine call that given by the microcontroller when some other
program with high priority is request for acquiring the system buses the n interrupts occur in
current running program.

Interrupts provide a method to postpone or delay the current process, performs a sub-routine task
and then restart the standard program again.

Types of interrupt in 8051 Microcontroller:

Let's see the five sources of interrupts in 8051 Microcontroller:

o Timer 0 overflow interrupt - TF0


o Timer 1 overflow interrupt - TF1
o External hardware interrupt - INT0
o External hardware interrupt - INT1
o Serial communication interrupt - RI/TI

Memory: For operation Micro-controller required a program. This program guides the
microcontroller to perform the specific tasks. This program installed in microcontroller required
some on chip memory for the storage of the program.

Microcontroller also required memory for storage of data and operands for the short duration. In
microcontroller 8051 there is code or program memory of 4 KB that is it has 4 KB ROM and it
also comprise of data memory (RAM) of 128 bytes.

Bus : Bus is a group of wires which uses as a communication canal or acts as means of data
transfer. The different bus configuration includes 8, 16 or more cables. Therefore, a bus can bear
8 bits, 16 bits all together.

Types of buses in 8051 Microcontroller:

Let's see the two types of bus used in 8051 microcontroller:

o Address Bus: 8051 microcontrollers is consisting of 16 bit address bus. It is generally be


used for transferring the data from Central Processing Unit to Memory.
o Data bus: 8051 microcontroller is consisting of 8 bits data bus. It is generally be used for
transferring the data from one peripherals position to other peripherals.

Oscillator: As the microcontroller is digital circuit therefore it needs timer for their operation.
To perform timer operation inside microcontroller it required externally connected or on-chip
oscillator. Microcontroller is used inside an embedded system for managing the function of
devices. Therefore, 8051 uses the two 16 bit counters and timers. For the operation of this timers
and counters the oscillator is used inside microcontroller.
QUES - Interrupts:

Interrupts is a sub-routine call that given by the microcontroller when some other program with
high priority is request for acquiring the system buses the n interrupts occur in current running
program.

Interrupts provide a method to postpone or delay the current process, performs a sub-routine task
and then restart the standard program again.

Types of interrupt in 8051 Microcontroller:

Let's see the five sources of interrupts in 8051 Microcontroller:

o Timer 0 overflow interrupt - TF0


o Timer 1 overflow interrupt - TF1
o External hardware interrupt - INT0
o External hardware interrupt - INT1
o Serial communication interrupt - RI/TI

QUES - Memory Organization of 8051 Microcontroller


 The 8051 has two types of memory and these are Program Memory and Data
Memory.
 Program Memory (ROM) is used to permanently save the program being executed, while
Data Memory (RAM) is used for temporarily storing data and intermediate results created
and used during the operation of the microcontroller.
 Let’s have a brief detail of memory organization of 8051 microcontroller.
 Depending on the model in use 8051 microcontroller family in general have at most a
few KB of ROM and 128 or 256 bytes of RAM is used.
 All 8051 microcontrollers have a 16-bit addressing bus and are capable of addressing 64
kB memory.
 The first models of the 8051 microcontroller family did not have internal program
memory. It was added as an external separate chip.
 Even though such an amount of memory is sufficient for writing most of the programs,
there are situations when it is necessary to use additional memory as well. A typical
example is so called lookup tables.
 They are used in cases when equations describing some processes are too complicated or
when there is no time for solving them. In such cases all necessary estimates and
approximates are executed in advance and the final results are put in the tables (similar to
logarithmic tables).
EA=0 In this case, the microcontroller completely ignores internal program memory and
executes only the program stored in external memory.
EA=1 In this case, the microcontroller executes first the program from built-in ROM, then the
program stored in external memory.
 In both cases, P0 and P2 are not available for use since being used for data and address
transmission. Besides, the ALE and PSEN pins are also used.
Data Memory Organization of 8051

As already mentioned, Data Memory is used for temporarily storing data and intermediate results
created and used during the operation of the microcontroller. Besides, RAM memory built in the
8051 family includes many registers such as hardware counters and timers, input/output ports,
serial data buffers etc.

The previous models had 256 RAM locations, while for the later models this number was
incremented by additional 128 registers. However, the first 256 memory locations (addresses 00-
FFH) are the heart of memory common to all the models belonging to the 8051 family.

Locations available to the user occupy memory space with addresses 00-7Fh, i.e. first 128
registers. This part of RAM is divided in several blocks.

The first block consists of 4 banks each including 8 registers denoted by R0-R7. The PSW has
two bits for identifying the register bank, i.e., 00 represents bank 0, 01 represents bank 1, 10
represents bank 2, and 11 represents bank 3.

QUES - Special Function Registers (SFRs)

 SFR, which occupies upper 128 bytes of internal memory are the registers, that control
the entire processor
 They can be accessed by DIRECT addressing.
The registers available in the 8051 are as follows:

1. Accumulators – A and B
2. Process Status Word – PSW
3. I/O port registers – P0, P1, P2, P3
4. Data pointers – DPH and DPL
5. Serial data buffer register – SBUF
6. Stack pointer – SP
7. Timer registers – TH0, TH1 and TL0, TL1
8. Timer Control Registers – TCON, TMOD
9. Power and Port control – PCON, SCON
10. Interrupt Control Registers – IP, IE.
 An additional memory block of 128 locations is added into the latest versions of the 8051
microcontrollers. The problem is that electronics performing addressing has 1 byte (8 bits)
on disposal and is capable of reaching only the first 256 locations, therefore.
 In order to keep already existing 8-bit architecture and compatibility with other existing
models a small trick was done. It means that additional memory block shares the same
addresses with locations intended for the SFRs (80H- FFH).
 In order to differentiate between these two physically separated memory spaces, different
ways of addressing are used. The SFRs memory locations are accessed by direct
addressing, while additional RAM memory locations are accessed by indirect addressing.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy