INTRODUCTION
TO
MICROCONTRO
LLERS
MICROPROCESSORS
▪ Two components integrated together
▪ Data Processing Unit
▪ Arithmetic Logic Unit
▪ Registers
▪ Control Unit
▪ Clock
▪ Registers
▪ Queue
▪ Special Adder
▪ BUS for communication
▪ Data BUS
▪ Address BUS
▪ Accepts Binary Data
▪ Processes the input based on the instruction
▪ Contains both combinational and sequential digital logic
▪ May contain a memory - Storage
▪ Data
▪ Instructions
LEARNING OBJECTIVES
▪ What is “Microcontroller”?
▪ Why do we need “Microcontroller”?
HOME APPLIANCE:
MICROWAVE OVEN
HOME APPLIANCE:
MICROWAVE
▪Let’s build one
OVEN
▪ What do we need?
▪ A processor to control different components
▪ 3.2 GHz 4th Generation Intel Core i7 Processor
▪ A non-volatile memory to store program
▪ 120 GB SSD HDD
▪ A memory to execute program
▪ 16 GB DDR3 RAM
▪ And others
▪ Dedicated NVIDIA GEFORCE graphics card
▪ CREATIVE speakers with woofers
▪ …
WHAT TO DO WITH THESE?
SNAKE GAME
(APPLICATION??)
LINE FOLLOWING BOT
(APPLICATION??)
TIME TO BE PRACTICAL
▪ What are the major concerns?
▪ Low cost
▪ Low power consumption
▪ Small size
▪ Intelligence
▪ Specific/Dedicated function
▪ Need something special!
MICROCONTROLLER
▪ Small computer in a single chip!
MICROCONTROLLER IS SELF-
SUFFICIENT
▪Enough on-chip resources
▪ CPU
▪ Memory
▪ RAM
▪ ROM
▪ I/O interface
▪ Peripherals
▪ This is what makes them different from the microprocessors
▪ Many of the simpler features built into a motherboard are located in
the microcontroller itself
MICROCONTROLLER VS. PC
PC µC
CPU Clock 3 GHz 20 MHz
RAM 4 GB 1 kB
Hard disk 1 TB 16kB
Processor 32/64 bit 8 bit
OS Windows, Linux Not required
Input KB, Mouse Keypad
Output Monitor, printer LCD module
DIFFERENT FAMILIES OF
MICROCONTROLLER
▪PIC by Microchip Technology, Inc.
▪ AVR by Atmel Corp
AVR PIC
WHY AVR?
▪ Relatively easy to learn
▪ Relatively inexpensive
▪ Members are compatible with one another
▪ Similar architecture
▪ Same CPU core
▪ Documentation available
▪ Popular worldwide
▪ Designed to work with C
MICROWAVE OVEN
REVISITED
MP3 PLAYER
Output Input
Controller
Output Storage Device