EE345L Microprocessor Applications and
Organization Fall 2007 (11/18/07)
Class: GSB 2.126, Monday, Wednesday 1-2pm
Lab recitation: GSB 2.126, Friday 1-2pm
Office Hours: Monday 2:15-3, Wednesday 12:00-12:45, Friday
11:15-12noon
Instructor: Jonathan W. Valvano, ENS627, 471-5141
email:
valvano@mail.utexas.edu
Web page:
http://users.ece.utexas.edu/~valvano
Text: Embedded Microcomputer Systems: Real Time Interfacing,
2nd Edition, ISBN 0534551629, Thomson 2006, by J. W. Valvano
Lab: ENS252C
Unique Numbers:
16775 MW 09:00AM-10:30AM Sandy Hermawan
16780 TTH 09:30AM-11:00AM Robin Tsang
16785 MW 10:30AM-12:00PM Robin Tsang
16790 TTH 11:00PM-12:30PM Deepak Panwar
16795 TTH 03:30PM-05:00PM Jacob Egner
16800 TTH 05:00PM-06:30PM Sandy Hermawan
16805 MW 07:00PM-08:30PM Deepak Panwar
16810 TTH 07:00PM-08:30PM Jacob Egner
EE345L TAs:
Robin Tsang ,
rtsang@ece.utexas.edu (head TA)
Deepak Panwar , panwar.deepak@gmail.com
, deepakpa@mail.utexas.edu
Jacob Egner,
jegner@mail.utexas.edu
Sandy Hermawan,
shermawa@ece.utexas.edu
Reference materials on the web:
http://users.ece.utexas.edu/~valvano/EE345L/Lectures/ Lecture
notes
http://users.ece.utexas.edu/~valvano/EE345L/Labs/Fall2010/
Fall 2010 Laboratory Manual
http://users.ece.utexas.edu/~valvano/Datasheets Data sheets
for devices used in EE345L
http://users.ece.utexas.edu/~valvano/Starterfiles Starter
files for EE345L and EE345M
http://users.ece.utexas.edu/~valvano/metrowerks/ Description
of Starter programs
http://users.ece.utexas.edu/~valvano/Datasheets/MC9S12C128_V1.pdf
9S12C32 data sheet
http://users.ece.utexas.edu/~valvano/embed/toc1.htm C
programming manual
http://users.ece.utexas.edu/~valvano/Starterfiles/TechArts.zip Data
sheets about board
http://users.ece.utexas.edu/~valvano/EE345LFinal/ Old exams
http://users.ece.utexas.edu/~valvano/EE345LAnn.html List of
emails
Other references: For programming in C and digital logic, see the EE312 and EE316
texts
Prerequisites: EE319K and EE438 and credit or coregistration for EE333T.
Specific EE319K topics needed for EE345L: LED interface, switch
interface, busy-wait synchronization, serial communication concepts (start bit, data bits, stop
bit, baud rate, bandwidth), 9S12C32 SCI programming, analog to digital
conversion (range, resolution, precision, accuracy), 9S12C32 ADC
programming, digital to analog conversion (range, resolution, precision,
accuracy), interrupt concepts (arm, enable, acknowledge, vector),
9S12C32 Output compare interrupt programming
Specific EE312/EE322C topics needed for EE345L: Modular
programming, differences between pointers and numbers, when to use
permanent allocation and when to use temporary allocation, definitions
of char, short and long, understanding and use of
static, const and volatile, understanding call by value versus call by reference, stack frames,
structures, linked lists, fifo queues, verification
Specific EE411/EE313/EE438 topics needed for EE345L: RLC circuits, NPN and PNP
transistors, input impedance, output impedance, linear
amplifiers using op amps, oscilloscopes, sampling, frequency response,
Bode Plots, Fourier Transform, spectrum measurements.
Teaching philosophy: 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.
Specific Objectives of EE345L The primary objective of EE345L
is for the students to develop the ability to design microcomputer-based
embedded systems. This class allows students to learn microcomputer
interfacing from both a hardware and software perspective.
Microcomputer Architecture (EE319K review)
An Introduction to the Microcomputer,
MC9S12C32 Architecture, The
6812 Instruction Set, 6812 Addressing Modes, 6812 Instructions,
MC9S12C32 I/O
and Memory Organization, The Memory Map of the MC9S12C32
Programming Microprocessors (EE312, EE322C review)
Data Structures in C (arrays, tables, linked
lists, stacks, and fifo queues), Writing Quality Programs in C, Passing Parameters (Conceptual
and Implementation Levels), Modular Programming, Verification and
Testing, Documentation
Microcomputer Bus Interfaces
Digital Hardware, Modules and Signals, Drivers, Registers,
Timing equations, Timing diagrams, Address decoding, PROM, RAM interface
Parallel and Serial Input-Output
MC9S12C32 Parallel I/O Devices, Device
Driver
Software, Buffered Input and Output, Table and Linked List
Interpreters, MC9S12C32 Synchronous and Asynchronous Serial
Input-Output, Synchronization in I/O devices, Blind-Cycle Synchronization,
Busy-Wait
Synchronization, Interrupt Synchronization, Polled Interrupts, Vectored
Interrupts, Interrupt Priority
Parallel Port Interfaces
Keyboards, Key Debouncing, Keyboard Scanning Techniques, LED
Scanning Techniques and LCD Interfacing
Data Acquisition Systems Op
amp amplifiers, DAC, ADC,
Motor
interfacing Stepper
motors, DC motors, pulse-width modulation
After the successful conclusion of EE345L students should be able to
design the hardware/software interface for devices like LCD displays,
motors, keyboards, analog sensors and speakers.
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.
Grading :
35% Laboratory
5% Weekly multiple-choice online homework
15% Quiz1, closed book,
Friday, October 19, 1:00 to 1:50 pm, regular classroom
15% Quiz2,
open book, Friday, November 16, 1:00 to 1:50
pm, ART 1.102
30% Final, closed/open book,
Friday, December 14, 9am-12noon, regularly
scheduled
I have no expected grade cutoffs or expected GPA for this class. You can
view the previous GPAs for most of your classes at UT (Pick-A-Prof
reports I give a GPA in this class of 3.25). All professors want a
5 on their teaching evaluation, and all students want an A. However, I
feel both should only be awarded for excellence.
Lab Partners: All labs should be performed with a partner. You
and your lab partner must be registered for the same lab section. The
lab partnership must be registered with your TA (a simple hand written
note signed by both students will suffice) during the week of 1/23 to
1/27. Once registered, the partnership will continue. A partnership can
be dissolved only after discussion with the TA. Both partners must be
present during the demonstration. It is expected that both partners will
contribute to all aspects of each lab, and both partners are expected to
be present during the check out. The point values are the same for all
labs.
Laboratories
Lab 1d. ASCII to fixed-point conversions (signed 0.01)
Lab 2g. Debugging, dump profile
Lab 3f. Alarm clock, LCD and Output Compare interrupts
Lab 4h. Stepper motor, output compare interrupts, finite state machine
Lab 5g. 12-bit DAC, SPI
Lab 6g. Music player, audio amp
Lab 7f. Temperature measurement, ADC, LCD
Lab 8f. Preliminary Design of 6811 Embedded System with PCB layout
Lab 9d. Interrupt-driven keyboard device driver
Lab 10f. Fixed-point calculator (removed)
Lab 11a. 6811 Construction and Testing
Lab 12a. Final Design and Evaluation of 6811 Embedded
System
EE345L Laboratory Schedule (see your TA for the latest). Each
week there are two 90 minute lab sessions, which are scheduled
Monday/Wednesday or Tuesday/Thursday. You will show the preparation to
your TA at the beginning of the second session. During the first session
demonstrations will be made. The TA will sign your software listing when
you demonstrate your system. The report (hardware/software/data plots)
is due Friday at the beginning of recitation. Any EE345L TA is authorized to checkout your lab. Please
consult with your TA for specific due dates for your lab section.
New Schedule
|
Week |
First session |
Second session |
Friday 1pm |
Comments |
|
8/29 |
none |
none |
no lab activities |
|
|
9/3 |
Meet the TA |
partners chosen |
Metrowerks demonstration |
|
|
9/10 |
1 Prep |
1 Demo |
1 Report |
Oscilloscope demonstration |
|
9/17 |
2 Prep |
2 Demo |
2 Report |
Logic analyzer demonstration |
|
9/24 |
3 Prep |
3 Demo |
3 Report |
|
|
10/1 |
4 Prep |
4 Demo |
4 Report |
Spectrum analyzer demo |
|
10/8 |
5 Prep |
5 Demo |
5 Report |
|
|
10/15 |
6 Prep |
6 Demo |
6 Report |
quiz 1 is 10/19 |
|
10/22 |
7 Prep |
7 Demo |
7 Report |
ExpressPCB demonstration |
|
10/29 |
TA lesson |
8 Prep |
|
|
|
11/5 |
8 Demo |
9 Prep |
8 Report |
|
|
11/12 |
9 Demo |
9 Report |
|
quiz 2 is 11/16 |
| 11/19 |
no lab components due |
|||
|
11/26 |
11 Prep |
11 Demo |
11 Report |
|
|
12/1 |
12 Prep |
12 Demo |
12 Report |
Turn in equipment by 12/5 |
"8 Demo" means your final ExpressPCB file is
delivered to the TA
Old Schedule
|
Week |
First session |
Second session |
Friday 1pm |
Comments |
|
8/29 |
none |
none |
no lab activities |
|
|
9/3 |
Meet the TA |
partners chosen |
Metrowerks demonstration |
|
|
9/10 |
1 Prep |
1 Demo |
1 Report |
Oscilloscope demonstration |
|
9/17 |
2 Prep |
2 Demo |
2 Report |
Logic analyzer demonstration |
|
9/24 |
3 Prep |
3 Demo |
3 Report |
|
|
10/1 |
4 Prep |
4 Demo |
4 Report |
Spectrum analyzer demo |
|
10/8 |
5 Prep |
5 Demo |
5 Report |
|
|
10/15 |
6 Prep |
6 Demo |
6 Report |
quiz 1 is 10/19 |
|
10/22 |
7 Prep |
7 Demo |
7 Report |
ExpressPCB demonstration |
|
10/29 |
8 Prep |
8 Demo |
8 Report |
|
|
11/5 |
9 Prep |
9 Demo |
9 Report |
|
|
11/12 |
10 Prep |
10 Demo |
10 Report |
quiz 2 is 11/16 |
| 11/19 |
no lab components due |
|||
|
11/26 |
11 Prep |
11 Demo |
11 Report |
|
|
12/1 |
12 Prep |
12 Demo |
12 Report |
Turn in equipment by 12/5 |
Prep = you turn in your lab preparation
Demo = you demonstrate your lab to the TA
Partial = you demonstrate first part of a two-week lab to the TA
Report = you turn in your complete lab report to the TA
During the week of September 4-6, please go to your scheduled EE345L
lab sessions in ENS252C to get a demonstration of the lab equipment. If
you did not get a TechArts 9S12C32 kit in EE319K, then a kit will be
given to you. Each student will get exactly one kit. If you loose it or
destroy it, you can purchase another from Technological Arts for $50
plus shipping. For more information on purchasing a replacement kit, go
to the
http://www.technologicalarts.com/ web site and click the University
of Texas at Austin link (order NC12C32SP). Lab partners will be selected
in your lab the week of September 4-6. The Lab 1 preparation is due at the
beginning of your lab the week of September 10 or 11. The lab
preparations (hardware diagrams and syntax-free software source code
printouts) are due at the beginning of your lab period. In other words,
please type your software into the PC before lab. Attendance in lab is
required. All software for lab, and tests must include comments. All
hardware must include R&C values specifying tolerance and type (e.g., 5%
carbon), and TTL chip numbers (be very specific e.g., 74LS00). Pin
numbers are required only for lab, not for the exams.
Students are encouraged to go to the last 1 hour of the other lab
periods, but the first priority will be to the regular students. During
the first 15 minutes of lab, the TA will collect preparations. For the
next 15 minutes, the TA will lead a lab discussion session. The
remaining lab time is available for debugging and lab checkout. At the
end of the semester please verify with the checkout counter that your
record is clear. All reports must be given to the TA by Friday December
5, 5pm.
|
Date |
Chapter |
Topic |
|
8/29 |
1, 2, |
6812 architecture, features of the 9S12C32, fixed-point |
|
8/31 |
2 |
Lab environment, run Lab1 project the real board and on Texas simulator, example decimal fixed point, debugging techniques, call graphs, flow charts, data flow graphs |
|
9/5 |
2 |
Run Lab2 project, debugging techniques, and programming style, dumps, monitor |
|
9/10 |
2,3 |
Draw pictures showing elements on the stack for Metrowerks compiler, debugging from an assembly language perspective, real time systems |
|
9/12 |
3,4 |
Interface binary switch using pull-up resistor to an input port, draw flowchart of OC project, profiling with the scope showing just how small a percentage of time is spent in the background, globals/locals, static variables, threads, draw thread trace |
|
9/17 |
8 |
Profiling, LCD Displays, HD44780 controller, blind cycle versus gadfly synchronization, show how to maintain time of day in OChan, allocation of tasks between the foreground and background |
|
9/19 |
1,8 |
Digital logic, input/output voltage/current, NPN transistor interface of a speaker, capacitive and inductive loads |
|
9/24 |
3,4 |
Linked data structures, ROM-based structures using const, finite state machines, run Moore project, fixed time delay using TCNT, adding output pins, adding input pins, running the FSM in the background using OC interrupts |
|
9/26 |
3,8 |
FSM with functions, traffic example, stepper motors, full-step versus half-step algorithm, stepper interface electronics (L293, TIP120, IRF540), snubber diodes |
|
10/1 |
7, 11 |
SPI/DAC interface, signal generation |
|
10/3 |
4, 11 |
Output compare interrupts, real-time systems, LM386. MC34119 audio amplifiers |
|
10/8 |
11 |
Linear amplifiers, input/output impedance |
|
10/10 |
11 |
Sound waves |
|
10/15 |
11, 12 |
Data Acquisition Systems, Nyquist Theorem, Aliasing. Sampling Jitter |
|
10/17 |
|
Quiz 1 review |
|
10/19 |
|
Quiz 1 in class, covering material in Labs 1,2,3,4 |
|
10/22 |
11, 12 |
resistance bridge, instrumentation amplifier, Butterworth filters, fifo queue, ADC techniques, FIFO queue analysis |
|
10/24 |
12 |
Interrupting Data acquisition systems, sampling time jitter, Nyquist Theorem, performance evaluation |
|
10/29 |
8 |
Memory interfacing, timing diagrams, PROM interface |
|
10/31 |
6 |
Embedded system layout, power, clock, reset |
|
11/5 |
13 |
Keyboard interface |
|
11/7 |
13 Lec20.pdf |
Input capture |
|
11/12 |
Lec21.pdf |
Programming the 6811 using ICC11, draw real timing diagrams, batteries |
|
11/14 |
|
Quiz 2 review |
|
11/16 |
|
Quiz 2 in ART 1.102, covering material in Labs 5,6,7,8 |
|
11/19 |
Lec22.pdf |
Memory testing, ethics |
|
11/21 |
|
no class |
|
11/26 |
4, 7, 8 |
SPI-based LED graphics interface, fonts, double buffer |
|
11/28 |
8 |
PWM, motor interface |
|
12/1 |
7, 14 |
low-level networks Serial Communications, RS232, evaluation |
|
12/3 |
Lec26.pdf |
Final exam review |
|
12/5 |
|
Lab 12 Product Demonstrations (in front of ENS) All Lab notebooks are due to the TA at 12 noon |
|
12/5 |
|
Turn in Lab Equipment so that Mona won’t bar your registration |
|
12/14 |
|
Friday, Final exam, 9am-12noon, Room regularly scheduled |
Legal Stuff: The 12th class day is September
14.
After this date, I will sign a drop only if the Dean approves it. Your
current grade status must be a "C" or better for you to receive a "Q".
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. For more information, contact the
Office of the Dean of Students with Disabilities at 471-6259, 471-4241 TDD.
Cheating: Cheating is extremely uncivilized and is to be avoided
at all cost. We will be using an automated system to check for software
plagiarism. You are allowed to talk to your classmates about the lab
assignments, but you are NOT allowed to look at each other's written
work. Oral discussion about an assignment is encouraged and is not
considered to be cheating. Copying of any part of a program is cheating
without explicit reference to its source. 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. PLEASE DO YOUR OWN WORK. 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 a BBS or on the WWW.
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.
When studying, focus on the topics that apply to the 9S12C32 and the lab
assignments. You will find old quizzes and finals with solutions
on the class web site.
Online homework submission
You can work together in groups of any size, but everyone enters a
separate online solution.
STEP 1: Add yourself to the class roster at the URL
https://hw.utexas.edu/
Unique number:
16775 ****USE THIS NUMBER, NOT YOUR ACTUAL
UNIQUE*******
It will use your EID or I do not need a keypad number, but please spell
your name exactly how the university officially knows you.
STEP 2: Log into the Homework Service at the URL https://hw.utexas.edu/
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.
Detailed Reading Guide for the Textbook
Basic computer organization
Sections
1.1, 1.2, 1.6, 1.8.2
Design process
Sections
1.3, 1.9
Digital logic
Section
1.4
Fixed-point
Section
1.5.5
6811 architecture
Sections
1.7.1, 1.7.2
Software development
Sections
2.1, 2.3, 2.4, 2.5.3, 2.6, 2.9
Debugging
Section
2.10
Device driver, busy wait, SCI
Sections
2.7, 3.4, 3.6 (just 9S12C32 in C)
Interrupt programming
Sections
4.1-4.7, 4.14 (just 9S12C32 in C)
Input Capture
Sections
6.1.1-6.1.3 (just 9S12C32 in C)
SCI interrupts
Sections
7.5, 7.6.1 (just 9S12C32 in C)
SPI interfaces
Sections
7.7.1, 7.7.3, 7.7.6.1, 7.7.6.2 (just 9S12C32 in C)
Switches, keyboards, LEDs, LCD
Sections
8.1, 8.2.1, 8.3.1, 8.3.4 (just 9S12C32 in C)
Stepper motors
Sections
8.4, 8.6.1, 8.6.2, 8.6.3, 13.2.2 (just 9S12C32 in C)
Memory interfacing and timing
Sections
9.1, 9.2.1, 9.2.2, 9.3, 9.4.1, 9.5.1, 9.5.2, 9.6.1, 9.7.1.1, 9.7.2.1
(just 6811)
Digital-to-analog converters
Sections
11.4.1, 11.4.5, 11.4.6 (just 9S12C32 in C)
Analog-to-digital converters and position sensing
Sections
11.5.1, 11.5.6, 11.10.2, 11.10.3, 12.1, 12.2.1-12.2.4 (just 9S12C32 in
C)
Request samples (DIP or PDIP package)
You will need register with an official University email address (e.g.,
YourName@mail.utexas.edu) rather than
a junk email address (e.g., aol.com or gmail.com)
for
http://www.analog.com/en/index.html
Analog Devices
1) AD623ANZ Rail to rail instrumentation amp
2) AD627ANZ Rail to rail low-power instrumentation amp
3) REF03GPZ 2.5V precision analog reference (skip)
4) AD8032ANZ rail-to-rail op amp
http://www.maxim-ic.com/
1) a rail-to-rail op amp, such as the MAX494CPD (skip)
2) a 2.500V analog reference, such as the MAX6225ACPA (with or
without
+)
(ACPA or BCPA)
3) 12-bit SPI interface DAC, such as the MAX539ACPA
(with or without
+)
(ACPA or BCPA)
http://www.ti.com
1) INA122P rail-to-rail instrumentation amp (skip)
2) OPA2350PA rail-to-rail dual op amp (with or without A)
or OPA350PA rail-to-rail signal op amp (with or without A) (skip)
3) TLC2272ACP rail-to-rail dual op amp (with or without A)
or TLC2274ACN rail-to-rail quad op amp (with or without A)
Curious about my research? See
http://users.ece.utexas.edu/~valvano/research