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

FINAL Assignment MICRO Pro

Uploaded by

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

FINAL Assignment MICRO Pro

Uploaded by

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

1. Explain difference between Microprocessor and Microcontroller.

Also list different criteria for


selection of a microcontroller for a particular application.
There are many differences between microprocessor and microcontroller
Firstly, based on their architectures Microprocessors require external components i.e. system
memory (RAM/ROM), system buses, I/O ports, etc., all this necessary components and
peripherals are provided without the microprocessor .

Secondly, they are also defer by their Functionality Microprocessors focus on executing complex
System requires more hardware and connecting peripherals externally makes the circuit more
complex. While microcontrollers hardware is reduced due to the single chip microprocessor
system where all the peripherals are in-built and internally connected. Less hardware reduces and
complexity of circuit board size and increases reliability.

Thirdly, based on their intricacy both has differences, microprocessor is generally used in
personal computers where you can buy and connect peripherals based on your requirements and a
more advanced and intricate architecture, while microcontrollers have a simplified architecture
tailored to specific applications. It means that microprocessors have used for Personal computers
(PCs), Complex industrial controllers, Military applications and Defense System, Accounting
system and Computation systems. While microcontroller is preferred in embedded systems like
washing machines, water purifiers, etc.

The fourth differences is their Power Consumption, Microcontrollers operate on low power and
have power-saving modes, while microprocessors consume more power.

Cost is also dissimilarities; Microcontrollers are more cost-effective due to their integrated
components, while microprocessors can be more expensive due to the need for additional
hardware.

Lastly by their Development and Programming using method also differed one to another. For
instance, Microprocessors require extensive software development and programming using high-
level languages, while microcontrollers are programmed using low-level languages or specialized
IDEs for embedded systems.

The main criteria in selecting a microcontroller are given below in the order of importance.

Criteria to select a microcontroller include12345:

Meeting the computing needs of the task efficiently and cost effectively.

Availability of software development tools like compilers, assemblers, and debuggers.

Wide availability and reliable sources of the microcontrollers.

Computing speed.

Power consumption.

Memory.
Input/output ports.

Packaging.

Cost per microcontroller

A. System Requirement

The design should start with a blank sheet of paper specifying the application needs if the system
requires a single chip MCU or additional peripherals are to be used with it. The selection process
starts with a decision of choosing either the 4-bit, 8-bit, 16-bit, or 32-bit microcontroller required
by the application.

To develop code for 4-bit architectures is harder and handling 4-bit instructions and data widths
can limit arithmetic capabilities. Most of the embedded applications are implemented using an 8-
bit microcontroller as the technology has been around a long time and a huge number of
controllers are available in the market.

They are used from low cost, low speed 4-bit micro replacement to a device that delivers tens of
MIPS, such as Atmel’s AVR series which achieves a 50 ns instruction cycle time when clocked
from a 20 MHz crystal. If the application needs more processing power the choice is most likely
to be 16-bit or 32-bit MCU. Vendors offer 32-bit performance cost-effectively.

32-bit devices come at virtually no cost to the user. The on-chip peripherals available exhibit a
heavy influence on component selection. Check the availability of Timers, Serial interfaces,
ROM, RAM, A/D converter, D/A converter sufficient number of I/O ports. Too many I/O ports
lead to bear the excessive cost but few cannot do the job.

B. Memory Architecture

This is a very important factor while designing any microcontroller based system. Three different
types of memory play an important role in the selection process are

 (a) program memory i.e. Flash, OTP, ROM, and ROM fewer components,
 (b) Data memory i.e. on-chip SRAM or external SDRAM and
 (c) Nonvolatile Memory i.e. EEPROM or Flash.

Whether the memory is on-chip or off-chip and how much the size is required may be a key
factor that defines the cost of building the system and speed of operation. For example, Atmel
AVR family includes Flash memory of 1KB to 128KB, on-chip SRAM for data storage, and for
the storage of configuration information and serial numbers, a few bytes of EEPROM are
reserved.

These golden features make the AVR family more popular in different applications. Flash gives
the flexibility to make code changes and provides the facility to use In-System-Programmed.
Atmel 89C51 and Mega AVR families have the segmented Flash blocks which allow
reprogramming one segment under the control of another segment, without removing the power.
Lastly, it is best to choose a device from a family which provides sufficient or more memory
space than the expectation of need.
C. Availability

Before going to implement the system, the availability of the device should be checked. The
criteria in choosing a microcontroller are its ready availability in needed quantities both now and
the future. If sufficient quantities are available with a bright future then no need to be worried
about the failure of the project.

D. Size

If IC of 15 I/O pins are required to develop the system there is no need to use 40 pin IC with 32
I/O pins. In this way, the size of the IC can be reduced, and thus physical space required to
implement the system is also reduced. So, the physical size of the IC may well be a critical factor
for specific applications.

