EE316 - Introduction to Embedded
Microcontrollers
University Bulletin Description:
EE 316 (3) Introduction to embedded microcontrollers
in electronic and electromechanical systems.
Hardware and Software
design techniques are explored for user and system interfaces, data
acquisition and control.
Prerequisite: CMPSC 201 or CMPSC 121; CMPEN 271, EE210 &
Concurrent EE 310.
Prerequisites
by Topics:
1.
Understanding the development and implementation of algorithms
2.
Understanding the use of flowcharts to outline the operation of an
algorithm
3.
Understanding the operation of combinational and sequential logic system
operation
4.
Understanding the binary & hexadecimal numbering systems
5.
Understanding the operation of simple op-amp & comparator circuits
6.
Understanding the use of a transistor as a switch (BJT & MOSFET)
Textbooks,
Paperback Books, Datasheets and Handouts:
(Required): Microchip
PIC18F4620 Microcontroller Datasheet, Microchip Staff,
Microchip Technology Inc, 2004, DS396226B
(Optional): Embedded Design with the PIC18F452
Microcontroller, First Edition, John B. Peatman, Prentice-Hall, 2003, ISBN# 0-13-046213-6
(Optional): Programming PIC Microcontrollers with
PIC-Pro, First Edition, Chuck Hellebuyck, Newnes, 2003, ISBN# 1-5899-5001-1
(Optional): PIC-Pro: Programming and Projects,
First Edition, Dogan Ibrahim,
Newnes, 2001, ISBN# 0-7506-5229-2
(Optional): PIC Microcontroller Project Book, First Edition, John
Iovine, Mcgraw-Hill, 2000, ISBN# 0-07-135479-4
(Optional): PICmicro MCUC, An Introduction to Programming the
Microchip PIC in CCS C, Nigel Gardner, Bluebird Electronics, 2002, ISBN# 0-9724181-0-5
(Optional): Embedded C Programming and the Microchip PIC, Barnett, Cox, &
O’Cull, Thomson-Delmar Learning, 2004, ISBN#
1401837484
(Optional): C++ Programming in Easy Steps, Mike McGrath, Barnes & Noble Books, 2005,
ISBN# 0-7607-7138-3
Grading Policy:
Exam
- 1 20%
Exam
- 2 20%
Exam
- 3 20%
11
Written Laboratory Reports 20%
Lecture
& Lab Attendance 10%
3 Homework Assignments 10%
Homework:
The EE316
Experimentation Board has many different embedded controller based analog functions.
Each student will write CCS C-Code, and PIC-PRO Microcode to control, regulate
and monitor each of these analog functions. Initially, some programs will be
assigned to be written in Assembly Language. The purpose of each Homework Assignment
is to allow the student time to develop the necessary skills that will be
needed to successfully perform each laboratory experiment and pass each exam.
Learning
Outcomes:
All electrical engineering graduates
are expected to have knowledge of digital systems, which includes familiarity
with embedded microcontrollers. The goals of EE 316, Introduction to Embedded
Microcontrollers, are for the student
1. to be able to show the data flow through a microprocessor
when a program is executed,
2. to be able to write the code that will perform a task based
on a word description of a problem,
3. to be able to show how the I/O functions of a
microcontroller and the external devices that are driven by the microcontroller
operate,
4. to be able to analyze hardware interface circuits which
connect the I/O Pins of a microcontroller to external devices based on a word
description of a problem,
5. to be able to create effective technical communications in a
written lab report.
Topics:
1. Fundamentals, Numbering Systems, Digital Logic
Systems
2. Microcontroller Architecture, Instructions, Flash
Memory, EEPROM Memory, RAM
3.
Assemblers & Higher Level Program
Development Language Tools
4.
Assembly Code, CCS C-Code, PIC-Pro
Code
5.
Parallel & Serial I/O, Interrupts,
Timers, Pulse-Time Capturing, Pulse-Width-Modulation
6.
Sampling, Analog-to-Digital
& Digital-to-Analog Converters
7.
Reading from I/O Ports &
Writing to I/O Ports
8.
Delay Loops & Subroutines
9.
Logical, Arithmetic and Bit-wise Operations
10.
Analog Hardware Interface Circuits:
(BJT & MOSFET Switches, Op-Amp, Voltage
Regulator, Relay, LED’s & Motor Drive)
11.
Principles of the Digital Low-Pass-Filter
12.
Frequency and Phase Modulation Hardware and Software Principles
13.
The Microcontroller Comparator and Voltage Reference Hardware &
Software Module
Goals:
Upon
completion of this course, the student should be able to:
§ Write an effective program for any PIC Microcontroller using, Assembly
Code, CCS C-code and the PIC-Pro Programming Languages.
§ Understand the Hardware Architecture, Memory and Register Structure of a Microcontroller.
§ Analyze a variety of Analog Circuits which will efficiently interface
with a Microcontroller.
§ Understand how Light-Emitting-Diodes, Mechanical Switches, the Telephone
Keypad and a
Liquid-Crystal-Display create a human interface with an Embedded
Microcontroller.
§ Understand the way one
can use a Embedded Microcontroller to do the following:
§ Digitally Control the Position, Speed and Direction of Rotation of a
Stepper Motor
§ Digitally Regulate the Speed of a Brushless DC Motor
§ Digitally
§ Communicate with a computer over the RS232 Serial Port
§ Communicate between a Microcontroller and an I2C Device
§ Digitally Control a Real-Time Clock/Calendar device
§ Digitally Measure Temperature
§ Digitally Generate Piecewise Linear Waveforms
§ Digitally Regulate the Output Voltage of a DC Switching Voltage Regulator
§ Generate a Variable Moving Average Digital Low-Pass Filter for use in the
Audio Spectrum
§ Digitally Control the Operation of High
§ Generate Frequency and Phase Modulated Signals
Computer
usage:
This
course studies the operation of embedded microcontrollers and considers both
software and hardware aspects of microprocessor operation. Personal Computers are used for code
compilation, simulation of program operation, downloading of code to the target
microprocessor, and control of the microprocessor during debugging. Word
processing is used in preparing the laboratory reports.
PIC18F4620
Microcontroller Hardware Structure:
1. 4K General & Special
Purpose Registers
2. 33 I/O Pins combined over 5 I/O Ports
3. 36
4. 6 Oscillator Configurations (40Mega Hertz Maximum)
5. Flash Program Memory (32K by 16 Bits)
6. Random-Access-Memory (4K by 8 Bits)
7. Non-Volatile Data EEPROM (1K by 8 Bits)
8. 13 Port, 10-Bit Multiplexed Analog-to-Digital Converter with 3
ADC Configuration Registers
Laboratory
Experiments based on the PIC18F4620 Microcontroller:
1.) “
2.) “Keypad, Light-Emitting-Diodes,
Liquid-Crystal-Display, Relay Control and Sound Generation”
3.) “Digital Brushless-Fan Speed
Regulator”
4.) “Digital Voltage Regulator”
5.) “Digital 4-Phase Stepper Motor
Controller“
6.) “Electronic Thermometer”
7.) “I2C Real-Time Programmable
Clock/Calendar”
8.) “Digital Volt-Ohm Meter and
Frequency Counter”
9.) “Digital Function Generator”
10.) “Variable Bandwidth Digital
Low-Pass-Filter”
11.) “Frequency
and Phase Modulation”
Written
Laboratory Reports:
Each student is
required to submit a written Laboratory report upon the completion of each
laboratory experiment and submit it for grade before the beginning of the next
laboratory experiment.
Contribution to
professional component of the program:
This course requires the student to understand the use of a small
microprocessor to acquire data, process information, and control some
output. This course is devoted the
design of both the software and hardware elements of a microcontroller system.
Relationship to
Program Outcomes:
The course
relates to the following program outcomes:
As stated by the course objectives, EE 316 addresses program goals O1.3,
part 2 (computer proficiency); O2.5, parts 5 through 8 (knowledge of digital
systems); and O.5.2, part 1 (written communication skills).
Prepared
by: Prof. Sal R. Riggio Jr., PhD, PE Date:
3-12-08