Department of Electrical and
Computer Engineering
EEC 417 / 517
Embedded Systems
The reason that most people don’t know a lot about embedded systems is clear from the name. Embedded systems are “embedded,” which means “hidden,” “buried,” or “behind the scenes.” An embedded system is anything that is controlled by a microcontroller or digital signal processor (DSP). Some examples include thermostats, alarm systems, cell phones, answering machines, robots, toys, and the list goes on and on. Any electronic system that does anything beyond the merely trivial is probably an embedded system that has a microcontroller or DSP as its “brain.” The microcontroller / DSP market has experienced huge growth over the past decade. The worldwide market increased from 3.2 billion units in 1993 to 12.2 billion units in 2002.
This course teaches the student how to program an embedded system. You can view the syllabus for the course on-line. Graduate students are required to complete a term project. Undergraduates can complete a term project for extra credit. The project guidelines are available on-line.
The emphasis in this course is on software development, although we must interface with hardware in order to do anything useful. There are dozens of microcontrollers and dozens of DSPs that could be used to teach an embedded systems course. We have chosen to use one of Microchip’s microcontrollers for several reasons:
For this course we will use an In-Circuit Debugger (ICD), which is a development system for Microchip’s PIC (Peripheral Interface Controller) microcontroller. Microchip makes several dozen different microcontrollers. The ICD that we will use interfaces with the PIC16F877 microcontroller. The 3.7 MByte data sheet for the PIC16F877 can be downloaded from Microchip’s web site. The data sheet for this part number is combined in a single document with three other part numbers, so to find the data sheet you can to to the Microchip web site and do a search for “PIC16F873/4/6/7 DATASHEET”. The datasheet is titled “PIC16F87X Data Sheet.”
Many companies and individuals use Microchip’s PIC for embedded systems development. As such, there are a lot of good web sites available that are chock full of useful information and sample projects. In addition, a free e-book by Tim Green is available at no charge.
Embedded Systems Programming with the PIC16F877, by Tim Green (1.3 MB)
Microchip PIC Web Sites
Embedded Systems Web Sites
Embedded Systems Electronics
Distributors
How to Find Electronics
Parts
Lab Assignments
The following zip files contain the lab instructions,
questions, and source code that you will need to complete the weekly lab
assignments. Each zip file has an InstructionsXX.doc file in it. You should go through this file
step by step in order to learn the material. Each zip file also has a GradeXX.doc
file in it. You should answer all of the
questions in this file and hand your answers in by the due date. Each zip file
also has some additional files that will help you complete the lab.
Lab One
Introduction to the Microcontroller Development System
Lab Two
The In-Circuit Debugger
Lab Three
Timing and Timer Interrupts
Lab Four
Long Programs; Capture / Compare / Pulse Width Modulation (PWM)
Lab Five
Pulse Width Modulation; Breadboard Design
Lab Six
Universal Synchronous / Asynchronous Receiver / Transmitter (USART)
In order to do Lab 6, you will need to use a Windows-based Serial Port Program on your PC. I wrote a very simple Visual Basic (Version 6) Serial Port Program that you can use. To install the program on your PC, download SerialInstall.zip (1.49 MB), unzip it, and run Setup.exe. If you want to copy it to floppy disks and install it on another PC, then copy Setup.lst, Setup.exe, and Serial1.cab to one disk. Copy Serial2.cab to a second disk. Then stick the first disk in the PC and run Setup.exe. If you want the source code, I have also made that available in SerialSource.zip (4 KB). You will also need to connect an RS-232 interface chip between the PIC and the PC. A schematic showing how to connect a Maxim RS232 transceiver is available at the Maxim web site www.maxim-ic.com.
Lab Seven
LED Display; Synchronous Serial Port; Keypad Scanning
Lab Eight
Step Motor Control
Lab Nine
Debouncing; EEPROM; Program Memory Modification; Indirect Addressing
Lab Ten
The Inter-Integrated Circuit Bus
Lab Eleven
Fixed Point Math
Lab Twelve
Floating Point Math
Some of the labs
require ASCII character codes. ASCII is an acronym for American Standard Code for
Information Interchange, which is a standard way of representing characters
with numbers. The ASCII character codes are available at ascii.html.
Test Solutions
Quiz01a Solution.doc (Version a)
Quiz01b Solution.doc (Version b)
Midterma Solution.doc (Version a)
Midtermb Solution.doc (Version b)
Quiz02a Solution.doc (Version a)
Quiz02b Solution.doc (Version b)
Quiz03a Solution.doc (Version a)
Quiz03b Solution.doc (Version b)
Quiz04a Solution.doc (Version a)
Quiz04b Solution.doc (Version b)
Department of Electrical and Computer Engineering
Last Revised: February 6, 2008