EE319K
Introduction to Embedded Systems
Email
all
professors and TAs (f19_ee319k@utlists.utexas.edu)
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
EE319K will continue
the bottom-up
educational approach, started in EE302 and EE306. The overall
educational
objective is to allow students to discover how the computer interacts
with its
environment. It will provide hands-on experiences of how an embedded
system
could be used to solve EE problems. The focus will be understanding and
analysis rather than design. The analog to digital converter (ADC) and
digital
to analog converter (DAC) are the chosen mechanisms to bridge the CE
and
EE
worlds. EE concepts include Ohms Law, LED voltage/current, resistance
measurement, and stepper motor control. CE concepts include I/O device
drivers,
debugging, stacks, FIFO queues, local variables and interrupts. The
hardware
construction is performed on a breadboard and debugged using a
multimeter
(students learn to measure voltage and resistance). Software is
developed in
ARM Cortex-M assembly and C; most labs will be first simulated
then run on
the real LM4F120/TM4C123 board. Software debugging occurs during the
simulation
stage. Verification occurs in both stages. Labs 1, 3, 4 are written
in ARM
assembly language. Labs 8 and 9 are written in a combination of
assembly and
C. Labs 2, 5, 6 and 10 are written in C.
EE319K is team-taught. The course materials (PowerPoint slides, homework assignments, lab assignments, Exam 1, Exam 2, and Final Exam) have been developed collaboratively by all instructors (Erez, Cuevas, Telang, Tiwari, Valvano, and Yerraballi). Here are the section details:
Lecture:
ETC 2.136 TTh 12:30 p.m.-2:00 p.m.
Lab:16135 Tue 3PM-4PM
Lab:16140 Tue 4PM-5PM
Lab:16145 Wed 4:30PM-5:30PM
Lab:16150 Tue 5PM-6PM
Lab:16155 Thur 5PM-6PM (some
students will have lab checkout 6-7)
Please note that all labs are held in EER 1.826. EE319K shares this room with EE302, so please be respectful to other students.
Instructor: Jonathan Valvano, EER 5.820 valvano@mail.utexas.edu
Valvano Office Hours: Tue11-12, Tue 2-3, Wed 10-12, Thur 11-12, Thur 2-3, Fri 11-2. You may schedule additional office hours by appointment or drop in if you see my door open.
Lab lectures Each week we will provide an optional Lab lecture. The times for the lab lectures are Mondays 7-8pm (TBD). All lab lectures will be in RLM 6.104. They will given by the TAs each week. If you cannot attend this lab lecture, you are encouraged to bring your questions to office hours.
TAs (Photos of TAs): The
office hours and locations will be posted in lab. About
38 students will be assigned to each 20-hour TA, and 18 students to
each 10-hour
TA.
Grad TA:
Ashen Ekanayake
UG TAs: Caleb
Kovatch, Sihyung Woo Rave Rajan
EE319K
Class Web page (Lecture notes, homeworks
and lab assignments): http://www.ece.utexas.edu/~valvano/Volume1
Text:
Introduction to Embedded
Systems , ISBN: 978-1537105727,
sixth printing August 2019, which is available on Amazon
Because all editions have the same
ISBN, we discourage buying the book used. This means if you buy it
used you
are likely to get an older edition. The textbook is generally not
available in local
bookstores):
https://www.amazon.com/Introduction-Embedded-Systems-Jonathan-Valvano/dp/1537105728
Equipment to buy:
We will allow our students to use either Tiva LaunchPad (TM4C123 or LM4F120), the same code runs on both (the TM4C123 has hardware PWM and USB host). If you do buy or borrow a board from another student, I recommend you let the TA test it to make sure the board is functional.
You can wait to buy the breadboard until classes start, because it will be cheaper to get together with other students to save shipping costs. PLEASE DO NOT BORROW OR BUY A USED BREADBOARD. Used breadboards can develop weird and confusing faults (pins not connected or multiple pins inadvertently shorted) and could cost you hours and hours of frustration. We recommend you wait until classes start to buy the breadboard, this way 3 or 4 students can team up and make one combined order and save on shipping. (On the other hand, we do recommend you get the microcontroller board as soon as possible).
Safety
warning:
Course
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.
Detailed Objectives of EE319K
Prerequisites:
EE306 or BME303 (taken Spring 2018 or earlier) with a
grade of at
least C-. You should recall:
i. Address Space and Addressability
i. Memory
operations
ii. Arithmetic
and Logic operations
iii. Control operations – Branches/Jumps
Teaching
Philosophy
The EE319K staff 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 us if you have questions.
Grading
10% |
Homework/Programming
Assignments |
Weekly, uploaded to Canvas |
30% |
Laboratory
Assignments |
Due at lab times (Tue/Wed/Thu) |
15% |
Exam 1 |
Thur 10/3 12:30-1:45pm |
20% |
Exam
2 |
Thur 11/7 12:30-1:45pm |
25% |
Final
Exam (regularly scheduled) |
Date Saturday, December
14, 2:00 pm-5:00 pm |
Cutoff scores for the 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.
Laboratory
Policies and Lab Partners: See
the introduction to the Lab
manual.
Exams: All students in EE319K will take Exam 1, Exam 2 and the Final Exam at the same time and place. Exam 1 is a regular written test, at the normal class time, but in a different room. Exam 2 is a practical programming exam during which you will design, implement, and debug a software system in assembly. Your exact room will be assigned to you by your professor. Each student will need a laptop that can run for 120 minutes on battery power. You will need wireless internet connection for the first and last 5 minutes of the exam. You will be writing software using Keil uVision in simulation mode. No microcontroller hardware will be needed for Exam 2. During the exam you will not have access to the book, to the internet, to any starter code, or to any of your previously downloaded or written software. You will have access to the two page instruction sheet handout (like Exam 1), and the help system in Keil uVision. Please contact your professor by October 1 for any of the following four reasons: a) you do not own a laptop that can run simulation of uVision; b) your laptop runs but will need AC power because of a weak battery; c) your laptop runs but does not have wireless connection; d) you have a schedule conflict that prevents you from taking the test at the given time.
Tentative
Lecture Schedule
The following schedule is preliminary; please check the web for the most recent version.
Week |
Lecture |
Lab |
|
Lecture
Schedule |
1 (8/29) |
Lec1 |
- |
Sec.
1.1-1.10,
Sec. 1.13, Sec. 1.15 |
Introduction
–
Course administration; Embedded systems, development cycle; Flow charts, data flow and call graphs; Electronics, logic, Ohm’s law; ARM programming and Keil uVision tools. |
2
(9/3) |
Lec2 |
Lab Intro |
Sec.
1.15-1.18 Sec. 2.4 (Patt Ch. 11, 12) |
Architecture
– ARM architecture and
execution; Simple addressing modes; Introduction to C programming; Structure of a C program. I/O – Parallel ports, direction registers; Logical and shift operations; C variables, assignments and Boolean expressions. |
3
(9/10) |
Lec3 |
Lab
1 Lock |
Ch.
2 (Patt Ch. 11, 12) (Patt Ch. 15) |
Debugging
– Debugging techniques,
monitors, breakpoints, single stepping; Debugging using Keil uVision. Board – Demo of the board (in class); Switch input and LED output |
4
(9/17) |
Lec4 |
Lab
2 Stats |
Ch.
3 (Patt Ch. 13, 14) |
Modular
programming – Abstraction and
refinement; Subroutines, parameters, stack; C functions. Arithmetic – Arithmetic operations; Overflow, condition code bits; Control structures, branches, if-then, loops. |
5
(9/24) |
Lec5 |
Lab
3 Board |
Ch.
4 (Patt Ch. 16) |
Pointers
– Indexed addressing; Arrays;
Strings; C pointers, arrays, indexing, strings. Advanced functional debugging – Debugging dump. |
6
(10/1) |
Lec6 |
- |
Sec. 4.1-4.2 |
Timers
– SysTick
Timers; Review for Test 1. Exam 1 (closed book), Thursday, 10/3, TBD or ETC 2.136 |
7
(10/8) |
Lec7 |
Lab
4 Debug |
Ch.
5 (Patt Ch. 19) |
FSMs
– Finite state machines (FSMs);
Linked structures; C structures and data types; FSMs in C. I/O synchronization – Blind cycle, busy wait, interrupts; Phase locked loop (PLL). |
8
(10/15) |
Lec8 |
Lab
5 FSM |
Ch.
6 |
Interrupts
– ARM interrupts and
interrupt processing; Interrupt controller; Thread synchronization; Periodic interrupts; C/assembly interface; D/A conversion – Digital to analog conversion (DAC); Resistor networks; Sound and music generation. |
9
(10/22) |
Lec9 |
Lab
6 DAC |
Ch. 7 (Patt Ch. 17) |
Variables,
parameters – Locals; Scope
(local/global); Stack frames, recursion; Parameter passing, call-by-value, call-by-reference. LCD interface – LCD programming; Fixed-point numbers, number conversions. |
10
(10/29) |
Lec10 |
Lab
7 LCD |
Ch,
8 |
A/D
conversion – Analog to digital
conversion (ADC); Nyquist
theorem; Lab 8 design methods. Numerical calculations – Multiplication and division; Interpolation and calibration. |
11
(11/5) |
Lec11 |
- Exam 2 |
Ch.
1-7 |
Review
for Test 2. Exam 2 (closed book), Thursday 11/7, special room TBD (last name O-Z) or ETC 2.136 (last name A-N). |
12
(11/12) |
Lec12 |
Lab
8 ADC |
Ch. 9 (Patt Ch. 19, skip Sec. 19.4) |
Serial
I/O – Universal asynchronous
receiver transmitter (UART); UART programming and interrupts; Lab 9 introduction Thread communication – Producer-consumer problems; FIFO queues; FIFOs and queues in C. |
13
(11/19) |
Lec13 |
Lab
9 UART |
Ch.
10 |
Game
programming – 2-D arrays,
bitmaps, sprites; Game engine design; Data structures, timer interrupts; Lab 10. |
14
(11/26) |
Lec14 |
|
|
Advanced
Embedded System
Design; each professor will explore topics related to embedded systems |
15
(12/3) |
Lec15 |
Lab
10 Game |
Ch.
1-10 |
Review
for Final Exam. Game Competition, 12/5, during class time on last day of class |
Lab
Schedule
Labs are due during your lab time (Tue/Wed/Thu), and are demonstrated to the TA.
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.
You can only switch lab sections using official add/drop procedures.
Week |
Lab |
Task |
8/29 |
|
None, do not go to lab |
9/2 |
|
Tutorial during lab session (bring your laptops to Lab for a hands-on tutorial) |
9/9 |
|
Digital
lock, I/O, parallel port, direction
register and logic function, written in assembly (simulated, each
student does Lab 1 themselves) |
9/16 |
Lab
2 |
Temperature sensor data analysis - Mean, Range, Monotonicity, written in C (each student does Lab 2 themselves) |
9/23 |
|
Breathing LED - LED and switch interface, circuit measurements, schematics, written in assembly (board, groups of two) |
9/30 |
|
Exam 1 this
week |
10/7 |
Lab
4 |
Debugging techniques, one switch, four outputs, written in assembly (simulated and board, groups of two) |
10/14 |
Lab
5 |
Stepper Motor Controller, FSMs, written in C (simulated and board, groups of two) |
10/21 |
Lab
6 |
Digital Piano using a 4-bit DAC, written in C (simulated and board, groups of two) |
10/28 |
Lab
7 |
LCD
device driver, decimal fixed-point
output, local variables, written in assembly (simulated and board,
groups of two) |
11/4 |
No
Lab |
Exam 2 this week |
11/11 |
Lab
8 |
Real-time position monitor, ADC, interrupts, LCD, mixture of assembly and C (simulated and board, groups of two) |
11/18 |
Lab
9 |
Distributed DAS, serial port interrupts, FIFO queue, mixture of assembly and C (simulated and board, groups of two) |
11/25 |
No lab, thanksgiving |
|
12/2 |
|
No
lab (TAs help with Lab10
and Final) |
12/5 |
Lab
10 |
Game design competition in class, written in C (simulated and board, groups of two) |
The
Homework schedule can be found in the
Homework Manual
posted on the class website at:
http://www.ece.utexas.edu/~valvano/Volume1/hw.htm
EE319K
shares this
room
with
EE302. TAs in the laboratory are checking off programs and supervising
while on
duty, thus you can expect to have only 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 not enough machine hours to give everyone
more than
enough time to complete each program. We expect students to have a
laptop or
have access to a machine to run at home. Unfortunately, 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.
EE319K
kit handed
out
by TAs
1 ULN2003B, seven Darlington transistor drivers used for the LED and stepper motor interfaces
3
LEDs (20 mA,
1 red, 1 yellow, and 1 green LED)
3
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 (ask your TA for 24k and 47k resistors)
1
headphone
jack, used in lab 6 to create audio
1
10k or 20k
ohm slide pot, used in labs 8 and 9 to measure distance, used in Lab 10
as
joystick
Items to get from your TA
Serial
cable
for Lab 9, used to connect one TM4C123 board to another (this
cable is
simply 3 wires about 2 feet long).
1. Go to https://www.keil.com/demo/eval/arm.htm.
Enter your contact information with valid address, phone and
email. Fill in all fields of this form. It should not cost any
money, and you can select or not select whether you want email from
ARM. ARM does provide support for Keil via its ARM University. So if
you have any Keil-specific questions you could register and post them
at http://www.arm.com/university/
2. Enter
your contact information with valid address, phone and email:
Company = University of Texas, devices = TI, architecture = Cortex-M4
3. Click submit.
4. Right-click on the installer and save it to your computer.
5. Run the exe to install.
1. The official Texas Instruments web site where you can download the drivers, and read the Stellaris Driver Installation Guide (Rev. C) on how to download
2. Plug the LaunchPad board in, and direct Windows to find drivers installed in step 2 above
Legal
Notes
The 12th class day is September 13 The drop policy is extremely complicated. 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. November 7th is the last day an undergraduate student may, with the Dean’s approval, withdraw from the University or drop a class except for urgent and substantiated, nonacademic reasons.
Students
with
disabilities:
The
Religious Holy Days: By
UT Austin policy, you must notify the
instructor
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, we
will give
you an opportunity to complete the missed work within a reasonable time
after
the absence.
Electronic mail notification policy: In this course, e-mail will be used as a means of communication with students. You will be responsible for checking your e-mail regularly for class work and announcements. The complete text of the University electronic mail notification policy and instructions for updating your e-mail address are available at http://www.utexas.edu/its/policies/emailnotify.html.
Use of Canvas and class web site: This course uses the class web page and Canvas to distribute course materials, to communicate and collaborate online, to submit assignments and to post solutions and grades. You will be responsible for checking the class web page and the Canvas course site regularly for class work and announcements. As with all computer systems, there are occasional scheduled downtimes as well as unanticipated disruptions. Notification of disruptions will be posted on the Canvas login page. Scheduled downtimes are not an excuse for late work. However, if there is an unscheduled downtime for a significant period of time, we will make an adjustment if it occurs close to the due date.
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:
A
practical guide to ethics involving software
development for EE319K labs
Activities you can and should do
Activities you cannot and should not do
Three
lecture hours and one laboratory hour
a week for
one semester.
Design Assignments: Labs 5, 8, 9, 10 (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 Student Outcomes: All these apply to EE319K
1) An ability to identify, formulate, and solve complex engineering problems by applying principles of engineering, science and mathematics
2) An ability to apply engineering design to produce solutions that meet specified needs with consideration of public health, safety, and welfare, as well as global, cultural, social, environmental, and economic factors
3) An ability to communicate effectively with a range of audiences
4) An ability to recognize ethical and professional responsibilities in engineering situations and make informed judgements, which must consider the impact of engineering solutions in global, economic, environmental, and societal contexts
5) An ability to function effectively on a team whose members tighter provide leadership, create a collaborative and inclusive environment, establish goas, plan tasks, and meet objectives
6) An ability to develop and conduct appropriate experimentation, analyze and interpret data, and use engineering judgment to draw conclusions
7) An ability to acquire and apply new knowledge as needed, using appropriate learning strategies.
Please review http://users.ece.utexas.edu/~valvano/Volume1/EmergencyTerms.pdf
Every member of the university community
must take
appropriate and deliberate action when an emergency
strikes a building, a portion of the campus, or entire campus
community.
Emergency preparedness means we
are all ready to act for our own safety and the safety of others during
a
crisis. It takes an effort by all of us to
create and sustain an effective emergency preparedness system. Your
support is
important to achieving the
best possible outcomes during a crisis event.
As a University faculty member, you are
responsible
for
pointing out your classrooms' building emergency
evacuation routes and for reviewing emergency procedures with students
at the
beginning of each semester.
This review should include a mention of the monthly emergency
communications
test (every first Wednesday
at 11:50 a.m.) and the list of communications channels the university
uses
during emergencies. It should also
include a review of the attached document outlining emergency terms
(e.g., the
difference between “shelter-inplace”
and “lockdown”) and instructions for faculty and
students
to follow during
emergencies. As a matter of
convenience, we recommend including this information in your syllabus
along
with the phone number for the
Behavior Concerns Advice Line (BCAL: 512-232-5050). This is the number
to call
if you have concerns
regarding the attitude or actions of students, staff, or other faculty.
Finally, at the end of your emergency
preparedness
review,
request that students requiring assistance in
evacuation inform you in writing of their needs during the first week
of class.
This information must then be
provided to the Fire Prevention Services office by fax (512-232-2759),
with
"Attn. Mr. Roosevelt Easley" written
in the subject line.
Thank you in advance for taking the time
to ensure
the
safety of your classroom. I assure you this small effort
can yield much greater rewards should the unthinkable happen. If you
would like
more information regarding
emergency preparedness, visit http://www.utexas.edu/safety/preparedness/.