






























































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Notes; Professor: Bazuin; Class: Microcontroller Applications; Subject: Electrical & Computer Engineer; University: Western Michigan University; Term: Unknown 1989;
Typology: Study notes
1 / 70
This page cannot be seen from the preview
Don't miss anything!































































Dr. Bradley J. BazuinAssociate Professor
Department of Electrical and Computer Engineering
College of Engineering and Applied SciencesCollege of Engineering and Applied Sciences
Basic Computer Concepts
-^
Introduction to Microprocessor
-^
Applications of MicroprocessorsI t
d^
ti^
t^
Mi
t^
ll
Introduction to Microcontroller
-^
Applications of Microcontroller
-^
Microprocessor vs Microcontroller
-^
Microprocessor vs Microcontroller
-^
Processor, Memory, I/O ports and Peripheral modules andSoftware
The embedded processors contains all necessary parts
p^
y p
including memory and I/O ports within a single chip.These computers run at much slower memory clock andhave a smaller memory sizehave a smaller memory size.
-^
Embedded computers can also be found in washing
bedded co
pute s ca
a so be ou d
was
g
machine, microwave oven, camcorder, video cassetterecorder, camera, cellular phone, and many otherappliances A family of embedded computers is based onappliances. A family of embedded computers is based onthe 68HC12 microcontroller.
Cell phone: making the phone call, accepting incoming
p^
g^
p^
p^
g^
g
call, accessing Internet, displaying
-^
Home security system: sensing external temperature,
k^
h^
idit
d i t
d^
t ki
i t
ti
smoke, humidity, and intruders; taking appropriate actionsaccording to the detected events
-^
Automobile: monitoring speed, gas level, temperature,
uto
ob e:
o^
to
g speed, gas eve , te
pe atu e,
distance, direction, and so on; controlling display, fullinjection, air bag deployment, cruising, and so on; givingwarningswarnings
-^
Network router: responsible for message routing,congestion and traffic control, and so on
g
System or Application
Requirements
OperatingSystem HardwareArchitcture
Algorithmand DataStructures
Mapping
Architcture Application
High-Level
Binding(Compile,
Programming
Software
g Languages
(^
p Link, Load)
Performance
K Hwang Advanced Computer Architecture:
Evaluation
K. Hwang, Advanced Computer Architecture:Parallelism, Scalability, Programmability,McGraw Hill, 1993. ISBM: 0-07-031622-
Applications Programming Environment
Machine
Languages SupportedCommunication Model
MachineDependent
Independent
Addressing SpaceHardware Architecture
Dependent
K Hwang Advanced Computer Architecture: K. Hwang, Advanced Computer Architecture:Parallelism, Scalability, Programmability,McGraw Hill, 1993. ISBM: 0-07-031622-
Speed of CPU is based on:
p –^
The clock rate (speed)
-^
Format of an instructionParallel nature of instruction execution
-^
Parallel nature of instruction execution
-^
Access time to its memory and I/O devices
A 3.2 GHz machine gives information about its clockspeed which is a good indication of the machine speed butit is equally important to consider other factors to measureit is equally important to consider other factors to measureoverall performance of a computer.
There are two types of information stored in memory:
yp
y
-^
Instructions, specifying types of operations a computer executes.•
Such as: activities like accessing I/O, adding two numbers or logicaloperations
p
-^
Data, the actual numerical values necessary to carry outinstructions.•
In adding two numbers the addition operation is an instruction andIn adding two numbers the addition operation is an instruction andactual numbers being added are data.
Von Neumann memory architecture (1945): stores bothinstruction and data in a single memory M68HC12 hasinstruction and data in a single memory. M68HC12 hasthis basic structure.
-^
Harvard memory architecture: stores instruction and data in a separate data memory.
Place where software programs and data are stored
p^
g
Different types of memory are–
RAM (Random Access Memory)
All
d f
d^
i^
i^
l^
i^
h
-^
Allows processor to read from and write into any location on thememory chip
-^
RAM is volatile and cannot retain data without power ROM (R
d O l
M
)
-^
ROM (Read Only Memory)•
ROM is non volatile memory• ROM data can only be read. Does not allow to perform writeoperations on its memory locationsoperations on its memory locations
-^
PROM (Programmable Read Only Memory)•
Can be programmed using a PROM programmer or burnerO
d i
b^
h^
d
-^
Once programmed its contents cannot be changed.
-^
EPROM (Erasable Programmable Read Only Memory)
Read only memory that can be erased by exposing it to strong ultra violet
-^
Read only memory that can be erased by exposing it to strong ultra violetrays
-^
Requires to erase the contents of a location before writing a new value toit
-^
EEPROM (Electrically Erasable Programmable ROM)–
Non volatile memory that can be erased by electrical signals
-^
Requires to erase the contents of a location before writing a new value toitit
-^
Allows each individual location to be erased and programmed
-^
Flash Memory
Developed to overcome the drawbacks of EPROM and EEPROM
-^
Developed to overcome the drawbacks of EPROM and EEPROM
-^
Can be erased and programmed without a dedicated programmer
-^
Can be erased and programmed electrically
-^
Does not provide the facility of erasing a single location but facilitates Does
not provide the facility of erasing a single location but facilitates erasure of a block of memory or entire chip
A computer system is shown above. It consists of a CPU or
t^
l^
i^
t i i
th
d
central processing, memory containing the program anddata, and I/O interface with associated input and outputdevices, and three buses connecting the elements of the system together.
Microprocessors are CPU package in a single chip such as
p^
p^
g^
g^
p
Intel Pentium family chip, AMD K series, Athlon.–
A computer that uses microprocessor as its CPU is calledmicrocomputer such as PCmicrocomputer, such as PC.– Microprocessors require external memory and cannot directlyinterface with I/O devices, peripheral interface ICs are needed. Mi
t^
ll
i^
k^
f th
CPU th
th
Microcontroller is a package of the CPU, the memory, theI/O ports and buses in a single chip.–
Contains everything needed to be a stand-alone microcomputer.– Typically found as an embedded computer application used tocontrol a subsystem or device.
Microprocessor/Microcontroller Instructions/Languages
p^
g^
g
-^
Machine, Assembly, and High-Level
Machine instructions:–
A sequence of binary digits which can be executed by theprocessorp
-^
0001 1000 0000 0110:
[A] + [B]
═
A
ABA
-^
0100 0011:
[A] + 1
═
A
INCA
-^
1000 0110 0000 0110:
6 ═
A
LDA #
-^
Hard to understand, enter, debug, and maintain for human being
-^
A readable equivalent of what is performed is shown firstA mnemonic for the machine instruction is shown second
-^
A mnemonic for the machine instruction is shown second.
Defined by assembly instructions
y^
y
-^
An assembly instruction is a mnemonic representation of amachine instruction•
Mnemonic
What it does
Mnemonic
What it does
-^
ABA
; [A] + [B]
═
A
-^
DECA
; [A] - 1
═
A
-^
Assembly programs must be translated into machine instructions
-^
Assembly programs must be translated into machine instructionsbefore it can be executed -- translated by an assembler
-^
There are two kinds of assemblers: native assembler and crossassemblerassembler.
-^
Programmers need to work on the program logic at a very lowlevel and cannot achieve high productivity.