FINAL Assignment MICRO Pro
FINAL Assignment MICRO Pro
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.
Meeting the computing needs of the task efficiently and cost effectively.
Computing speed.
Power consumption.
Memory.
Input/output ports.
Packaging.
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.
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.
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.
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
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.
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.
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.
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.