E. Compatibility

The function of a system can be changed or upgraded by changing the software or replacing one
IC with another one without incurring a heavy additional cost. The new one will be pin
compatible as well as function compatible.

F. Functionality Testing

To check the function of the implemented system correctly the function of the MCU should be
checked within the test circuit designed earlier before going to develop the overall system

G. Power Management

More power means more heat dissipation which leads to a waste of energy. Power consumed by
the system determines the lifetime of the battery. Due to a reduction in the size of the devices the
size of the components is reduced and their placement within the design is very compact. This
phenomenon makes the devices to be sensitive to the heat dissipated from the MCU and the other
peripherals connected with it. It is the duty of an engineer to look first at the power required at the
clock speed necessary to run the application.

ROM based devices tolerate very low operating voltages (around 0.9v). In the case of Atmel
AVR devices, a Flash-based microcontroller can be operated at the voltages down to 1.8V. Most
microcontrollers have the features of power down, idle & sleep modes, and consideration needs
to be given to maximize the use of intelligent power management systems to reduce power
consumption.

H. Manufacturer’s Track Record

Manufacturers should ensure stability, good performance, better throughput, Reliability; better
Serviceability, software support, correctness, wide and timely availability of their products. For
example products of Intel, Freescale, Zilog, and Microchip Technology are stable, mature, and
single sources.

The points like design challenges, on-time delivery, performance, years in business, and year of
the transaction, the financial report should be followed by the track record of the manufacturers.
They must provide the datasheet or user guide which consists of characteristics, functionality,
sample test circuit, electrical characteristics, and dimension, etc. The documentation of
maintenance of the development system, the range of services, and its associated software must
be available for common use.

I. Manufacturer’s Support

During the step by step implementation of the system if the design engineer faces any kind of
problem, he/she may communicate with the marketing/sales, field application engineers. The
manufacturers should have some facilities like a helpline, toll-free number, fax number, after-
sales support, sufficient knowledgeable and helpful expertise support personnel who will give a
prompt reply or they will follow through in a regular manner when they promise to do something.

J. Availability of Development Support

Here the key consideration includes Assembler, Debugger, a code efficient C compiler, emulator,
technical support. The trend towards programming in a high-level language like C is increasing
day by day. This language allows using of some portability of code and libraries. This provides a
more practical consideration using a different microcontroller family. Choosing the appropriate
Hardware and software development tools is also important while selecting MCU.

An integrated development environment (IDE) facilitates the development efforts by providing


the project management tools. IDE enables to create source files and their organization into a
project, creation of a database for many devices. An example of IDE is Keil uVision 2 which
compiles to point out and correct the errors, assembles, and links the device datasheet, user
guides, and development tool manuals. Another good example is MPLAB for PIC and dsPIC
microcontrollers from Microchip Technology. This is mainly used for the development of
embedded systems.

K. Cost

This is the most important factor. If the system is to be implemented within the limit of the
budget calculated earlier the cost of each and every component (selected MCU along with
supporting ICs) used to build the system should be minimized tactfully to fulfill the requirements.
On the chip, features will trade with inventory and assembly cost of using extra supporting
external components. They can also cut development time and effort by providing a ready
integrated solution.

2. Draw and explain architecture of intel-51, 8-bit Microcontroller. 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.
The pin diagram of 8051 microcontroller looks as follows – 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.
8051 microcontrollers have 4 I/O ports each of 8-bit, which can be configured as input or output.
Hence, total 32 input/output pins allow the microcontroller to be connected with the peripheral
devices. Pin configuration, i.e. the pin can be configured as 1 for input and 0 for output as per the
logic state. Input/Output (I/O) pin − All the circuits within the microcontroller must be connected
to one of its pins except P0 port because it does not have pull-up resistors built-in. Input pin −
Logic 1 is applied to a bit of the D register. The output of transistor is turned off and the other pin
remains connected to the power supply voltage over a pull-up resistor of high resistance

3. Explain different Addressing Modes of 8051 Microcontroller with examples.

An Addressing Mode is a way to locate a target Data, which is also called as


Operand. The 8051 Family of Microcontrollers allows five types of Addressing
Modes for addressing the Operands. They are:

 Immediate Addressing
 Register Addressing
 Direct Addressing
 Register – Indirect Addressing
 Indexed Addressing

Immediate Addressing
In Immediate Addressing mode, the operand, which follows the Opcode, is a
constant data of either 8 or 16 bits. The name Immediate Addressing came from
the fact that the constant data to be stored in the memory immediately follows the
Opcode.

The constant value to be stored is specified in the instruction itself rather than
taking from a register. The destination register to which the constant data must
be copied should be the same size as the operand mentioned in the instruction.

