You are on page 1of 12

Production Engineering and Production Technology

Department

COURSE NAME: Introduction to Computer and


Programming
YEAR: Engineering Prep
RESEARCH TITLE: microcontroller

Dr.Eng. Mohammed Abdul Muttalib


Submitted By:
Students code Students e-mail Participation
rate%

1901048 ME‐1901048.Shrouk@akhbaracademy.edu.eg 25%


1901003 ME‐1901003.Dina@akhbaracademy.edu.eg 25%
1901005 ME‐1901005.Menna@akhbaracademy.edu.eg 25%
1901017 ME‐1901017.Laila@akhbaracademy.edu.eg 25%

Akhbar El-yuom Academy 2019\2020

| Page1
Table of contents
Titles Page
introduction 3

How do microcontrollers work? 4

What are the elements of a microcontroller? 4

Microcontroller Architecture 6

Microcontroller features 7

Types of microcontrollers 8

Microcontroller applications 9

Comparing Microcontroller with a 10


Microprocessor

Various Manufacturers of Microcontrollers 11

conclusion 11

reference 12

| Page2
introduction

A microcontroller is a small, integrated circuit built in an embedded


device to regulate a particular process. A typical microcontroller includes
peripherals on a single chip with a processor, memory , and input /
output (I / O). Microcontrollers can be found in vehicles, robots, office
machines, medical devices , mobile radio transceivers, vending machines
and home appliances, among other devices, sometimes referred to as an
embedded controller or microcontroller unit ( MCU) They are essentially
simple miniature personal computers (PCs) designed to control a larger
component's small features, without a complex front-end operating
system ( OS). And microcontroller is an electronic system member of the
family of microcomputers. These are manufactured from a single chip
using the VLSI technology. In the present market there are
microcontrollers available with different word

lengths starting from 4 bit, 8 bit, 64 bit to 128 bit.

The components that constitute a microcontroller are, in a wider sense,


the memory, peripherals and, most crucially, a processor.
Microcontrollers are present in devices where control must be exercised
by the user. They are designed and implemented to execute a particular
function such as displaying integers or characters on a home appliance's
LCD display module. Microcontroller applications are myriad. In a
simpler way, any device or equipment that has to handle the functions
like measuring, monitoring, displaying and calculating the values consists
of a microcontroller chip inside.

| Page3
How do microcontrollers work?

To control a singular feature in a computer, a microcontroller is


embedded within a machine. It does this by using its central processor to
interpret data which it receives from its I / O peripherals. The temporary
information received by the microcontroller is stored in its data
memory, where the processor accesses it, and uses instructions stored in
its program memory to decipher and apply the incoming data. It then
uses the peripherals of its I / O to interact and enforce the correct
action. Microcontrollers are used on a wide variety of devices and
systems. Devices often use multiple microcontrollers that work together
to handle their respective tasks within the device. For example, a car
may have several microcontrollers that control various systems inside it,
such as the anti-lock braking system, traction control, fuel injection, or
control of suspensions. All microcontrollers communicate to each other
in order to inform them of the correct actions. Some could communicate
inside the car with a more complex central computer and others could
only communicate with other microcontrollers. Using their I / O
peripherals, they send and receive data, and process it to perform their
assigned tasks.

What are the elements of a microcontroller?

The core elements of a microcontroller are:

.The processor ( CPU) — One can think of a processor as the device's


brain. It processes and responds to various directions which guide the
role of the microcontroller. It includes carrying out simple operations in
arithmetic , logic, and I / O. It also performs data transfer operations in
the larger embedded system which communicate commands to other
components.

.Memory — The memory of a microcontroller is used to store the data


the processor receives and uses to respond to the instructions it is

| Page4
programmed to execute. A microcontroller has two key types of
memory:

1-program memory, which stores information about the instructions

the CPU carries out over the long term. Program memory is non-volatile
memory, meaning that it retains information over time without a power
source being required.

2- Data memory which is required during execution of the instructions


for temporary data storage. Data memory is transient, meaning the data
it contains is temporary, and is retained only when the computer is
connected to a power source.

.(I / O) peripherals — The input and output devices are an external


world interface for the processor. Input ports receive information in the
form of binary data, and send it to the processor. The processor receives
that data and sends output devices the necessary instructions to execute
tasks externally to the microcontroller.

Although the microprocessor 's defining elements are the processor,


memory, and I / O peripherals, there are other elements which are also
included. The term I / O peripherals itself simply refers to supporting
memory and processor-interfacing components. Many of the supporting
components may be listed as peripherals. It is important for a
microprocessor to have some representation of an I / O peripheral, since
they are the mechanism by which the processor is applied. Other
Microcontroller supporting elements include:

.Analog to Digital Converter ( ADC) — An ADC is a circuit where analog


to digital signals are converted. It allows the processor to interface with
external analog devices , such as sensors, at the microcontroller centre.

