Date post: | 05-Jul-2018 |
Category: |
Documents |
Upload: | molla-ayenew |
View: | 221 times |
Download: | 0 times |
of 47
8/16/2019 Microcontrollers Applications Training L1
1/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
By Demisew T. And Yeshitila H.
Microcontrollers and itsApplications Training
8/16/2019 Microcontrollers Applications Training L1
2/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
Outline of the Training
Lecture 1: Introduction (2hours)
Lecture 2: Programming Microcontrollers(2hours)
Lecture 3: PIC16!""AMicrocontroller (3hours)
Lecture #: $%amples (At least &e%amples) and it ma' tae # or & da's
8/16/2019 Microcontrollers Applications Training L1
3/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
Introduction
•
8/16/2019 Microcontrollers Applications Training L1
4/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
Introduction
8/16/2019 Microcontrollers Applications Training L1
5/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
8/16/2019 Microcontrollers Applications Training L1
6/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
8/16/2019 Microcontrollers Applications Training L1
7/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
8/16/2019 Microcontrollers Applications Training L1
8/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
8/16/2019 Microcontrollers Applications Training L1
9/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
8/16/2019 Microcontrollers Applications Training L1
10/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
8/16/2019 Microcontrollers Applications Training L1
11/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
Must know details
•Don’t forget basic logic gates. They are still important
8/16/2019 Microcontrollers Applications Training L1
12/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
Must know details
8/16/2019 Microcontrollers Applications Training L1
13/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
Must know details
• SFRs: are registers whose function are predetermined by the manufacturer.
Their bits are connected (literally) to internal circuits of the microcontroller
such as timers, A/D converter, oscillators and others, which means that they
are directly in command of the operation of these circuits
8/16/2019 Microcontrollers Applications Training L1
14/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
Must know details
8/16/2019 Microcontrollers Applications Training L1
15/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
Must know details
• One of important specifications of input/output (I/O) pins isthe maximum
current they can handle.
• For most microcontrollers, current obtained from one pin is sufficient to activate
an LED or some other low-current device (10-20 mA).
• The more I/O pins, the lower maximum current of one pin; the maximum current
stated in the data specifications sheet for the microprocessor is shared across all I/O
ports
• Each I/O port is usually under control of the specialized SFR, which means that
each bit of that register determines the state of the corresponding microcontroller
pin.
8/16/2019 Microcontrollers Applications Training L1
16/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
Must know details
8/16/2019 Microcontrollers Applications Training L1
17/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
Must know details
8/16/2019 Microcontrollers Applications Training L1
18/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
Must know details
* $rasa+le Programma+le ,-M (* $P,-M):
The window enables data to be erased under strong
ultraviolet light. After a few minutes it is possible to
download a new program into it. Price is high and
not recommended.
lash Memor':
can be written and cleared practically an unlimited number of
times.
Ideal for learning e!perimentation and small"scale production.
8/16/2019 Microcontrollers Applications Training L1
19/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
Must know details
RAM:used for temporary storing data and intermediate results created and
used during the operation of the microcontroller.
All none constant variables are stored in RAM.
Once the power supply is off the contents of RAM is cleared.
EEPROM:The contents of EEPROM may be changed during operation
(similar to RAM), but remains permanently saved even after the loss of power
(similar to ROM).
EEPROM is often used to store values, created during operation, which mustbe permanently saved.
8/16/2019 Microcontrollers Applications Training L1
20/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
Must know details
8/16/2019 Microcontrollers Applications Training L1
21/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
8/16/2019 Microcontrollers Applications Training L1
22/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
Must know details
8/16/2019 Microcontrollers Applications Training L1
23/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
Must know details
8/16/2019 Microcontrollers Applications Training L1
24/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
Must know details
8/16/2019 Microcontrollers Applications Training L1
25/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
Must know details
8/16/2019 Microcontrollers Applications Training L1
26/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
Must know details
8/16/2019 Microcontrollers Applications Training L1
27/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
Must know details
8/16/2019 Microcontrollers Applications Training L1
28/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
Must know details
8/16/2019 Microcontrollers Applications Training L1
29/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
Must know details
-.CILLAT-,• Even pulses generated by the oscillator enable harmonic
and synchronous operation of all circuits within themicrocontroller.
•The oscillator is usually congured so as to use quartzcrystal or ceramic resonator for frequency stability, but itcan also operate as a stand-alone circuit (lie !" oscillator#.
8/16/2019 Microcontrollers Applications Training L1
30/47
Hawassa University, Institute of Technology Schoolof Electrical and Computer Engineering
Must know details
8/16/2019 Microcontrollers Applications Training L1
31/47
Hawassa University, Institute of Technology School
of Electrical and Computer Engineering
Must know details
8/16/2019 Microcontrollers Applications Training L1
32/47
Hawassa University, Institute of Technology School
of Electrical and Computer Engineering
Must know details
8/16/2019 Microcontrollers Applications Training L1
33/47
Hawassa University, Institute of Technology School
of Electrical and Computer Engineering
Must know details
8/16/2019 Microcontrollers Applications Training L1
34/47
Hawassa University, Institute of Technology School
of Electrical and Computer Engineering
Must know details
8/16/2019 Microcontrollers Applications Training L1
35/47
Hawassa University, Institute of Technology School
of Electrical and Computer Engineering
Must know details
8/16/2019 Microcontrollers Applications Training L1
36/47
Hawassa University, Institute of Technology School
of Electrical and Computer Engineering
Must know details
8/16/2019 Microcontrollers Applications Training L1
37/47
Hawassa University, Institute of Technology School
of Electrical and Computer Engineering
Must know details
8/16/2019 Microcontrollers Applications Training L1
38/47
Hawassa University, Institute of Technology School
of Electrical and Computer Engineering
Must know details
8/16/2019 Microcontrollers Applications Training L1
39/47
Hawassa University, Institute of Technology School
of Electrical and Computer Engineering
Must know details
A/0 conerter:• is used to convert an analog signal, such as
voltage, to digital form so a microcontroller canread and process it.
• $ome microcontrollers have built-in %&'converters. Eternal %&' converter can also beconnected to any type of microcontroller.
• %&' converters are usually ) to *+ bits, having to *+/ quantization levels.
• %&' converters are especially useful in control andmonitoring applications, since most sensors (e.g.,temperature sensors, pressure sensors, forcesensors, etc.# produce analog output voltages.
8/16/2019 Microcontrollers Applications Training L1
40/47
Hawassa University, Institute of Technology School
of Electrical and Computer Engineering
Must know details
8/16/2019 Microcontrollers Applications Training L1
41/47
8/16/2019 Microcontrollers Applications Training L1
42/47
Hawassa University, Institute of Technology School
of Electrical and Computer Engineering
Must know details
the bus is overloaded andcommunication is very slow andine$cient.
8/16/2019 Microcontrollers Applications Training L1
43/47
Hawassa University, Institute of Technology School
of Electrical and Computer Engineering
Must know details
8/16/2019 Microcontrollers Applications Training L1
44/47
Hawassa University, Institute of Technology School
of Electrical and Computer Engineering
Must know details
8/16/2019 Microcontrollers Applications Training L1
45/47
Hawassa University, Institute of Technology School
of Electrical and Computer Engineering
Commonly used Microcontrollers
8/16/2019 Microcontrollers Applications Training L1
46/47
Hawassa University, Institute of Technology School
of Electrical and Computer Engineering
Commonly used Microcontrollers
Microchip Technolog':
• 0icrochip produces microcontrollers with three very di1erentarchitectures2• )-bit ()-bit data bus# 34"micro, with a single accumulator () bits#2•
PI%&' and PI%&() &("bit instruction words• PI%&* series) &+"bit instruction words one address pointer ,-indirectregister pair-
• PI%&/ series) &*"bit instruction words three address pointers,-indirect register pairs-
• *-bit (*-bit data bus# microcontrollers, with * general-purpose
registers (each *-bit#• PI%(+) (+"bit instruction words• dsPI%) based on PI%(+ plus D0P functions such as a single"cycle
1A% ,multiply2accumulate into two +'"bit accumulators.• 5-bit (5-bit data bus# microcontrollers2• PI%3(14 series) 3("bit instructions uses the 1IP0 architecture
8/16/2019 Microcontrollers Applications Training L1
47/47
Hawassa University, Institute of Technology School
$nd o lecture 1