Example: MOV A, #030H

Here, the Accumulator is loaded with 30 (hexadecimal). The # in the operand


indicates that it is a data and not the address of a Register.

Immediate Addressing is very fast as the data to be loaded is given in the


instruction itself.

Register Addressing
In the 8051 Microcontroller Memory Organization Tutorial, we have seen the
organization of RAM and four banks of Working Registers with eight Registers in
each bank.

In Register Addressing mode, one of the eight registers (R0 – R7) is specified as
Operand in the Instruction.

It is important to select the appropriate Bank with the help of PSW Register. Let
us see a example of Register Addressing assuming that Bank0 is selected.

Example: MOV A, R5

Here, the 8-bit content of the Register R5 of Bank0 is moved to the Accumulator.

Direct Addressing
In Direct Addressing Mode, the address of the data is specified as the Operand
in the instruction. Using Direct Addressing Mode, we can access any register or
on-chip variable. This includes general purpose RAM, SFRs, I/O Ports, Control
registers.

Example: MOV A, 47H

4. What is the purpose of EA pin in 8051 Microcontroller?

Pin 31 (EA/ VPP) – EA stands for External Access input. It is used to enable/disable external
memory interfacing. In 8051, EA is connected to Vcc as it comes with on-chip ROM to store
programs. For other family members such as 8031 and 8032 in which there is no on-chip ROM,
the EA pin is connected to the GND.
Pin 31 (EA/VPP): Pin 31 is the External Access Enable Pin i.e. allows external Program Memory.
Code from external program memory can be fetched only if this pin is LOW. For normal
operations, this pins is pulled HIGH.

5. What is the function of ALE signal?

ALE stands for address latch enable. This is a positive going pulse every time when the 8085
microprocessor is in operation.it indicates the bits on AD0-AD7 are address bits.this signal is used to
latch the lower order address from the multiplexed bus,and generates separate set of 8- address lines A0-
A7.

ALE – It is an Address Latch Enable signal. It goes high during first T state of a machine cycle and
enables the lower 8-bits of the address, if its value is 1 otherwise data bus is activated.

6. Explain different modes of Timer for 8051 microcontrollers.


The TMOD register is used to select the operating mode and the timer/counter
operation of the timers.
• The format of TMOD register is,
• The lower four bits of TMOD register is used to control timer-0 and the upper four
bits are used to control timer-1.
• The two timers can be independently program to operate in various modes.
• The TMOD register has two separate two bit field M0 and Ml to program the
operating mode of timers. The operating modes of timers are mode-0, mode-1,
mode-2 and mode-3. In all these operating modes the oscillator clock is divided by 12
and applied as input clock to timer.
MODE-0
o In mode-0 the timer register is configured as 13-bit register.
o For timer-1 the 8 bits of TH1 and lower 5 bits of TL1 are used to form 13-bit
register.
o For timer-0 the 8-bit of TH0 and lower 5 bits of TL0 are used to form 13-bit
register.
o The upper three bits of TL registers are ignored.
o For every clock input to timer the 13-bit timer register is incremented by one
When the timer count rolls over from all 1’s to all 0’s, (i.e., 1 1111 1111 1111 to 0
0000 0000 0000) the timer interrupt flag in TCON register is set to one.
Mode-1
o The mode-1 is same as mode-0 except the size of the timer register. In mode-1 the
TH and TL registers are cascaded to form 16-bit timer register.
MODE-2
o In mode-2, the timers function as 8-bit timer with automatic reload feature. The
TL register will function as 8-bit timer count register and the TH register will hold an
initial count value.
o When the timer is started, the initial value in TH is loaded to TL and for each clock
input to timer the 8-bit timer count register is incremented by one.
o When the timer count rolls over from all 1’s to all 0’s (i.e., 1111 1111 to 0000
0000), the timer interrupt flag in TCON register is set to one and the content of TH
register is reloaded in TL register and the count process starts again from this initial
value.
Mode-3
o In mode-3, the timer-0 is configured as two separate 8-bit timers and the timer-1
is stopped.
o In mode-3 the TL0 will function as 8-bit timer controlled by standard timer-0
control bits and the TH0 will function as 8-bit timer controlled by timer-1 control bits.
o While timer-0 is programmed in mode-3, the timer-0 can be programmed in
mode-0, 1 or 2 and can be used for an application that does not require an interrupt.
o The C/T(Low) bit of TMOD register is used to program the counter or timer
operation of the timer. When C/T bit is set to one, the timer will function as event
counter. The C/T(Low) bit is programmed to zero for timer operation.
o The timer will run only if clock input is allowed.
o When GATE = 1, the clock input to timer is allowed only if the signal at pin is high
and when GATE =0 the signal at INT (low) pin is ignored

You might also like