.Digital to Analog Converter ( DAC) — A DAC performs the inverse


function of an ADC and enables the processor to communicate its
outgoing signals to external analog components at the microcontroller
centre.

| Page5
.System bus — The system bus is the connective wire which connects all
microcontroller components together.

.Serial port — Serial port is an example of an I / O port that lets the


microcontroller connect to external components. It has a feature similar
to a USB port or a parallel port but varies in the way it transfers bits.

Microcontroller Architecture

The most critical component of a microcontroller is a central processing


unit with a word length ranging from 4-bit to 64-bit and the word length
also goes beyond the 64-bit mark in some modern microcontrollers.
Another microcontroller constituent is a timer. There is a timer for the
watchdogs. Data and programs are stored in memory spaces such as
RAM , ROM, EEPROM, and EPROM. Volatile memory RAM is used for
data storage while the ROM and other memory spaces are used for the
program and operating parameter storage.

CPU: Considered the microcontroller 's consciousness, the central


processing unit obtains, decodes and executes the instructions. This co-
ordinates the different microcontroller activities taking place.

| Page6
I / O ports: A microcontroller has multiple parallel input / output ports.
They are used to connect different peripherals to the microcontroller,
including printers, external memories, LEDs and LCDs. In addition to
parallel ports, there are serial ports to serially connected microcontroller
interface peripherals.

Memory: As with a microprocessor, a microcontroller has memory


space such as RAM , ROM including EEROM, and EPROM. It also sets
aside a certain amount of flash memory to store source code for the
program.

Timers and counters: These are the microcontroller 's interesting


constituent pieces. Timers and counters are used in operations that
include modulation, clock functions, generating and measuring
frequencies, and generating pulses.

Analog to digital converters ( ADCs): These converters are useful when


converting a sensor signal that would be analog in type.

Digital to analog converter (DAC): DAC works just the opposite of an


analog to a digital converter. As is obvious, the output would be an
analog signal that can be used to power such a motor on the analog
peripherals.

Microcontroller features
A processor for a microcontroller can differ according to application.
Options vary from basic 4-bit, 8-bit, or 16-bit processors to more
complex 32-bit processors, or 64-bit. Microcontrollers can use volatile
memory types such as random access memory ( RAM) and non-volatile
memory types — which includes flash memory, erasable read-only
programmable memory (EPROM) and programmable read-only memory
(EEPROM) that can be erased electrically. Typically speaking,
microcontrollers are built to be user-friendly without external computing
hardware, as they are equipped with ample onboard memory and
provide pins for general I / O operations so that they can communicate

| Page7
directly with sensors and other hardware. The architecture of
microcontrollers can be based on Harvard architecture or von Neumann
architecture, both providing different methods of data exchange
between processor and memory. The data bus and instruction are
separate with a Harvard architecture, allowing for simultaneous
transfers. One bus is used with a Von Neumann architecture for both
data and instructions. Microcontroller processors may be based on
complex computing instruction set (CISC) or reduced computing
instruction set (RISC). CISC usually has about 80 instructions while RISC
has about 30, as well as more modes of addressing, 12-24 compared to
RISC's 3-5 instructions. Although CISC can be simpler to implement and
have more efficient memory use, performance degradation can occur
due to the increased number of clock cycles needed to execute
instructions. RISC, which places more emphasis on software, often
delivers better performance than CISC processors, which put more
emphasis on hardware because of its simplified set of instructions and
hence greater simplicity in design, but because of its emphasis Places on
the software can be more complicated. Every ISC will be used differs
according to application. When they got available for the first time,
microcontrollers used assembly language only. Today a common
alternative is the C programming language. Other common languages for
the microprocessor include Python and JavaScript. MCUs use input and
output pins for peripheral function implementations. Such functions
include analog to digital converters, LCD controls, real-time clock (RTC),
universal synchronous / asynchronous receiver (USART), timers,
universal asynchronous receiver (UART) and universal serial bus ( USB)
communication. Sensors that collect data relating to humidity and
temperature are most often connected to microcontrollers, among
others.

Types of microcontrollers

Popular MCUs include the Intel MCS-51, also referred to as an 8051


microcontroller, first introduced in 1985; the Atmel AVR microcontroller
introduced in 1996; the Microchip Technology programmable interface
controller (PIC); and various licensed Advanced RISC Machines (ARM)
| Page8
microcontrollers. Many firms, including NXP Semiconductors, Renesas
Electronics, Silicon Labs and Texas Instruments, produce and sell
microcontrollers.

Microcontroller applications

Microcontrollers are used in a wide range of industries and applications,


