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, Tuesday, Thursday 5-6:15pm
Office Hours (change): Tuesday 3:30-4:50pm, Wednesday 1-2pm, Friday 12noon-1
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 Spring
2012 homework
Data sheets http://users.ece.utexas.edu/~valvano/Datasheets
Starter files http://users.ece.utexas.edu/~valvano/Starterfiles/
Unique Numbers: 16215 Th1-2, 16220 Th2-3, 16225 Th3-4, 16230 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 $79.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 $79 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. Unfortunately we will not be using
the board in EE319K in Fall 2012, so you will not have many opportunities to
sell it. However, it could be useful for senior lab or other projects. 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.
Every student should own their own volt
Peter Garatoni, peter.garatoni@gmail.com
Manan Kathuria,
manan@mail.utexas.edu
Jae Hong Min
jmin@mail.utexas.edu
Pratyusha
Nidamaluri, pratyusha29@gmail.com
Dayo Lawal
dayo.lawal@utexas.edu
Aditya
Srikanth aditya.srik@utexas.edu
Kurt Fellows, kfellows85@gmail.com
James Beecham, james.d.beecham@gmail.com
Austin Blackstone, AustinTheTa@gmail.com
Razik Ahmed, razik.ahmed@utexas.edu
Brandon Carson, brandon.carson@utexas.edu
Kin Hong Mok, kinhong.mok@utexas.edu
Omar Baca,
omar_bacas@hotmail.com
Sam Oyetunji, djsho729@yahoo.com
Zack Lalanne, zack.lalanne@gmail.com
Nathan Quang Minh Thai, nathanqthai@gmail.com
Paul Fagen, pfagen@utexas.edu
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.
Things you should
recall from EE306/BME303
1.
Bits
2. Gates
3. Computer Components
i. Registers
b. Memory – ROM and RAM
i. Address Space and Addressability
4. LC3 Assembly Language
b. Pseudo-ops
c. Op-codes and Operands
i. Memory operations
ii. Arithmetic and Logic operations
iii. Control operations – Branches/Jumps
5. Programming
b. Flow-Charts
c. Data Types
d. Arrays
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, Thursday, February 23, 5-6:15pm, ENS507
(change)
20% In lab Exam
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/19 |
|
none |
1/26 |
|
Go
to |
2/2 |
Lab 1 |
Digital Lock I/O, parallel port, direction register and logical function, written in assembly (simulated, groups of two) |
2/9 |
Lab 2 |
LED
and switch interface |
2/16 |
|
Real board demonstration, bring your board to lab |
2/23 |
Lab 3 |
LED and switch interface |
3/1 |
Lab 4 |
Debugging
Techniques, one switch, one LED |
3/8 |
Lab 5 |
Traffic Light Controller using the real 9S12 |
3/22 |
|
Exam 2 (closed book) in ACA 1.108 Thursday 3/22 |
3/29 |
Lab 6 |
LCD
device driver, decimal fixed-point output, local variables |
4/5 |
|
Go to ACA 1.106 for Metrowerks C demonstration |
4/12 |
Lab 7a or 7b |
Digital Piano or pacemaker using a 4-bit DAC, C (simulated and board, groups of two) |
4/19 |
Lab 8 |
Real-time Position Monitor, ADC, interrupts, LCD, mixture of assembly and C (simulated and board, groups of two) |
4/26 |
Lab 9 |
Distributed DAS, serial port interrupts, FIFO queue, mixture of assembly and C (simulated and board, groups of four) |
5/5 |
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.
Date |
Lecture |
Yerraballi |
Book |
Lecture Schedule |
Week 1 1/17
|
aLec01, aLec02, aLec03 |
Lec1.ppt, Lec2.ppt |
Chapter 1, Appendix 1.1-1.8.2, Chapter 2 and 3 |
Introduction Course
administration; Embedded systems, development cycle; Flow charts, data flow
and call graph |
Week 2 |
aLec03, aLec04, aLec05 |
Lec2.ppt, Lec3.ppt |
Chapter 2 and 3, (Patt,
Chapters 11 and 12) |
Architecture– 9S12 architecture and execution; Simple addressing
modes; Memory allocation; C Programming (C Primer) - Introduction to C; Structure
of a C program (Cookie Day) I/O, Execution, stack, subroutines - Parallel ports, direction
registers; Logical and shift operations; C Programming – Assignment and
Boolean Expressions. |
Week 3 1/31 |
aLec06, aLec07, aLec08 |
Lec4.ppt |
Section 4.7 and 5.7, Chapter 3 and 5 |
Debugging - Debugging in Arithmetic - Arithmetic operations; Condition code bits; C
Programming – Functions |
Week 4 2/7 |
aLec09, aLec10 |
Lec5.ppt |
Appendix 2, Section 2.6, Section 5.1, 5.2, 6.11 |
Board- Demo of the board (bring board to class);Switch input and LED
output Modular programming - If-then, loops; Subroutines parameters and the
stack; Debugging dump; C Programming – Loops |
Week 5 2/14 |
aLec11, aLec12 |
Lec6.ppt, Lec7.ppt |
Section 6.1-6.3, 6.11, (Patt, Chapters 14, 16) |
Pointers - Indexed addressing; Arrays; Strings Timers – Timers; Advanced
functional debugging. C Programming – Arrays, Indexing, Pointers. |
Week 6 2/21 |
aLec13, aLec14 |
Lec8.ppt |
Chapters 1 – 5 |
Review for Test 1: February 23 - Test 1 (closed book), in
ENS507 |
Week 7 2/28 |
aLec14, aLec15, aLec16 |
Lec8.ppt |
Section 6.8, 10.1, 7.1-7.5, 9.1 |
FSMs - Finite state machines
(FSMs); Fixed-point numbers Locals, parameters - Local variables;
Stack frames and parameter passing; I/O synchronization |
Week 8 3/6 |
aLec16, aLec17 |
Lec9.ppt |
Section 7.1-7.5, 6.8 |
C Programming – Scope of variables in
C (Local/Global); Parameter Passing: Call-by-value and Call-by-reference. C Programming - Structures and data types; FSMs in C |
3/13 |
|
|
|
Spring Break |
Week 9 3/20 |
aLec17, aLec18 |
Lec10.ppt |
Section 8.4, 10.1, 10.5, (Patt, Chapter 17) |
LCD interface - LCD programming; Number conversions; Review for Test
2 March 21 - Test 2 (closed book): In lab (during registered lab time), ACA 1.106/108 |
Week 10 3/27 |
aLec19, aLec20, aLec21 |
Lec10.ppt |
Section 9.2, 9.4, 9.6, 9.10, (Patt, Chapter 17) |
Interrupts -9S12 interrupts
and interrupt processing; Timer and periodic (output compare) interrupts C programming – Metrowerks;
C/assembly interface |
Week 11 4/3 |
aLec28, aLec29, aLec22 |
Lec11.ppt |
Section 11.2-11.3, 11.1, 11.4 |
DAC conversion - Digital to
analog conversion (DAC) on the 9S12; Sound generation ADC conversion - Analog to
digital conversion (ADC) Lab 8 design methods |
Week 12 4/10 |
aLec23, aLec24, aLec25 |
Lec12.ppt |
Section 10.2, Section 8.1 |
Numerical calculations - Multiplication and division; Table lookup
and interpolation. Serial I/O - Serial communications interface (SCI); SCI programming
and interrupts; Lab 9 introduction |
Week 13 4/17 |
aLec26, aLec27, aLec30 |
Lec13.ppt |
Section 12.1-12.4, 8.7, (Patt, Chapter 19, skip Sections 19.4) |
Thread communication -
Producer-consumer problems; FIFO queue; C Programming - FIFO TRobots
- Stepper motors; TRobots discussion |
Week 14 4/24 |
aLec31, aLec32, aLec33 |
|
|
C structures, abstraction, software
design, software testing and TRobots |
Week 15 5/1 |
aLec34, aLec37 |
|
|
TRobots
Competition in Class Review for Final Exam: Chapter 1 - 13 |
Due Date,
Monday 11pm |
Homework
Schedule, upload to Blackboard |
01/30/12 |
Homework 1: Hand Assembly |
02/6/12 |
Homework 2: Assembly Concepts |
02/13/12 |
Homework 3: Signed/Unsigned numbers Arithmetic/Logic operations (Patt, Chapters
11 and 12) |
02/27/12 |
Homework 4: If-then-else, Loops, and
Functions (Patt, Chapter 13 and 14) |
03/5/12 |
Homework 5: Functions and Arrays (Patt, Chapters 14, 16.3) |
03/19/12 |
Homework 6: Practice Exam 2s |
03/26/12 |
Homework 7: Solve Exam Problem 1 in C, Pointers and testing (Patt, Chapters 15,
and 16) |
04/2/12 |
Homework 8: Solve Exam Problem 2 in C, Pointers and testing (Patt, Chapters 15,
and 16 |
04/9/12 |
Homework 9: Recursion Problem, (Patt, Chapter 17) |
04/23/12 |
Homework 10: Old Final Exam |
Computer
Usage: Computers in ACA 1.106 and 1.108 are available for your usage. 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 not enough machine hours to give everyone more than enough
time to complete each program. We expect most students to have a laptop 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.
Lab Partners: See the Lab manual at http://users.ece.utexas.edu/~valvano/EE319K/EE319K_LabManualSp12.pdf
EE319K kit handed out by TAs
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
Which computer should I buy?
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
Most homework will be submitted online through Blackboard. There will be approximately
one homework assignment each week
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.
TExaS is available in the documents section of Blackboard.
Legal
Stuff: The 12th class day is February 1. 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/.
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.
Abet
material
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:
Ö |
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