2. DIGITAL ELECTRONICS
KAFAZ-2020
What is the difference between a microprocessor
and micro-controller?
Microprocessor :
• is an IC which has only the CPU inside them i.e. only the
processing powers such as Intel’s Pentium 1,2,3,4, core 2
duo, i3, i5 etc.
• These microprocessors don’t have RAM, ROM, and other
peripheral on the chip. A system designer has to add them
externally to make them functional.
• Application of microprocessor includes Desktop PC’s,
Laptops, notepads etc.
Introduction
3. Microcontroller:
• has a CPU, in addition with a fixed amount of RAM,
ROM and other peripherals all embedded on a single chip.
• At times it is also termed as a mini computer or a computer
on a single chip.
• Today different manufacturers produce microcontrollers
with a wide range of features available in different
versions.
• Some manufacturers are ATMEL, Microchip, TI, Free
scale, Philips, Motorola etc.
DIGITAL ELECTRONICS
KAFAZ-2020
What is the difference between a microprocessor
and micro-controller?
5. Basic Structure of a Microcontroller
DIGITAL ELECTRONICS
KAFAZ-2020
The following image shows the Basic Structure of a
Microcontroller.
6. DIGITAL ELECTRONICS
KAFAZ-2020
Basic Structure of a Microcontroller
From the above image, you can understand that the
three important (or major) components of a
Microcontroller are:
•The CPU (Central Processing Unit)
•The Memory and
•The I/O Ports
This doesn’t mean that other components are of less
importance. But these can be considered as supporting
devices.
7. DIGITAL ELECTRONICS
KAFAZ-2020
CPU
Central Processing Unit or CPU is the brain of the
Microcontroller.
It consists of an Arithmetic Logic Unit (ALU) and a
Control Unit (CU). A CPU reads, decodes and
executes instructions to perform Arithmetic, Logic
and Data Transfer operations.
8. DIGITAL ELECTRONICS
KAFAZ-2020
Memory
Any Computational System requires two types of
Memory: Program Memory and Data Memory.
Program Memory contains the program i.e. the
instructions to be executed by the CPU. Usually,
Program Memory is a Read Only Memory or ROM
Data Memory on the other hand, is required to
store temporary data while executing the
instructions. Usually, the Data Memory is a
Random Access Memory or RAM.
9. DIGITAL ELECTRONICS
KAFAZ-2020
I/O Ports:
The interface for the Microcontroller to the external world is
provided by the I/O Ports or Input / Output Ports. Inputs
device like Switches, Keypads, etc. provide information from
the user to the CPU in the form of Binary Data.
The CPU, upon receiving the data from the input devices,
executes appropriate instructions and gives response through
Output Devices like LEDs, Displays, Printers, etc.
Bus:
Another important component of a Microcontroller, but rarely
discussed is the System Bus. A System bus is a group of
connecting wire that connect the CPU with other peripherals
like Memory, I/O Ports and other supporting components.
10. DIGITAL ELECTRONICS
KAFAZ-2020
Timers/Counters:
One of the important components of a Microcontroller are the
Timers and Counters.
They provide the operations of Time Delays and counting
external events.
Additionally, Timers and Counters can provide Function
Generation, Pulse Width Modulation, Clock Control, etc.
Serial Port :
One of the important requirement of a Microcontroller is to
communicate with other device and peripherals (external).
Serial Port proves such interface through serial
communication.
Most common serial communication implemented in
Microcontrollers is UART.
11. DIGITAL ELECTRONICS
KAFAZ-2020
Interrupts:
A very important feature of a Microcontroller is Interrupts
and its Interrupt Handling Mechanism.
Interrupts can be external, internal, hardware related or
software related.
ADC (Analog to Digital Converter):
Analog to Digital Converter or ADC is a circuit that converts
Analog signals to Digital Signals.
The ADC Circuit forms the interface between the external
Analog Input devices and the CPU of the Microcontroller.
Almost all sensors are analog devices and the analog data from
these sensors must be converted in to digital data for the CPU
to understand.
12. DIGITAL ELECTRONICS
KAFAZ-2020
DAC (Digital to Analog Converter):
Digital to Analog Converter or DAC is a circuit, that works in
contrast to an ADC i.e. it converts Digital Signals to Analog
Signals.
DAC forms the bridge between the CPU of the
Microcontroller and the external analog devices.
13. DIGITAL ELECTRONICS
KAFAZ-2020
Advantages of Microcontrollers
A Microcontroller is a true device that fits the computer-on-a-
chip idea.
No need for any external interfacing of basic components like
Memory, I/O Ports, etc.
Microcontrollers doesn’t require complex operating systems as
all the instructions must be written and stored in the memory.
(RTOS is an exception).
All the Input/Output Ports are programmable.
Integration of all the essential components reduces the cost,
design time and area of the product (or application).
14. DIGITAL ELECTRONICS
KAFAZ-2020
Disadvantages of Microcontrollers
Microcontrollers are not known for their
computation power.
The amount of memory limits the instructions that
a microcontroller can execute.
No Operating System and hence, all the instruction
must be written.
15. DIGITAL ELECTRONICS
KAFAZ-2020
Applications of Microcontrollers
There are huge number of applications of
Microcontrollers. In fact, the entire embedded systems
industry is dependent on Microcontrollers. The
following are few applications of Microcontrollers.
Front Panel Controls in devices like Oven,
washing Machine etc.
Function Generators
Smoke and Fire Alarms
Home Automation Systems
Automatic Headlamp ON in Cars
Speed Sensed Door Locking System
16. Bloc schematic of Microprocessor System using 6809
MP
DIGITAL ELECTRONICS
KAFAZ-2020
17. Practical Example of Microprocessor System using
6809 MP
DIGITAL ELECTRONICS
KAFAZ-2020
20. Introduction to PIC Microcontroller
A microcontroller has 3 basic parts :
•The CPU core
•Memory (both ROM and RAM)
•Digital I/O
DIGITAL ELECTRONICS
KAFAZ-2020
21. PIC Microcontroller Architecture
The architecture of the 8 bit PIC microcontrollers can
be categorized as:
Base Line Architecture – In the base-line
architecture PIC microcontrollers of PIC10F family
is included, other than that a fraction of PIC12 &
PIC16 families are also included. These gadgets
make use of 12 bit program word architecture with
six to twenty-eight pin package alternatives.
DIGITAL ELECTRONICS
KAFAZ-2020
22. Mid Range Architecture – In this midline member of
PIC12 & PIC16 families are added that attribute 14
bit program word architecture. The midrange
PIC16 gadgets proffer a broad variety of package
alternatives (from 8 to 64 package), with low to high
levels of peripheral incorporation.
High Performance Architecture – The high
performance architecture included the PIC18 family
of appliances. These micro-controllers make use of
16 bits program word architecture along with 18 to
100 pin package alternatives.
DIGITAL ELECTRONICS
KAFAZ-2020
23. PIC Microcontroller Architecture
Base Line Architecture
Mid Range Architecture
High Performance Architecture
DIGITAL ELECTRONICS
KAFAZ-2020
26. Main features of the 16 family
• Operating speed DC-10 Mhz clock input
• RISC CPU 35 single-word instructions
• Timer
• Different Interrupt sources
• Size memories (RAM, ROM) and an additional
features vary by the type of microcontroller
DIGITAL ELECTRONICS
KAFAZ-2020
27. Benefits of the PIC Microcontroller
• Faster speed
• Lower cost
• Easier and quicker development
DIGITAL ELECTRONICS
KAFAZ-2020
29. PIC programming overview
Programming PIC microcontrollers is a simple 3 steps
process:
• Write the code
• Compile the code
• Upload the code into a microcontroller
DIGITAL ELECTRONICS
KAFAZ-2020
30. Examples of applications of PIC
• Vehicle systems (example ABS)
• Alarm systems and fire detection
• Home security systems
• Home automation systems
• Telecommunications systems
DIGITAL ELECTRONICS
KAFAZ-2020