EE319K Introduction to Embedded Systems
Course Catalog Description Embedded systems; machine language execution;
assembly and C language programming; local variables and subroutines;
input/output synchronization; analog to digital conversion and digital to analog
conversion; debugging; and interrupts.
Overview
Class: ACA 1.104, Monday, Wednesday, Friday 2-2:50pm
Office Hours: Tuesday 12-1pm, Wednesday 10am-10:45, Friday
1-2pm
Instructor: Jonathan W. Valvano, ENS627, 471-5141
email valvano@mail.utexas.edu
(put "EE319K" in the email title,
send no ZIP files)
Web page http://users.ece.utexas.edu/~valvano
Lecture notes and lab assignments
http://users.ece.utexas.edu/~valvano/EE319K
Data sheets
http://users.ece.utexas.edu/~valvano/Datasheets
Starter files
http://users.ece.utexas.edu/~valvano/Starterfiles/
Unique Numbers: 16290 Th2-3, 16295 Th3-4, 16300 Th4-5
Text:
Introduction to Embedded Systems: Interfacing to the Freescale 9S12, Cengage
Publishing 2009, ISBN-10: 049541137X | ISBN-13: 9780495411376,
by J. W. Valvano
You can download TExaS from the documents section of Blackboard.
Equipment to buy:
We are no longer giving microcontroller
boards to students. I can tell you the discussions on how to maintain
educational excellence in the face of repeated budget cuts has been long and
careful. Every group of two students will be required to have one 9S12 board.
Either the Technological Arts Adapt9S12DP512 or the Adapt9S12DG128 will suffice. The first possibility is to buy or borrow a board from a previous EE319K/EE445L student. If you obtain a kit from a previous
student, you will need the board, power supply, RS232 cable, and a protoboard.
If you do buy a board from another student, I recommend you run the hardware
checker to make sure the board is functional. The second possibility is to purchase a new Technological Arts Adapt9S12DG128
kit, which includes a board, power supply, serial cable, and solderless
breadboard. The student cost will be $75.00 per kit. The link to pay for this
kit is active. The buying process will be:
a) Once you have selected your partner for Labs 3-9, you go to the
http://www.technologicalarts.ca/uta/ web site and pay $75 to TechArts for the
kit via PayPal. Please pay for your kit at least 7 days before the demonstration
lab period. Our experience is that many credit card companies will add $1 to $3
to the transaction because TechArts is a Canadian company. Neither UT or
TechArts sees this added fee. The fee is charged by the credit card company.
b) The department will get an email from TechArts that you have paid.
c) You will go to ENS234 to pickup the kit. There will be
specific scheduled hours for the pickup phase, which will be around Feb 8 to
15.
d) There will be a board demonstration lab between labs 2 and 3, the week of Feb
14-18, and you should bring your board to this demonstration. Your TA will show you how to test your board to verify it is operational. If the
board does not work during the testing procedure, we will replace it. Our
experience with EE319K is if the board works during the initial test, almost all
students complete EE319K labs without damaging the board. However, if you do
damage your board, then you must purchase another one. We will be using the
board in EE319K in Fall 2011, so if your board still works,
you will have the opportunity to sell it. There is no difference
to a EE319K student between the Adapt9S12DP512 and Adapt9S12DG128 board. The
DG128 board has a little less memory and is a lot less expensive. You will need a volt
TAs: TAs will hold office hours in Lab: ACA 1.106. The
office hours will be posted in lab. About 32 students per TA. Email
all professors and TAs
Mehmet Basoglu,
mbasoglu@mail.utexas.edu
Fábio Fernandes,
fabiogf@gmail.com
Kathryn Loeffler,
katy.loeffler@gmail.com
Jin Miao,
luckymarlon87@gmail.com
Song Zhang,
szhang0119@gmail.com
Manan Kathuria,
manan@mail.utexas.edu
Peter Garatoni,
peter.garatoni@gmail.com
Prasad Vidhyabaskaran,
prasad.v@mail.utexas.edu
Jun Zheng,
jzheng@mail.utexas.edu
Ashmita Sinha,
ashmita5072@gmail.com
Abhik Ranjan Bhattacharya,
abhik.ranjan@gmail.com
Min, Jae Hong,
jmin@mail.utexas.edu
Ming-Feng Wu,
wumingfeng@mail.utexas.edu
Sundeep Korrapati,
sundeep.korrapati@gmail.com
Brice Sorrells,
brice.sorrells@gmail.com
Outcomes: After the successful conclusion of EE319K students should be
able to understand the basic components of a computer, write assembly and C
language programs that perform I/O functions and implement simple data
structures, manipulate numbers in multiple formats, and understand how software
uses global memory to store permanent information and the stack to store
temporary information.
32 page CPU12 quick reference
http://users.ece.utexas.edu/~valvano/Datasheets/CPU12rg.pdf
458 page CPU12 programming reference
http://users.ece.utexas.edu/~valvano/Datasheets/S12CPUV2.pdf
1406
Tech arts board information
http://users.ece.utexas.edu/~valvano/Datasheets/TechArts9S12DP512.pdf
I strongly encourage students to take an active role in this class.
Questions are welcome before, during and after class. Please feel free to email,
visit or call me if you have questions.
1) The understanding of embedded systems (a system with the computer hidden
inside)
2) Assembly language and C programming
3) Understanding how the computer executes instructions (fetch opcode, fetch
operand, read data, operate, and write data)
4) The use of a microcontroller (strategic use of RAM ROM and I/O)
Microcontrollers typically have a little RAM and a lot of ROM. Globals, locals
and the heap go in RAM. Constants and programs go in ROM.
5) Debugging and verification using a simulator and on the microcontroller
(embedded systems typically do not have a print function)
6) How input/output actually happens (the students wire up analog and digital
signals to the 9S12 and measure them with a voltmeter)
7) The implementation of an I/O driver (a set of programs that perform
input/output)
8) Understanding, from an architecture standpoint, how local variables and
parameters work (e.g., a space on the stack is dynamically created, the local
variable is accessed using stack-pointer relative addressing, then the space is
deallocated.)
9) Analog to digital conversion (ADC) e.g., the students interface a slide
potentiometer to the ADC, and write software that measures the position of the
slide, creating a display like “1.23 cm”
10) Interrupt synchronization, real-time ADC sampling (periodic timer
interrupts),
11) Simple motors (e.g., open and closed-loop stepper motor control)
12) Digital to analog conversion (DAC), used to make simple sounds
13) Design and implementation of
Grading: 30% Laboratory assignments, due on Thursday (when performed in groups
of 2, one solution turned in)
15% In class Exam 1, Friday, February 25, 2-2:50pm,
ACA 1.104
20% In class
There will be suggested programming problems to solve, then 3 or 4 times per
semester there will be a 10-minute in class quiz, where the problems will be
selected from the suggested programming problems. The date of each quiz will be
announced in class around 1 week in advance. The specific dates for these
quizzes will not be posted in the syllabus or on blackboard.
Cutoff scores for the corresponding letter grades will not be determined until
after the final exam.
Attendance: Students are expected to attend lectures. The
book covers more information than the class, and we will use lectures to map our
way through the book. If you miss class you may find it difficult to catch up.
Spring 1/20 none
1/27 Go to
2/3 Lab 1 Digital Lock I/O, parallel port, direction register and logical function,
written in assembly
(simulated, groups of two)
2/10 Lab 2 LED and switch interface 3/3 Lab 4 Debugging Techniques, one switch, one LED
3/10
3/23
3/31 Lab 6
LCD device
driver, decimal fixed-point output,
local variables 4/7 Go to ACA 1.106 for Metrowerks C demonstration 4/14 Lab 7 Real-time Position Monitor, ADC, interrupts, LCD, mixture
of assembly and C (simulated and board,
groups of two) 4/21 Lab 8
Distributed DAS, serial port interrupts, FIFO queue, mixture of assembly and C
(simulated and board, groups of four) 4/28 Lab 9a or 9b
Digital Piano
or pacemaker using a 4-bit DAC, C (simulated and board,
groups of two) 5/6 Lab 10
TRobots programming competition, written in C (simulated, groups of two) The following schedule is preliminary, please check the
web for the most recent version. Computer Usage: Computers in LRC complex are available for your
usage. Sign up procedures are those established by the LRC. TA's in the
laboratory are checking off programs and supervising while on duty, thus you can
expect to have only a brief consultations with them. You should learn to develop
software while on the computer. This course involves some projects that require
extended periods of time to complete and a project cannot be done just
overnight. Get started on an assignment early so you can get help if you need
it. There
are ample machine hours to give everyone more than enough time to complete each
program. However, expect the laboratory to be crowded and machine time to be
scarce if you attempt to work in the lab a day or two before an assignment is
due. You will be competing with students in other courses for computer time. We
need your assistance in the laboratory. Please report any equipment problems to
the TA if they are present. If a TA is not present use the form provided in the
lab. If you do this we can rapidly get repair service. Please help to keep the
lab clean. HW1 hints: Legal Stuff: The 12th class day is February 2.
The drop policy has recently changed. See your academic advisor or the Dean of
Students for more information. Course evaluation
is conducted on the last class day in accordance with the Measurement and
Evaluation Center form. The final exam is at the time and place stated in the
course schedule. The University of Texas at Austin provides upon request
appropriate academic adjustments for qualified students with disabilities.
Students with disabilities may request appropriate academic accommodations from
the Division of Diversity and Community Engagement, For more information,
contact Services for Students with Disabilities, 471-6259,
http://www.utexas.edu/diversity/ddce/ssd/.
Abet material Ö
ABET EC2000 Program
Outcomes
Ö
a.
An ability to apply knowledge of mathematics, science, and engineering
Ö
b. An ability to
design and conduct experiments, as well as to analyze and interpret data
Ö
c. an ability to
design a system, component, or process to meet desired needs within
realistic constraints such as economic, environmental, social,
political, ethical, health and safety, manufacturability, and
sustainability
d. An ability to
function on multi-disciplinary teams
Ö
e. An ability to
identify, formulate, and solve engineering problems
f. An understanding
of professional and ethical responsibility
Ö
g. An ability to
communicate effectively
h. The broad
education necessary to understand the impact of engineering solutions in
a global, economic, environmental, and societal context
Ö
i. A recognition of
the need for, and an ability to engage in life-long learning
Ö
j. A knowledge of
contemporary issues
Ö
k. An ability to use
the techniques, skills, and modern engineering tools necessary for
engineering practice
ABET
Criterion 9: Program Criteria for Electrical Engineering Curriculum Achieved:
ELECTRICAL ENGINEERING PROGRAM CRITERIA
Ö
Programs must
demonstrate that graduates have a knowledge of:
1. Probability and
statistics, including applications appropriate to the program name and
objectives;
Ö
2. Mathematics through differential and integral calculus, basic
sciences, computer science, and engineering sciences necessary to
analyze and design complex electrical and electronic devices, software,
and systems containing hardware and software components, as appropriate
to program objectives.
Ö
3. (Electrical)
Advanced mathematics, typically including differential equations, linear
algebra, complex variables, and discrete mathematics.
Curious about my research?
See
http://users.ece.utexas.edu/~valvano/research
2/17
Real board demonstration, bring your board to lab
2/24
Lab 3
LED and switch interface
Lab 5
DNA sequence detector using the real 9S12
Exam 2 (closed book) in ACA 1.102 or 1.106 Friday, starts 30 minutes before
regular
class
time
Week
Reading Assignment
Topic
1/19
Chapter 1,
aLec01, course description, flow charts, data flow graphs,
call graphs,
1/21
Appendix 1.1 through 1.8.2
aLec02, TExaS simulator, design of a NOT gate
1/24
Chapters 2 and 3
aLec03, numbers, hexadecimal, TExaS
ViewBox and help system,
1/26
Chapters 2 and 4
aLec04, 9S12 architecture, registers, simple addressing
modes, memory allocation
1/28
Chapter 2
aLec05, stack, subroutines, execution, parallel ports,
direction registers
1/31
Chapter 3
aLec06, logical, shift, introduction to addition and
subtraction
2/2
Sections 4.6 and 5.8
aLec07, Debugging in TExaS
2/4
Chapters 3 and 5
aLec08, Arithmetic operations, condition code bits, if-then
2/7
Appendix 2
aLec09, Demonstration of the board (bring your board to
class)
2/9
Section 2.6
aLec09, Switch input and LED output, real board, voltmeter
debugging
2/11
Section 5.1, 5.2, 5.6, 6.11
aLec10, Loops, modular design, subroutines, debugging dump
2/14
Sections 6.1, 6.2, 6.3
aLec11, pointers using indexed addressing, array
2/16
Sections 6.1, 6.2, 6.3
aLec11, pointers using indexed addressing, array
2/18
Introduction to C, expressions
2/21
Sections 4.4, 5.8
aLec12, Timer, Functional debugging
2/23
Chapters 1-5
aLec13, Exam 1 review,
2/25
Chapters 1-5
Exam 1 (closed book) Room ACA 1.104
2/28
Sections 6.11
aLec14, Finite state machines
3/2
Sections 6.8
aLec15, Finite state machines
3/4
C, functions, parameters
3/7
Variables in C
3/9
Structures and Finite State Machines in C
3/11
Sections 7.1-7.4, 9.1
aLec16, Local variables, fixed-point numbers,
floating point, ASCII,
3/21
Sections 7.1-7.4, 10.5
aLec17, Local variables, LCD interface
3/23
Sections 10.1, 8.4
aLec18, LCD interface, fixed-point conversions
3/25
Chapters 1-6
Exam 2 (closed book) in ACA 1.102,1:30-3 (starts 30 min
early)
3/28
Sections 9.1, 9.2, 9.4, 9.6
aLec19, Timer, introduction to interrupts
3/31
Section 9.6
aLec20, Output compare interrupts, debugging interrupt
systems
4/1
aLec21, Metrowerks
4/4
Section 10.2
aLec22, C/assembly interface, numerical calculations , emul ediv
4/6
Section 11.1, 11.4
aLec23, Device driver, Metrowerks debugging, analog to digital conversion
4/8
Sections 9.6, 10.1, 11.4
aLec24, Lab 7 hints, design method, tables
4/11
Section 8.1
aLec25, SCI interface, interrupts
4/13
Sections 12.1-12.4
aLec26, Serial port interrupts
4/15
aLec26, Fifo queue
4/18
Sections 12.1-12.4
aLec27, Real time systems, latency, priority, Fifo queue
4/20
Section 11.2
aLec28, Digital to analog conversion
4/22
Section 11.3
aLec29, Sound generation
4/25
Section 8.7
aLec32, Stepper motors
4/27
aLec33 TRobot description
4/29
EE345L review, future of embedded systems
5/2
aLec35, Systems engineering
5/4
Chapters 1-13
aLec36, final exam review
5/6
TRobots programming competition
Laboratory policies: See the Lab manual at
http://users.ece.utexas.edu/~valvano/EE319K/EE319K_LabManualSp11.pdf
Lab Partners: See the Lab manual at
http://users.ece.utexas.edu/~valvano/EE319K/EE319K_LabManualSp11.pdf
EE319K kit handed out by TAs
1 7406
6 LEDs (20 mA, 2 red, 2 yellow, and 2 green LEDs)
6 220 ohm 5%, 0.25 watt resistors
3 push-button switches
3 10k ohm 5%, 0.25 watt resistors
3 1.5k ohm 5%, 0.25 watt resistors
3 12k ohm 5%, 0.25 watt resistors
2 feet of 4-Wire 24 gauge solid wire, used to prototyping
1 0.1 uF ceramic bypass cap
1 headphone jack
1 20k ohm slide pot
Item to get from long term checkout
Should you buy a computer?
Let it be perfectly clear that
the following remarks are my personal opinion, and do not reflect an official
position of the department, college, or university. I feel very strongly that
you should have your own computer on which you develop your software and write
your reports. I think both software development and report writing should be
done without paper, pencil and erasers. Having a computer at home allows you to
organize your information (files, directories etc.) as well as your schedule
(allocate your software development time for that the time of day during which
you are most creative and energetic.) Physiologically most people are more
energetic in the morning. On the other hand, there are fewer distractions late
at night.
Which computer should I buy?
TExaS The hardware/software cosimulator, called Test EXecute And
Simulate, is not freeware, so please don't post it on the net or otherwise send
it to others. On the other hand, I grant EE319K students indefinite usage of the
software, including installing the application on each of your personal
computes. If you know of someone interested in the application have them contact
me directly. It is the 11th semester we will be using the application in
EE319K, but I will be make an updates to fix bugs or add features. Please work
through the tutorials and examples to bring you up to speed on the various
aspects of the system. Instructions for installing TExaS was emailed to students. The TExaS application itself runs on Vista, but the help
system does not run on Vista without a patch. Ask your TA how to get the TExaS
help system to run under Vista.
Metrowerks Codewarrior for the 9S12. The instructions to download the
free (special) version can be found at
http://users.ece.utexas.edu/~valvano/S12C32.htm#Metrowerks The most
recent version will run on Windows 7.
PCBArtist. You will be drawing a 5 or 6 circuit diagrams as part of your
lab assignments. You are free to draw these diagrams in any manner you wish as
long as the information is presented in a complete and professional manner. One
option for drawing circuits is PCBArtist, which can be downloaded at
http://www.4pcb.com/ or
http://www.4pcb.com/free-pcb-layout-software/. The use of PCBArtist is
optional for EE319K students.
Online homework submission
You
can work together in groups of any
size, but everyone enters a separate online solution.
Other than breaking into the system and changing grades, you may get as much
help from anyone in any way you please to complete the online homework.
STEP 1:
Log into the Quest Homework Service at the URL
https://quest.cns.utexas.edu/student/ Click Get Started, log into
with UT EID, you should see EE319K as one of the choices
STEP 2:
Download: Students' Instructions
Download:
First Homework
STEP 3: Work one homework question.
Log in again and submit its answer before next class period.
STEP 4: Continue submitting answers until due time.
STEP 5: Download the solutions after due time.
There will be a signup for Lab checkout times. Each student
will have a specific checkout time which will be when their lab will be
demonstrated to their TA.
Microcontroller - see glossary for definition
Microprocessor - see "processor" in Figure 1.1
Microcomputer - see glossary for definition
IBM-PC is not a microprocessor
TExaS is
available on the Cengage website for the textbook, upgrades to the newest
version can be found at (UPGRADE to latest version).
Religious Holy Days By UT Austin policy, you must notify me of your
pending absence at least fourteen days prior to the date of observance of a
religious holy day. If you must miss a class, an examination, a work assignment,
or a project in order to observe a religious holy day, I will give you an
opportunity to complete the missed work within a reasonable time after the
absence.
Scholastic dishonesty: "Faculty in the ECE Department are committed to detecting and responding to all instances of scholastic dishonesty and will pursue cases of scholastic dishonesty in accordance with university policy. Scholastic dishonesty, in all its forms, is a blight on our entire academic community. All parties in our community -- faculty, staff, and students -- are responsible for creating an environment that educates outstanding engineers, and this goal entails excellence in technical skills, self-giving citizenry, an ethical integrity. Industry wants engineers who are competent and fully trustworthy, and both qualities must be developed day by day throughout an entire lifetime. Scholastic dishonesty includes, but is not limited to, cheating, plagiarism, collusion, falsifying academic records, or any act designed to give an unfair academic advantage to the student. The fact that you are in this class as an engineering student is testament to your abilities. Penalties for scholastic dishonesty are severe and can include, but are not limited to, a written reprimand, a zero on the assignment/exam, re-taking the exam in question, an F in the course, or expulsion from the University. Don't jeopardize your career by an act of scholastic dishonesty. Details about academic integrity and what constitutes scholastic dishonesty can be found at the website for the UT Dean of Students Office and the General Information Catalog, Section 11-802."
You are encouraged to study together and to discuss information and concepts
with other students. You can give "consulting" help to or receive "consulting"
help from such students in oral form. However, this permissible cooperation
should never involve one student having possession of a copy of all or part of
work done by someone else, in the form of an email, an email attachment file,
a portable storage device, or a hard copy. Copying of any
part of a program is cheating without explicit reference to its source. We do
enter lab assignments turned in by EE319K students through a plagiarism checker,
comparing them to assignments of this and previous semesters. If we
find two programs that are copied, there will be a substantial penalty to both
students, e.g., failure in the course. Students who cheat on tests or in lab
will fail. Prosecution of cases is very traumatic to both the student and
instructor. It is appropriate to use software out of the book, class website as
long as all copy-pasted software is explicitly referenced. Copy-pasting software
from current or past EE319K students is scholastic dishonesty. Policies
concerning the use of other people's software in this class:
· I strongly encourage you to
study existing software.
· All applications and libraries
must be legally obtained. E.g.,
You may use
libraries that came when you bought a compiler.
You may use software obtained from the web.
You may
copy and paste from the existing source code.
· You may use any existing source
code that is clearly referenced and categorized:
original:
completely written by you,
derived:
fundamental approach is copied but it is your implementation,
modified:
source code significantly edited to serve your purpose,
copied:
source code includes minor modifications.
Three lecture hours and one laboratory hour a week for one semester.
Design Assignments: Labs 5, 8, 9 (1 week each)
Laboratory Projects: Labs 1, 2, 3, 4, 6, and 7
SCH Engineering Topics 3 (Including: 1 SCH of Engineering Design)
Relationship of the Course to ABET EC2000 Program Outcomes: