Vous êtes sur la page 1sur 8

ESOFT College of Engineering and Technology

Mechanical Engineering - Bridging Program 2016


Unit - Principles and Applications of Microcontrollers - Assignment
This assignment consists of 4 questions. Answer all the questions.
1) Discuss the difference between microprocessors and microcontrollers
Comparing their features, performances, prices and applications.
Microprocessor

Microprocessor is heart of Computer


system.
It is just a processor. Memory and I/O
components have to be connected
externally
Since memory and I/O has to be connected
externally, the circuit becomes large.
Cannot be used in compact systems and
hence inefficient
Cost of the entire system increases
Due to external components, the entire
power consumption is high. Hence it is not
suitable to use with devices running on
stored power like batteries.
Most of the microprocessors do not have
power saving features.

Since memory and I/O components are all


external, each instruction will need
external operation, hence it is relatively
slower.
Microprocessor have less number of
registers, hence more operations are
memory based.

a
Micro Controller

Micro Controller is a heart of embedded


system.
Micro controller has external processor
along with internal memory and i/O
components
Since memory and I/O are present
internally, the circuit is small.
Can be used in compact systems and hence
it is an efficient technique
Cost of the entire system is low
Since external components are low, total
power consumption is less and can be used
with devices running on stored power like
batteries.
Most of the micro controllers have power
saving modes like idle mode and power
saving mode. This helps to reduce power
consumption even further.
Since components are internal, most of the
operations are internal instruction, hence
speed is fast.
Micro controller have more number of
registers, hence the programs are easier to
write.
1 | Page

Microprocessors are based on von


Neumann model/architecture where
program and data are stored in same
memory module
Mainly used in personal computers

Micro controllers are based on Harvard


architecture where program memory and
Data memory are separate
Used mainly in washing machine, MP3
players

2) What is an embedded system?


An embedded system has three components:
1. It has hardware.
2. It has application software.
3. It has Real Time Operating system (RTOS) that supervises the
application software and provide mechanism to let the processor
run a process as per scheduling by following a plan to control the
latencies. RTOS defines the way the system works. It sets the
rules during the execution of application program.
So we can define an embedded system as a Microcontroller based, software
driven, and reliable, real-time control system.
a) List 5 embedded systems you can find at home.
1. General
PDAs
Portable games
2. Communications
cell phones
3. Signal Processing
video and audio
4. Control
Washing machine
b) Explain how a microcontroller has been used in one of the embedded
system listed out in part (a) using a suitable block diagram.

2 | Page

Sensor It measures the physical quantity and converts it to an electrical


signal which can be read by an observer or by any electronic instrument like
an A2D converter. A sensor stores the measured quantity to the memory.
A-D Converter An analog-to-digital converter converts the analog signal
sent by the sensor into a digital signal.
Processor & ASICs Processors process the data to measure the output and
store it to the memory.
D-A Converter A digital-to-analog converter converts the digital data fed
by the processor to analog data.
Actuator An actuator compares the output given by the D-A Converter to
the actual (expected) output stored in it and stores the approved output.
Embedded system example Washing Machine
1. Once finish loading all the dirty laundry inside, push START button.
2. Washing Machine will measure the weight of the laundry to determine the
load.
3. Washing Machine will open the inlet valve to let the clean tab water into the
Washing Machine.
4. Once the water level reaches certain level, based on the load measure in
step 2, the inlet valve will close.
5. The rotating drum of the Washing Machine will move to start washing.
6. Once finish wash cycle, the outlet valve will open to release the dirty water.
7. Sensor will detect once all the dirty water been flush out to close the outlet
valve.
8. The inlet valve turn on to let clean water in for the rinse cycle.
9. Once the water reaches certain level, the inlet valve will close.
10. The rotating drum of the Washing Machine will move to start rinse cycle.
11. Once finish rinse cycle, the outlet valve open to release the dirty water.
12. Sensor will detect once all the dirty water been flush out to close the outlet
valve.
13. Step 8 - 12 will be repeated few times depend on the program setting.
14. The rotating drum will move to start spin cycle
15. End of spin cycle, the Washing Machine process end. FINISH
3) List three manufactures of microcontrollers.
Zilog
Microchip
Renesas Electronics
a) List their microcontroller families.
Zilog
8-bit - S3 Family
Z8051
Z8 Encore!
16-bit - Z16F ZNEO MCU
3 | Page

32-bit - ZNEO32!
Microchip
8-bit - PIC18 Family
PIC16 Family
PIC12 Family
PIC10 Family
16-bit- PIC24F
PIC24H/PIC24E
dsPIC30F
dsPIC33F/dsPIC33E
32-bit- PIC32MZ Family
PIC32MX Family
Renesas Electronics
SuperH Family
RL78 Family
RX Family
RH850 Family
RZ Family
b) List the integrated development environments (IDE) provided by each
manufacture.
Zilog
1) Z8 ZNEO Z16F Series Development Kit
2) Encore! Development Kit
Microchip
1) MPLAB X IDE
2) PICkit 3
Renesas Electronics
1) IDE e studio
2) IDE CS+
c) Discuss the main factors to be considered in selecting a micro controller for
a particular application.
Speed What is the highest speed the microcontroller can support?
Packaging Is it 40-pin DIP (Dual-inline-package) or QFP (Quad flat
package)? This is important in terms of space, assembling, and
prototyping the end-product. Embedded Systems13
Power Consumption This is an important criteria for batterypowered products.
Amount of RAM and ROM on the chip.
4 | Page

Count of I/O pins and Timers on the chip.