including home and business, building automation, manufacturing,
robotics, transportation, lighting, smart energy, industrial automation,
communications and installations on the Internet of Things. A
microcontroller's one very unique use is its use as a digital signal
processor. Incoming analog signals frequently come with a certain level
of noise. Noise in this context means ambiguous values which can not be
easily translated into digital standard values. A microcontroller is able to
use its ADC and DAC to transform the incoming noisy analog signal into
an even digital output. The simplest microcontrollers allow the
operation of electromechanical systems used in comfort objects of daily
use, such as ovens, refrigerators, toasters, handheld devices, key fobs,
video game systems, televisions and lawn watering systems. In office
machines including photocopiers, scanners, fax machines and printers,
as well as smart meters, ATMs and security systems, they are also
popular. More sophisticated microcontrollers perform critical functions

| Page9
as well as in robots in aircraft , spacecraft, ocean-going vessels, vehicles ,
medical and life-support systems. Microcontrollers may regulate the
functions of an artificial heart , kidney, or other organs in medical
scenarios. We can also participate Be instrumental in making prosthetic
devices work.

• Peripheral controller of a PC
• Robotics
• In bio-medical equipment
• In communication system
• In automobiles
• In fire detection devices
• In light and temperature sensing and controlling devices
• Process control and industrial automation devices
• In measuring devices such as volt and current meters

Comparing Microcontroller with a Microprocessor


Microprocessor

.This has within just the CPU; i.e. computing powers like Intel's Pentium
1,2,3,4 core 2 duos, i3, i5 etc.

.Do not have RAM, ROM, and other chip peripherals. To render them
usable the machine designer needs to add them externally.

.Technology includes mobile PCs, notepads, notebooks etc.

.Applications are where the activities are unspecific, such as software


development, games , websites, photo editing, document creation, etc.

.Since microprocessors can not be used alone as RAM, ROM and other
peripherals are required, the device using microprocessors is more
expensive than a microcontroller.

.Compared to the microcontroller the microprocessor's clock speed is


very small. This will run above 1 GHz, as complex tasks are performed.

Microcontroller

| P a g e 10
.Embedded in a single chip is a microcontroller CPU, RAM, ROM, and
other peripherals.

.In a single chip it is often called a mini computer or a computer.

.Several giants of microcontroller manufacturing are ATMEL, Microchip,


TI, Freescale, Samsung, Motorola etc.

.Designed to perform different tasks. ie, it defines the relationship


between the input and the output.

.Since the applications are very specific, small resources such as RAM ,
ROM, I / O ports are needed and thus can be embedded on a single chip.

.A microcontroller's clock speed is variable from a few MHz to 30-50


MHz.

Various Manufacturers of Microcontrollers


1. Analog devices- 8051 microcontrollers with the 12-bit analog to
digital converter.
2. Atmel- 8051, AT91, AVR, AVR32
3. Freescale semiconductor-family of microcontrollers ranging from
8-bit to 32-bit
4. Infineon technologies- 8-bit microcontrollers based on 8051 and
16-bit ROM and OTP microcontrollers
5. Maxim Integrated Products- 75 MHz single-cycle flash 8051
microcontrollers, some low power 16-bit microcontrollers
6. Microchip – wide array of 8-bit microcontroller families including
PIC12, PIC16, PIC18, 16- bit PIC 24 microcontroller and PIC32
which is 32-bit microcontrollers.

conclusion

Once all that has been said and done, creating an instrument or a
controller is a matter of putting together a set of components and
software parts, each of which has a particular purpose not unlike what
we've done in almost all the projects in this tutorial. In do so, we
addressed the most basic techniques. Certain methods which are more

| P a g e 11
complex should not be more difficult to examine and install. It should
not be difficult to write a short program to examine what needs to be
done for every part of your project, with the skills you now have. When
timer constraints get in the way, it can get complicated to integrate the
code into a larger programme. Typically the toughest challenge would be
to get the programs to run quickly enough to get the job done within the
time available. We've seen this in the programs that had to upgrade the
displays in seven segments. We did run all the programs at 4 MHz,
however, and you will find that there can be considerably more Failed
at20 MHz. Most PICs can run at 20 MHz whereas some of the newer can
run at 40 MHz. Repeated measurements and comparisons are time
consuming, even as the LCD is being prepared. Iterations can be very
time consuming and should be avoided. Evite or minimize the number of
times a calculation is performed and the LCD is written to. If you can do
a calculation right up front, do it and store the result. Stop performing
the same calculation in a loop again and again. Knowing how to use the
timers and counters really is worth your while. We are the secret to
getting a lot of stuff done properly, easily and at the right time. Create a
line of code in your programs at a time , and make sure you understand
exactly what every line of code does. The 16F877A has memory in 8K.
Most of the programs we wrote were within the range of 400-to 800-
word, so far more sophisticated programs can be written without adding
any memory. On the other hand, it is neither difficult to add one-wire
memory, nor expensive.

Reference

1=https://internetofthingsagenda.techtarget.com/definition/microcontr
oller

2- https://openlabpro.com/guide/basics-of-microcontroller\

3-Book of Making PIC Microcontroller Instruments and Controllers

| P a g e 12

You might also like