8/12/2019 08-Chapter 8 - Microcontrollers http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 1/52 Chapter 8 Microcomputers
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 1/52
Chapter 8
Microcomputers
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 2/52
Microcomputer Microcontroller
What’s the difference?
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 3/52
Homework 7
1. What is a microcontroller?
What are some common applications of these?
A microcontroller is a simple computer on a single
silicon chip that cost only a few dollars.
They are useful in washing machines, toasters, andcars.
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 4/52
Microcontrollers in Cars and Trucks?
All modern automobiles contain at least one
microcontroller, and can have as many as six or
seven.
The engine is controlled by a microcontroller, as are the
anti-lock brakes, the cruise control and so on.
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 5/52
Interesting…
Any device that has a remote control almost certainly contains a
microcontroller: TVs, VCRs and high-end stereo systems all fall
into this category.
Digital cameras, cell phones, camcorders, answering machines,
laser printers, telephones (the ones with caller ID, 20-number
memory, etc.), pagers, and feature-laden refrigerators,
dishwashers, washers and dryers.
Basically, any product or device that interacts with its user has a
microcontroller buried inside.
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 6/52
PIC Microcontroller
• We will use the 16F84A microcontroller made by
Microchip for the team project. Use the Internet to
research these chips.
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 7/52
Acronyms
IC
RAM
ROM PROM
EPROM
EEPROM
PIC
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 8/52
IC – Integrated Circuits
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 9/52
RAM – Random Access Memory
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 10/52
ROM – Read Only MemoryROM cannot be modified (at least not very quickly or easily),
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 11/52
ROM – Read Only MemoryROM cannot be modified (at least not very quickly or easily),
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 12/52
PROM – Programmable Read Only Memorysetting of each bit is locked by a fuse
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 13/52
Google “PROM Memory”
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 14/52
EPROM – Erasable Programmable Read Only Memory
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 15/52EEPROM – Electronically Erasable Programmable Read Only Memory
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 16/52
EEPROM El t i ll E bl P bl R d O l M
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 17/52
EEPROM – Electronically Erasable Programmable Read Only Memory
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 18/52
PIC – Programmable Integrated Circuits
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 19/52
The SFA Rover
Team Project
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 20/52
The Vehicle Course
50-feet
6-feet
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 21/52
The Vehicle Course
50-feet
6-feet
Extra Credit
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 22/52
Scoring
D = Distance traveled in feet in 10 minutes
(the maximum distance is 50-feet)
R = 15 if the vehicle successfully demonstrates avoiding an obstacle on
the right and 0 if it is not demonstrated
L = 15 if the vehicle successfully demonstrates avoiding an obstacle on
the left and 0 if it is not demonstrated
T = -10 each time the vehicle is touched by a team member during the
course
Grade = T + L + R + D × 70/(50ft)
Bonus: For each extra left or right obstacle avoided, 2 points of extracredit will be earned for each member of the team. A maximum of 20extra points can be earned in this manner.
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 23/52
Left
Button
Right
Button
PIC
Microcontroller
H-Bridge
9-Volt
Battery
Right
Motor
Left
Motor
Voltage
Regulator
SFA Rover Circuit Diagram
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 24/52
Key Concepts
Note that the parts used in the team
project are discussed in your text book.
Chapter 7 - Logic Circuits Chapter 8 - Microcomputers
Chapter 10 - Diodes (Voltage Regulator)
Chapter 12 - Transistors (H-Bridge)
Chapter 16 - DC Machines (Motors)
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 25/52
Key Concepts
Other key ideas used in this team projectinclude:
Battery Power Management
Torque
Friction
Gearboxes
We will now design circuits that will be used inlab next week.
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 26/52
Chapter 10
Diodes
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 27/52
Semiconductors
Germanium
32 protons
Silicon 14 protons
Most commonly used
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 28/52
How many electrons can be in the ground state of
an atom?
Answer: 2 (s level)
...in the first excited state?
Answer: 8 (s and p levels)
…in the second excited state?
Answer: 8 (s and p levels)
Atomic Physics
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 29/52
Valence Electrons
Valence electrons are electrons in theoutermost shell of the atom that can
participate in forming chemical bonds with
other atoms.
How many valence electrons does Silicon
have? Answer: 4
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 30/52
How many electrons are needed to fill the
outermost energy level of Silicon?
Answer: 4
2-D representation of Silicon Crystal
How many valence electrons does Phosphorus
(15P) and Aluminum (13Al) have?
Answers: 5 and 3
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 31/52
Diodes
Conduct electricity in one direction
Two terminal devices anode and cathode
Primarily made of silicon
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 32/52
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 33/52
DopingThe adding of impurities
n-type crystal
e.g. Silicon doped with Phosphorous
negative charge carriers
electrons
p-type crystal
e.g. Silicon doped with Aluminum
positive charge carriers
vacancy or hole
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 34/52
Diodes
p-type n-type
Circuit Symbol
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 35/52
Flapper Valve Analogy
Flapper
Valve Analogy
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 36/52
Diode Characteristics
Forward-Bias Condition
Good Conductor
Reverse-Bias Condition High Resistance
I versus V Plot
Ideal Diode and Real Diode “Knee” and Breakdown Voltage
Three Regions
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 37/52
Shockley Equation
Shockley Equation on Excel
Common LED have a maximum recommendedcurrent of 20mA.
What resistor value is needed in series with an LEDand a 5-Volt power supply so that the LED does not
burn up?
Answer: _______ or ________
1nkTqvexpIi D
sD
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 38/52
What does the circuit symbol for an
LED look like?
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 39/52
Diode Circuits
rec·ti·fi·er Pronunciation: 'rek-t&-"fI(-&)rFunction: noun Date: 1611
: one that rectifies; specifically : a device forconverting alternating current into direct current
Half-Wave Rectifier
Full-Wave Rectifier
Bridge Rectifier
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 40/52
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 41/52
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 42/52
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 43/52
Smoothing Capacitors
Ripple Voltage (Vr )
DC Component (VDC)
Ripple Factor
DCVVr
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 44/52
Concept Test
Is a high or low value for the ripple voltage V
desirable?
Answer: Low
What are three ways to achieve low ripple
voltages?
Answers:
Low CurrentHigh Frequency
High Capacitance
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 45/52
Zener Diodes
Zener Diodes are intended to operate in thebreakdown region.
Manufacturers set the breakdown voltage by
modifying the doping.
Zener diodes can make good voltage regulators.
Circuit Symbol
Clarence Zener once visited SFA.
Wh t i Z di d ? H d th
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 46/52
What is a Zener diode? How do the
circuit symbols for a diode and a Zener
diode differ? Zener diodes are intended to operate in the
breakdown region -usually as voltage
regulators.Manufacturers set the breakdown voltage by
careful doping.
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 47/52
How do you convert AC to DC?
Voltage Regulators remove the ripple.
Diode
RectifierSmoothing
Capacitor
Voltage
Regulator
AC Input
DC Output
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 48/52
Concept Question
What components to you need to convert a 110-Volt ACsignal to a 9-Volt DC signal?
Answers:
Transformer – to step down the voltage
Diodes – to rectify the waveform (make +) Capacitor – to smooth the rectified waveform
Voltage Regulator – to remove the ripple
Note that the device connected to this 9-Volt power supplyacts as a resistor.
For this reason the device is sometimes called the “load” or“load resistance”.
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 49/52
Example Questions
10.32, 35
Homework Questions?
10.55, 56, 57, 35
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 50/52
What is an ideal diode?
An ideal diode is a perfect conductor
with zero voltage drop in the forward
bias direction…
…and a perfect insulator in the reverse
bias direction.
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 51/52
Stop Here
8/12/2019 08-Chapter 8 - Microcontrollers
http://slidepdf.com/reader/full/08-chapter-8-microcontrollers 52/52
What element from the periodic
table are diodes made of?
Silicon