Cost per Unit This is important in terms of final cost of the product
in which the microcontroller is to be used.
1) Write brief notes comparing the followings.
a) Volatile and Non-volatile memory.
Volatile memory is computer memory that requires an active power
connection to function. When the power to a volatile memory source is shut
off, volatile memory loses its contents, and the information is deleted. The
most common form of volatile memory used in computers today is random
access memory, or RAM which used to temporarily hold data that is
required to run programs or applications on a computer or similar electronic
device. The advantages of volatile memory are: it functions fast, and it is
well-suited to protecting sensitive information. When the power source is
shut down, the information is quickly deleted.
Non-volatile memory is memory that does not require a connection to a
power source to retain information. In other words, when the power source
to which the memory is connected is shut off, the memory does not lose the
information it has. Common examples of non-volatile memory are
computer hard-disk drives, or flash drives. Hard-disk drives hold more
long-term data such as files and documents. The advantage of non-volatile
memory is longer-term retention of information.
Volatile memory
Requires a power source to retain information.
When power source is disconnected, information is
lost or deleted.
Often used for temporary retention of data, such as
with RAM, or for retention of sensitive data.

Non-volatile memory
Does not require a power source to retain
information.
When power source is disconnected,
information is not deleted.
Often used for long-term retention of data,
such as files and

b) Static and Dynamic RAMs.


Static RAM is a type of RAM and it is a volatile memory. In a SRAM,
each bit that stores data is made up of four or six transistors that make up a
flip-flop. There are additional transistors that are used to control read and
write accesses of storage cells. Even though typical SRAMs use six
transistors to store each bit, there are SRAMs that use eight, ten or more
transistors to store a single bit. When the number of transistors is reduced,
the size of the memory cell decreases. Each SRAM cell can be in three
different states called read, write and standby. A cell is in the reading state
when data has been requested and it is in writing state when the data in the
cell is modified. The cell is in the standby state when it is idling.

5 | Page

Dynamic RAM is also a volatile memory that uses separate capacitors to


store each bit. Capacitors when not charged represent the value 0 of a bit
and when charged represent the value 1. Since the capacitors discharge with
time, they need to be refreshed periodically to maintain the values stored in
them. Each memory cell in a DRAM consists of a capacitor and a transistor
and these cells are arranged in a square array.
Static Ram
More complex in the structure due to high no of
transistors being used.
Not required to refresh periodically.
Expensive and faster hence used for smaller and
faster cache memory

Dynamic Ram
Requires a single capacitor and a transistor
for each memory cell, it is much simpler in
the structure
Due to the use of capacitors, DRAM
requires to be refreshed periodically
cheaper and slower hence used for main
memory

c) RISC and CISC.


CISC is a Complex Instruction Set Computer. It is a computer that can
address a large number of instructions.
In the early 1980s, computer designers recommended that computers
should use fewer instructions with simple constructs so that they can be
executed much faster within the CPU without having to use memory. Such
computers are classified as Reduced Instruction Set Computer or RISC.
CISC
RISC
Larger set of instructions. Easy to
Smaller set of Instructions. Difficult to
program.
program.
Simpler design of compiler, considering
Complex design of compiler.
larger set of instructions.
Many addressing modes causing complex Few addressing modes, fix instruction
instruction formats.
format.
Instruction length is variable.
Instruction length varies.
Higher clock cycles per second.
Low clock cycle per second.
Emphasis is on hardware.
Emphasis is on software.
Control unit implements large instruction Each instruction is to be executed by
set using micro-program unit.
Hardware.
Slower execution, as instructions are to
Faster execution, as each instruction is to
be read from memory and decoded by the be executed by hardware.
decoder unit.
Pipelining is not possible.
Pipelining of instructions is possible,
Considering single clock cycle.
d) Harvard architecture and Von Neumann architecture.
The Harvard architecture offers separate storage and signal buses for
instructions and data. This architecture has data storage entirely contained
within the CPU, and there is no access to the instruction storage as data.
6 | Page

Computers have separate memory areas for program instructions and data
using internal data buses, allowing simultaneous access to both instructions
and data. Programs needed to be loaded by an operator; the processor could
not boot itself. In Harvard architecture, there is no need to make the two
memories share properties.

The Von Neumann architecture was first proposed by a computer


scientist John von Neumann. In this architecture, one data path or bus exists
for both instruction and data. As a result, the CPU does one operation at a
time. It either fetches an instruction from memory, or performs read/write
operation on data. So an instruction fetch and a data operation cannot occur
simultaneously, sharing a common bus. Von-Neumann architecture supports
simple hardware. It allows the use of a single, sequential memory. Today's
processing speeds vastly outpace memory access times, and we employ a
very fast but small amount of memory (cache) local to the processor.

Harvard architecture
Single memory to be shared by both
code and data.

Von Neumann architecture.


Separate memories for code and
data.

Processor needs to fetch code in a


separate clock cycle and data in
another clock cycle. So it requires
two clock cycles.
Higher speed, thus less time
consuming.

Single clock cycle is sufficient, as


separate buses are used to access
code and data
Slower in speed, thus more timeconsuming.
7 | Page

Simple in design

Complex in design.

e) 8 bit MCU and 16 bit MCU.


The main difference between 8 bit and 16 bit microcontrollers is the width
of the data pipe. As you may have already deduced, an 8 bit microcontroller
has an 8 bit data pipe while a 16 bit microcontroller has a 16 bit data pipe. This
fundamental difference between 8 bit and 16 bit microcontrollers is felt during
mathematical operations.
16 bit MCU
Have twice as long data pipe
more accurate at math
More efficient in processing math
operations on numbers that are
longer than 8 bits.
Have longer timers
More expensive

8 bit MCU
Have shorter data pipe
May not suffice the required
accuracy of the application.
Not efficient in processing math
operations on numbers that are
longer than 8 bits.
Have shorter timers
cheaper

8 | Page

Vous aimerez peut-être aussi