Fall 2008 EE345L Announcements

August 23, 2008

Email 2 8/26/08
1) I teach using a combination of white board, project demonstrations, and lecture note slides (EE345L lecture note files begin with the letters “LLec”)
http://users.ece.utexas.edu/~valvano/EE345L/Lectures/
Tomorrow’s lecture note slides can be found at
http://users.ece.utexas.edu/~valvano/EE345L/Lectures/LLec01.pdf
I suggest you prepare for lecture by reviewing or printing each lecture the night before.
2) I made a mistake. I said MAX5154ACPA, I meant MAX5154ACPE (or MAX5154BCPE). The complete list is

Email 1 8/23/08 (corrected)
Welcome to EE345L
1) I will not be printing the syllabus. The syllabus can be found at
http://users.ece.utexas.edu/~valvano/EE345LF08.html
2) I will not be printing the lab manual. It can be found at
http://users.ece.utexas.edu/~valvano/EE345L/Labs/Fall2008/
3)The textbook is Embedded Microcomputer Systems: Real Time Interfacing, 2nd Edition, ISBN 0534551629, Thomson 2006, by J. W. Valvano. The book is required, but can also be used for EE345M and will be quite useful for EE464.
4) Do not go to lab this week. Labs start 9/1.
5) There are two things to do this week, before classes start
5.I) Order some free samples of these chips. 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) AD8032ANZ rail-to-rail op amp
http://www.maxim-ic.com/
1) MAX1247ACPE+ 12-bit ADC, such as the (A or B, with or without +)
2) MAX6225ACPA+ 2.500V analog reference (with or without +) (ACPA or BCPA)
3) MAX5154ACPE dual 12-bit SPI interface DAC (with or without +) (ACPE or BCPE)
http://www.ti.com 
INA122P rail-to-rail instrumentation amp (skip)
OPA350PA rail-to-rail signal op amp (with or without A) (skip)
1) OPA2350PA rail-to-rail dual op amp (with or without A)
2) TLC2272ACP rail-to-rail dual op amp (with or without A)
3) TLC2274ACN rail-to-rail quad op amp (with or without A)
5.II) The 9S12 Technological Arts kit will be required. Do one of these four options:
5.II.1) If you got a 9S12C32/9S12DP512 kit in EE319K (and it still works), then you will use it this semester.
5.II.2) If you got a kit in EE319K (but it is lost or broken), then you must buy a new one to use this semester. Go to the http://www.technologicalarts.com web site and order a NC12C32SP. The cost is $49.95 plus shipping.
5.II.3) You can upgrade to the 9S12DP512. The cost is $99.95 plus shipping. The 9S12C32 is sufficient for EE345L, but if your board is broken or lost and you plan a 9S12 for senior lab, the 9S12DP512 has 14k RAM, 2 SCI, 3 SPI, and lots of I/O pins.
5.II.4) If you did not get a 9S12 kit yet (because you didn’t get one during EE319K), then one will be given to you after classes start.
See you Wednesday!

Old email from Fall 2007
Email 2 9/3/07
0) There are a couple of minor corrections to the course descriptor (TA section switch and homework system web link), so see it at
http://users.ece.utexas.edu/~valvano/EE345LF07.html
1) Please check the course descriptor and order the free samples of the parts listed from Analog Devices, Maxim, and TI
2) I modified Lab1 slightly (name change from Lab 1e to Lab 1d, making the system signed instead of unsigned) so the software could be used for Labs 9 and 10 without modification.
3) If you do not have a lab partner by Friday 9/7, email your TA a list of all the EE345L lab sections you could attend, and we will try to pair you up.
4) The 9S12C32 Technological Arts kit will be required. Do one of these three options:
A) If you got a 9S12C32 kit in EE319K (and it still works), then you will use it this semester.
B) If you got a kit in EE319K (but it is lost or broken), then you must buy a new one to use this semester. Go to the http://www.technologicalarts.com  web site and order a NC12C32SP. The cost is $49.95 plus shipping.
C) If you did not get a 9S12C32 kit yet (because you didn't get one during EE319K), then one will be given to you after classes start. Email me if you are in this situation so I can arrange a time for you to see Daryl Goodnight and receive a kit.
5) You should install the Metrowerks C compiler for the 6812 on a computer that you will have access to this semester. For instructions on how to download the latest version see (remember to install the "Special" edition) http://users.ece.utexas.edu/~valvano/S12C32.htm  If you have trouble downloading Metrowerks from the Freescale web site, both the CD with the EE345L textbook and the TExaS CD available for checkout on the second lab have a Metrowerks installer.
6) You will also need ExpressPCB (for designing PCB boards) and ExpressSCH (for drawing circuit diagrams) this semester. They are free to install at http://www.expresspcb.com
7) From time to time, I will use TExaS to demonstrate Metrowerks C programs in class. Many of the starter files have TExaS microcomputer files allowing you to run Metrowerks C programs on TExaS. It is not a requirement to use TExaS in EE345L, but if you want to install it at home, you can do it two ways, First, if your book has a CD, install TExaS from this CD, then go to http://users.ece.utexas.edu/~valvano/upgrade.html  and upgrade to version 1.33. Second, you can checkout a CD from Mona on the second floor lab and install TExaS version 1.33 from this CD (when done bring the CD back).
8) Agenda for first lab section
a) students introduce themselves
b) TA explains grading policy
c) TA demonstrations one of these simple examples
  Moore_9S12.zip
  NotGate_9S12.zip
  RTI_9S12.zip
d) TA explains what is preparation, demo, reports
e) Lab partners are selected

Email 1 8/10/07
There are two things to do this week, before classes start
I) Order some free samples of these chips. 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) AD8032ANZ rail-to-rail op amp
http://www.maxim-ic.com/ 
1) a 2.500V analog reference, such as the MAX6225ACPA
2) 12-bit SPI interface DAC, such as the MAX539ACPA
http://www.ti.com 
1) OPA2350PA rail-to-rail dual op amp (with or without A)
2) TLC2272ACP rail-to-rail dual op amp (with or without A)
3) TLC2274ACN rail-to-rail quad op amp (with or without A)
(II) The 9S12C32 Technological Arts kit will be required. Do one of these three options:
1) If you got a 9S12C32 kit in EE319K (and it still works), then you will use it this semester.
2) If you got a kit in EE319K (but it is lost or broken), then you must buy a new one to use this semester. Go to the http://www.technologicalarts.com  web site and order a NC12C32SP. The cost is $49.95 plus shipping.
3) If you did not get a 9S12C32 kit yet (because you didn’t get one during EE319K), then one will be given to you after classes start.

Old email from Spring 2007
Email 16 4/10/07 Need blue or orange?
I have ordered some LTL-2T3TBK3 blue LEDs and HLMP-D401 orange LEDs that you can use on your Lab 11/12
The blue LEDs are T 1 3/4 (5mm), same size as ones in the bag and have a clear lens. They are kind of expensive, but you can have some if the project really needs blue. The interface requires 3.5V at 20mA. They have 400 mcd brightness, which is very bright. See
http://users.ece.utexas.edu/~valvano/Datasheets/LEDblueLTL2T3TBK4.pdf
The orange LEDs are also T 1 3/4 (5mm), and have a diffused lens. The interface requires 1.9V at 10mA. They have 5.4 mcd brightness, which is typical. See
http://users.ece.utexas.edu/~valvano/Datasheets/LEDorangeHLMP-D401.pdf
The red LEDs in the first bag are T 1 3/4 (5mm), and have a diffused lens. The interface requires 1.6V at 1mA. They have 3 mcd brightness. See
http://users.ece.utexas.edu/~valvano/Datasheets/LEDHLMP-D150.pdf
I have regular red, yellow, green LEDs in my office (same ones we used in EE319K). They are T 1 3/4 (5mm), and have a diffused lens. The interface requires 2V at 10mA. They have 12-60 mcd brightness. See
http://users.ece.utexas.edu/~valvano/Datasheets/LED_red.pdf
http://users.ece.utexas.edu/~valvano/Datasheets/LED_yellow.pdf
http://users.ece.utexas.edu/~valvano/Datasheets/LED_green.pdf 

Email 15 4/10/07 Measurement of tau
This is how I measured time constant
0) finish lab9 hardware, software. connect two resistors to IR sensor as shown in lab
1) connect a single channel scope to tach white wire, set scope time base so one trace across the screen is about 200 to 500ms, set trigger to start on midpoint of tach voltage, put scope in single shot mode, AC coupling might be good too
2) stop motor, duty=0
3) reset scope, single shot
4) start motor, duty=50%
it takes about 100 to 200 ms for motor to reach final speed
for labs 11,12, I will be giving you another bag with
6811, eeprom, reset chip, 28pin socket, 74hc138, 74hc573
If you want additional parts from my office, bring a copy of your SCH file, and a list

Email 14 4/5/07 Lab 8 thoughts
Some students plan to put extra electronics off the PCB, because it doesn't all fit on the PCB. If you do have off-board electronics, then you will need a connector or something to create the bridge. You can get a good grade in Labs 8,11,12 with off board electronics, but you will not be eligible to win "best design". In particular, your grade depends on if the required tasks are ontime and if the 6811/memory interface works, and if the eventual project (I/O software computer) works. However to win "best design" you will need meet the following restrictions
1) runs using the 6811 and external EEPROM/RAM memory on the PCB
2) all electronics are on the PCB. It is possible to have external I/O devices, like speakers switches thermistor LCD, off the PCB and still win "best design
other comments
1) you can use a LCD that you check out from the second floor, but I do not have LCDs to give away (i.e., you will have to give the LCD back to Mona)
2) if you want additional components that I do have (LEDs, switches, thermistors, 74HC00, 74HC595, connectors, resistors, capacitors, speakers, boxes) you need to come to my office and show me your SCH file, circling or listing the needed components
3) the starter file PCB shows J4 (straight 5-pin jack with multicolor wires) as
pin 1 ground
pin 2 power
pin 3 PT2
pin 4 PT3
pin 5 PT4
and the starter file SCH shows J4 as
pin 1 ground
pin 2 PT2=PD1
pin 3 PT3=PD0
pin 4 PT4=/reset
pin 5 power
The pin numbers do not matter. To program the 6811 you will need to connect
6811 power (+5) to 6812 power (+5V)
6811 ground to 6812 ground
6811 PD1 to 6812 PT2
6811 PD0 to 6812 PT3
6811 /reset to 6812 PT4
It is appropriate for the PCB to match the SCH exactly (so change one to match the other)
4) the footprint for the MC34164-005 is identical to the PN2222 (TO226AA), and is shown as Q1 on both starter files, SCH and PCB.


Email 13 3/31/07
Lab 8 thoughts
1) I showed my Lab 8 mockup in class on Friday. I took some photographs illustrating the design process for Labs 8, 11, 12. I added four figures to the Lab8f.pdf posted on the web. I did not change any of the assignment, specifications, requirements, or deliverables. I just added four figures with explanations of the figures.
http://users.ece.utexas.edu/~valvano/EE345L/Labs/Sp2007/Lab08f.pdf
2) My advice is to do a little bit of Lab 8, then have someone check it. DO NOT DO THE COMPLETE DESIGN SCH/PCB THEN GET IT CHECKED. To have Lab 8 checked, you can contact your TA, or email files to me. The TAs and I will evaluate your
Address decoder equation
Design equations for CE/ OE/ WE/
ExpressSCH files for 6811/memory design errors
ExpressSCH files for gross design errors in the I/O interface
ExpressPCB files for style (line width, corners)
You should have a TA or me certify the 6811/memory interface is valid before you begin PCB layout. There are at least four possible valid solutions for the 6811/memory interface, as we discussed in class on Friday (two ways to turn it off, and two ways to synchronize). Neither the TAs nor I have the time to verify accuracy of your PCB. We can not also certify all the I/O circuits will work, but we can check to make sure you are using 6811 input/output pins appropriately (e.g., some 6811 pins are input only and others are output only).
3) The list of components was sent in the last email, and the datasheets for these components can be found on the datasheets page
http://users.ece.utexas.edu/~valvano/Datasheets/
4) There will be a “Science Fair”-like public demonstration for Lab 12. I will present special awards to the team of two with the best design. The preliminary round will be judged by your TA, and the final round will be judged by an independent panel (e.g., Daryl Goodnight, Paul Landers, Perry Durkee etc.)

Email 12 3/29/07 Lab 8/11/12 parts
Some of the Lab 8/11/12 parts will be distributed in recitation March 30. In particular, each group of two will get (to keep):
1- 78M05 0.5 amp +5V regulator (78m05.pdf) $0.17
1- JACK DC Power MALE 2.1mm (2.1mmJack.pdf) $0.39
3- resistor 1/8W 5% 2.7K OHM $0.0069
6- resistor 1/8W 5% 10K OHM $0.0069
1- resistor 1/8W 5% 10M OHM $0.0069
2- CAP CERM DISC 22pF 50V 20% $0.05
1- 52 pin PLCC socket (Plcc.pdf) $0.99
1- 28 pin IC socket $0.64
1- 8 MHz crystal
2- 0.47 uF Tantalum 35V 10% caps (0.1in footprint) (tantalumCap.pdf) $0.23
4- 0.1uF ceramic capacitors, bypass cap for each chip, (0.1in footprint) $0.05
2- PN2222 NPN transistor (Pn2222a.pdf, Pn2222-d.pdf) $0.04
3- B3F tactile push button switch (B3f-1059.pdf) $0.17
3- 1.6V 1mA HLMP-D150 LED (LEDHLMP-D150.pdf) $0.173
1- 5 pin, 3" jumpers with matching pcb mount, CON-55, $1.35
2- 2-pin headers with 2-pin jumper
You can have additional switches, PN2222A, 10k, 220 ohm, connectors, and LEDs after the boards come in, and you are ready to solder. The statically sensitive parts 74HC138, 74HC573, MC34164, MC68HC11E1CFN2, and 8k EEPROM will also be given later.
1- MC68HC11E1CFN3 (M68hc11e.pdf, 6811techref.pdf) $6.55
1- 28C64BL-12 120ns 8K by 8 EEPROM (28C64B.pdf) $2.00
1- MC34164-005 reset circuit (Mc34164.pdf, MC34164b.pdf) $0.54
1- 74HC573 (74hc573.pdf) $0.22
1- 74HC138 (74hc138.pdf) $0.18

Email 11 3/28/07 Lab 8/11/12 parts
The TAs decide the team members. I prefer teams of 6, and I prefer each team of 6 has one TA. However, if the TA is willing to have a group size less than 6, or if two TAs are willing to share a group, then it is ok with me. No one keeps this team of 6. You will do Lab 8 prep, and all of Labs 9,10,11,12 in your usual groups of 2. The group of 6 is a one time event just for the Lab 8 demo and report (the mockup and the PCB file)

Email 10 3/11/07 Lab 6
1) here is a web site with free sheet music
http://www.gmajormusictheory.org/Freebies/freebies.html
2) If you are new to music, read Chapter 1
http://www.gmajormusictheory.org/Fundamentals/workbooks.html
simple music is a list of notes (pitch and duration)
3) If you want to create more complex sounds see
http://digitalmedia.wfu.edu/project/nsf-due-0340969/interactive/timbre/ 

 
Email 9 3/6/07 Lab schedule change
1) Quiz1 is closed book, Wed, March 7, 1:00 to 1:50 pm, Belmont 328 
2) No HW this week, the next one will be due March 23
3) I got pretty-much an even split from old TAs, new TAs, and students concerning the proposed change in lab schedule. I decided to change the schedule. If you liked the previous schedule better, well then just follow it.  This means Lab 6 prep is not due until the first lab period after spring break. Lab 5 report is still due this Friday

Week  First       Second    Friday 1pm
3/5   5 Demo                5 Report     
3/19  6 Prep      6 Demo    6 Report
3/26  7 Prep      7 Demo    7 Report     
4/2   8 Prep      8 Demo    8 Report     
4/9   9 Prep      9 Demo    9 Report     
4/16  10 Prep    10 Demo   10 Report     
4/23  11 Prep    11 Demo   11 Report     
4/30  12 Prep    12 Demo   12 Report     
Prep = you turn in your lab preparation
Demo = you demonstrate your lab to the TA
Report = you turn in your complete lab report at recitation
4) I simplified Lab 7. So if you downloaded it once, download it again


Email 8 3/6/07 Lab reading assignments
Lab 2 reading
  Valvano Section 2.11 on debugging
  Valvano Section 4.3.2 on the two-pointer FIFO
Lab 3 reading
  Valvano Section 2.4.3 on 6812 timer
  Valvano Section 2.4.4 on time delays
  Valvano Section 4.1 on interrupts
  Valvano Section 4.2 on reentrant programming
  Valvano Section 4.4 on interrupts
  Valvano Section 4.5.4 on 9S12C32 interrupt vectors
  Valvano Section 4.15.3 on periodic interrupts
  Valvano Section 8.6 on stepper motors.
Lab 4 reading
  Valvano Section 2.4.5 on Moore FSM
  Valvano Section 4.15.3 on periodic interrupts
  Valvano Section 8.4 on transistors used to control motors
  Valvano Section 8.6 on stepper motors.
Lab 5/6 reading
  Valvano Section 4.15.3 on periodic interrupts
  Valvano Section 11.4.1 on DAC parameters
  Valvano Section 11.4.6 on waveform generation.
Lab 7 reading
  Valvano Section 4.3.2 on the two-pointer FIFO
  Valvano Section 11.1.1 on resistors
  Valvano Section 11.2.1 on op amp parameters
  Valvano Section 11.2.5 on instrumentation amplifier
  Valvano Section 11.5.1 on ADC parameters
  Valvano Section 11.10.2 on the 9S12C32 ADC
  Valvano Section 11.10.3 on the 9S12C32 ADC software
  Valvano Section 12.1 on Data Acquisition Systems
  Valvano Section 12.2.1 on Transducer Specifications
  Valvano Section 12.2.7 on Temperature Transducers
  Valvano Section 12.3.2 on Nyquist Theory
  Valvano Section 12.3.3 on ADC precision
  Valvano Section 12.5.3 on temperature measurements
Lab 8 reading
  Valvano Section 9.1. on introduction to memory interfacing
  Valvano Section 9.2.1 on full address decoding
  Valvano Section 9.2.2 on minimal-cost address decoding
  Valvano Section 9.3 on timing syntax
  Valvano Section 9.4.1 on synchronous bus timing
  Valvano Section 9.5.1 on synchronized versus unsynchronized
  Valvano Section 9.5.2.2 on 6811 timing
  Valvano Section 9.6.1 on 6811 interfacing
  Valvano Section 9.7.1. on 32K PROM timing
  Valvano Section 9.7.1.1 on 32K PROM interface to 6811
  Valvano Section 9.7.2. on 8K RAM timing
  Valvano Section 9.7.2.1 on 8K RAM interface to 6811
Lab 9 reading
  Valvano Section 6.1.1. on principles of input capture
  Valvano Section 6.1.2 on details of input capture
  Valvano Section 6.1.4.1 on 16-bit period measurement
  Valvano Section 6.7 on pulse-width modulation
  Valvano Section 8.4 on transistors used to control motors
  Valvano Section 8.5.6 on DC motor interfacing
  Valvano Figure 8.90 on L293 interface
Lab 10 reading
  Valvano Section 13.1. on Digital Control Systems
  Valvano Section 13.3.2 on incremental control


Email 7 2/27/07 Quiz1 announcements
1) I will review for Quiz1 on Friday in recitation. Quiz1 is closed book on Wed, March 7, 1:00 to 1:50 pm, Belmont 328. I posted a study quide at
http://users.ece.utexas.edu/~valvano/EE345LFinal/
http://users.ece.utexas.edu/~valvano/EE345LFinal/Quiz1study2007.pdf
2) Lab reports are now due 1pm on Fridays at the beginning of recitation.
3) There is still time to get free parts. I suggest these (get them in PDIP packages)
http://www.analog.com/en/index.html
Analog Devices
AD623AN Rail to rail instrumentation amp
or AD627ANZ Rail to rail low-power instrumentation amp
REF03GPZ 2.5V precision analog reference
OP491GPZ rail-to-rail op amp
http://www.maxim-ic.com/
a rail-to-rail op amp, such as the MAX494CPD
a 2.500V analog reference, such as the MAX6225ACPA
http://www.ti.com 
TLC2272ACP rail-to-rail dual op amp (with or without A)
4) I am not going to have any Pop Quizes to be taken for a grade. However, we will have a midsemester evaluation on Friday (you evaluate me).

Email 6 2/24/07 Lab4 announcements
Remember to download a new copy of Lab4. I simplified it last weekend. Many of asked exactly how Lab 4 should work. "What if....". You are done if
0) there is a 1-1 mapping from the FSM graph and the C data structure
1) it is a FSM with 3 inputs and some outputs
2) there is a delay for each state, and there are different delays
3) the motor moves such that the output never skips from 5 to 10, 10 to 5, 6 to 9, or 9 to 6
4) there are about 20 to 30 states, and you can describe how it works in simple terms (approximately the way it is described in the lab assignment)
5) the FSM runs in a background interrupt service routine.
6) the foreground (main) initializes the FSM, then executes for(;;){} do nothing loop
7) the ISR has no backward jumps. i.e., there are no wait function calls in the ISR
There are two starter files for the stepper interface design
http://users.ece.utexas.edu/~valvano/EE345L/DataSheets/extraComponents.sch
http://users.ece.utexas.edu/~valvano/EE345L/DataSheets/Sp2007/Lab4_9S12C32.sch
I used 4 transistors to interface the four coils in my example
4 PN2222
4 1N914 diodes (any diode is ok)
4 2k resistors
You can use the L293 if you want (still need the diodes).
for the third switch, I used a push button and a 10k pull-up resistor
see the data sheets at
http://users.ece.utexas.edu/~valvano/EE345L/DataSheets/
2N2222.pdf
1N914.pdf
B3F-1059.pdf
There is a lot of material on stepper motors at
http://users.ece.utexas.edu/~valvano/EE345L/DataSheets/
halfstep.pdf
drivebasic.pdf
stepbasic.pdf
stepper.pdf
microstep.pdf
selection.pdf

Email 5 2/10/07
Lab 2g announcements
0) There are two starter files. Lab2g is used for most of this lab, while Lab2g_v2 is used only for procedure B.
1) There are two typos on the program in procedure E). The PTT output should be before the return statements.
int RxFifo_Put(char data){
char volatile *tempPt;
PTT |= 0x08;
  tempPt = RxPutPt;
  *(tempPt) = data;      // try to Put into fifo
  tempPt++;            
  if(tempPt == &RxFifo[RXFIFOSIZE]){ //  wrap?
    tempPt = &RxFifo[0];
  }
  if(tempPt == RxGetPt){
    PTT &= ~0x08;
    return(0);        // Failed, was full
  }   
  else{
    RxPutPt = tempPt;  // Success, update pointer
    PTT &= ~0x08;
    return(1);
  }
}

2) We have not yet demonstrated to you the use of the logic analyzer (a mistake on our part). If you borrow the logic analyzer probe from the second floor checkout and can figure it out on your own, great. However, we allow you to reduce the complexity of the procedure E to profile just two events, and use a regular dual trace oscilloscope. If you profile just two functions, please choose one foreground and one background (one possibility is RxFifo_Put and RxFifo_Get).
3) There is confusion about exactly what goes in the report for Lab 2g.
Deliverables (exact components of the lab report)
A) Objectives (1/2 page maximum). Simply repeat the items shown in the Goals section
B) Hardware Design (none for this lab)
C) Software Design (no software printout in the report)        none
D) Measurement Data (you may sketch the waveforms or use the printer connection)
        Prep part 2) Show the cycle counting of execution speed. Include the listing file, circling or highlighting the instructions used to determine execution speed. Include the execution speed in cycles.
        Part A) Sketch the debugging profile, showing a situation occurring with two successive interrupts
        Part B) Show the three results of the execution times
        Part C) Show the execution time measured with the oscilloscope
        Part D) The software profile data, draw arrows on the listings, and data-flow graph
        Part E) The hardware profile data
E) Analysis and Discussion (give short 1 or two sentence answers to these questions)
1) You measured the execution speed of RxFifo_Get three ways. Did you get the same result? If not, explain.
2) Which method of measuring execution speed would you use if you expected the execution speed to vary a lot (e.g., ranging from 0.5 to 20ms), and wanted to determine the minimum, maximum and average speed? Why?
3) Which method of measuring execution speed would you use if you expected the execution speed to be very large (e.g., 20 seconds)? Why?
4) Define “minimally intrusive”.
5) List the two necessary components collected during a “profile”.

Email 4 1/25/07
1) The due dates for the lab components (prep, demo, report) are listed on the course descriptor.  http://www.ece.utexas.edu/~valvano/EE345LSp07.html    The preparation for Lab 1 (entire program, typed in and compiled) is due the second session of Lab next week (Wednesday 1/31 or Thursday 2/1, whatever your official schedule is).
2) The main program shown in the Lab1 assignment can be downloaded at http://www.ece.utexas.edu/~valvano/EE345L/DataSheets/Sp2007/  as the file
Lab1e.c
3) Those who have not previously received a 9S12C32 kit from the ECE department can see Daryl Goodnight, 2nd floor lab (look in the room across from checkout) at these times:      Friday January 26, 9am-12 noon and 1:00pm to 3:30pm. Bring your UT ID.
4) HW1 is due this Friday (on line)
5) There is a newer version of Metrowerks. The directions in email1 describe how to download version 4.5. The steps are correct as described, but it will be version 4.6 rather than 4.5.
6) Next week, we will ask about 4 students to move to the Tuesday/Thursday 8-9:30pm lab, in order to balance the load among the 5 TAs. If you wish to be considered for the shift, let your TA know. In the mean time, please do Lab 1 with the TA/time you are officially scheduled. We will consider three factors in the shift: your wishes (we will not move anyone against their wishes), TA workload, and maintaining as many sections with an even number as possible.
7) If you do not have a partner yet, simply do Lab 1 on your own.


Email3 1/22/2007 (corrected)
1) Two students have had trouble ordering free samples from Analog Devices, but four students have been successful. You must limit your request to three parts. The trick is to register with your official University email, such as
YourName@mail.utexas.edu.
2) For the HW service, you must register using unique number 15965. The first HW is due this Friday.
3) The TA assignments have been made, see http://www.ece.utexas.edu/~valvano/EE345LSp07.html . The first EE345L lab session will be Wednesday 1/24 or Thursday 1/25 (whatever your official schedule is). At this time, you will meet your TA, listen to the grading policy and get a short demonstration of the compiler/9S12C32 board.
4) The preparation for Lab1 is due Wednesday 1/31 or Thursday 2/1 (whatever your official schedule is). See all the labs at
http://www.ece.utexas.edu/~valvano/EE345L/DataSheets/Sp2007
See Lab 1 at
http://www.ece.utexas.edu/~valvano/EE345L/DataSheets/Sp2007/Lab01e.pdf
5) There about 5-6 students without 9S12C32 boards. Our plan is to arrange times with Daryl Goodnight on the second floor at the end of this week for you to pick one up. You will need to bring your ID. You do not need the board to do the preparation.


Email 2 (1/20/07)
1) Pactec Enclosures is no longer sending free boxes to UT. I will figure out another method to get a box for your
project. You do not need to request a free box at
http://www.pactecenclosures.com/index.html   
2) You should still attempt to get the free analog chips from Analog Devices and Maxim
3) The important email that I send you will be archived at
http://www.ece.utexas.edu/~valvano/EE345LAnn.html
4) I am looking for an approximate count of EE345L students who have not received a 9S12C32 board from the
department. Can you email me if you did not receive a 9S12C32 kit in a previous semester?
5) If you got a kit from the department, and it is lost or broken, then you must buy a new one to use this semester. Go to the http://www.technologicalarts.com  and order a NC12C32SP. The cost is $49.95 plus shipping.
6) Because I haven't fully trained the TAs for this semester, the first EE345L lab session will be Wednesday 1/24 or Thursday 1/25 (whatever your official schedule is).
7) Monday's lecture notes can be found at
http://www.ece.utexas.edu/~valvano/EE345L/Lectures/
as LLec02.pdf
8) Try to login to the HW system. Four students have logged in, so I think it is active. The first HW is due next Friday. It is linked to your official registration by UT EID. https://hs.ph.utexas.edu 

 

Email 1 (1/16/07)
 
(I) The EE345L course descriptor has been posted (I will not be making Xerox copies of the descriptor to pass out, so this is the official course descriptor) I am waiting on the official TA appointments, so this descriptor is still preliminary.
http://www.ece.utexas.edu/~valvano/EE345LSp07.html 
(II) The 9S12C32 Technological Arts kit will be required. Do one of these three options:
  1) If you got a 9S12C32 kit in EE319K (and it still works), then you will use it this semester.
  2) If you got a kit in EE319K (but it is lost or broken), then you must buy a new one to use this semester. Go to the
http://www.technologicalarts.com    web site and order a NC12C32SP. The cost is $49.95 plus shipping.
  3) If you did not get a 9S12C32 kit yet (because you didn’t get one during EE319K), then one will be given to you after classes start.
(III) You should install the Metrowerks C compiler for the 6812 on a computer that you will have access to this semester. CodeWarrior Version 3.1 will compile programs we need for EE319K/EE345L/EE345M. For version 3.1 you should use their 12K free educational license. There is an installer for Version 3.1 on the CD accompanying the second edition of the EE345L/EE345M textbook. Follow these steps to install the Special edition of Metrowerks CodeWarrior Version 4.6 (32K free educational license for C code)
1)
http://www.freescale.com/
2) click "CodeWarrior Development Tools" under Products
3) click "HCS12(X)" under CodeWarrior Products
4) scroll down and click "CWX-H12SX-SE" "
CWX-HXX-SE" labeled Special Edition Evaluation for CodeWarrior Development Studio for HCS12X Microcontrollers V4.6
5) Register as a new user (if you have registered before, just log in)
   email must be correct
   decide whether or not you want email from Metrowerks
6) Fill in the page with "project details" stating you are a student taking a class, fill in all required fields
7) Download CW12_V4_6.exe (334 MB) and install (the special edition does not require downloading a separate license)
8) Download instructions and starter projects from my web site at
http://www.ece.utexas.edu/~valvano/metrowerks/
In particular, read
http://www.ece.utexas.edu/~valvano/metrowerks/Howtobuild_S12C32.pdf 
The TAs will give demonstrations during the second week of classes.
(IV) You will also need ExpressPCB (for designing PCB boards) and ExpressSCH (for drawing circuit diagrams) this semester. They are free to install at
http://www.expresspcb.com
(V) There are no labs during the week of Jan 16, but we will be having recitations each Friday 1-1:50 starting this week.
(VI) Request samples (DIP or PDIP package) for
http://www.analog.com/en/index.html  
Analog Devices
1) AD623AN Rail to rail instrumentation amp
or AD627ANZ Rail to rail low-power instrumentation amp
2) REF03GPZ 2.5V precision analog reference
http://www.maxim-ic.com/  
1) a rail-to-rail op amp, such as the MAX494CPD
2) a 2.500V analog reference, such as the MAX6225ACPA
3) 8-bit SPI interface DAC, such as the MAX549ACPA

 

Old email from Spring 2006
Email 22  Lab 9 information
To any groups who have grounded the EEPROM OE: sorry, I was mistaken. To write to the EEPROM we must have CE=0, WE=0 and OE=1. To read from the EEPROM, we must have CE=0, WE=1 an OE=0.
To the group who picked up the normally closed NC switch for their reset switch: after further review, the NC switch will not work. You must modify the reset circuit to match the starter file. The system will operate without the reset switch, but the reset logic and 10k pullup are required
Pop Quiz 4 will be Monday, and we will also conduct the class evaluation.
I will be in the office Friday 9:30-12, if you have questions or problems.
If your career will involve large software systems, consider this new class
http://www.ece.utexas.edu/~valvano/EE345L/DataSheets/EE379K-annoucement.pdf
Competition Rules
1) The TAs will select one team of two from each of the 9 lab sessions. The professor is allowed to nominate one additional entry.
2) On Wednesday May 3 from 1:00-1:40pm outside of ENS we will set up tables and supply power plugs.
3) Each team will bring their working project, a printout of their PCH design, and a printout of their 6811 software.  Make sure your names are on the PCH design and software listings.
4) There will be scoring sheets for the general public. The TAs will be election judges. Each member of the public will be allowed to vote once. The judging criteria include visual appeal, functionality, and software quality.
5) The winners will be announced at 1:50pm. Prizes will be awarded.

Email 21
1) Lab 9 Preparation parts 1,2,3,4 are due at the start of the first lab period April 24 or April 25.  Preparation part 4 requires just a little or no modification from the example program simple.rtf in the TExaS11 folder or the program simple.c in the ICC11 folder. In preparation step 3, I suggest you also test the reset circuit. On the dual scope look at both +5 power and reset as the wall-wart is plugged in, verifying figures 2 and 4 of the MC34164 data sheet,
http://www.ece.utexas.edu/~valvano/EE345L/DataSheets/MC34164.pdf
Lab 9 preparation part 5 is due at the start of your second lab period April 26 or 27
2) The PCB boards are arriving now, so go see your TA to pick yours up. When you get it, recheck the PCB layout on the actual board looking for dropout (missing traces) and inadvertent shorts. Follow the +5V and ground signals around the board verifying with an ohmmeter than there are no shorts to inappropriate places.
3) The TAs have a box of extra parts. If there are components you need that are not in the box, come see me Wed 11-12 or 2-3. Don’t check out parts from the second floor and solder them to the PCB, because the second floor wants their stuff back.
4) Many of you took LEDs of different sizes and colors. I suggest you build a test circuit on a protoboard to verify the resistor value needed to make the brightness correct. LEDs come in different voltages, currents and brightness. My plastic bags contain multicolored LEDs that were purchased surplus “by the pound”. These LEDs work, but you may wish to change the resistor value. This testing allows you to verify the polarity of the transistor and LED before soldering.
5) Remember there are bonus points available if you show your soldering work to one of the second floor staff. If they like it, they can sign your SCH file, then you get bonus points.
6) The starter files for Lab 9 are in the Lab9.zip file that I will be posting soon. This will include the debugger (E0Load version 1.1) and the Freeware ICC11 compiler. The subfolders contain samples grouped by memory map
    E0Load  6812 Metrowerks project containing the debugger
    TExaS11  assembly language loaded into internal EEPROM $B600
    ICC11  C language loaded into internal EEPROM $B600
    ICC11EEPROM  C language loaded into external EEPROM $E000
7) The program Memtest.rtf (not RAMTEST as the lab states) will be used in the procedure parts 2,3 to experimentally observe the read and write timing.
8) Please have your approved Lab 7 proposal available when you are demonstrating Lab 9 to your TA.


Email 20
I expect you to read the following sections of the second edition. The material in Chapter 6 on input capture and in Chapter 8 on the keyboard scanning will not be covered in Quiz2, but will apply to Lab 8 and the final exam. The reading assignments in the Lab manual refer to sections in the first edition. Although the lab manual is generally correct, this list will be more accurate.
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)

Email 19
0) Please download, print and bring to class the following items
                Lecture 16
http://www.ece.utexas.edu/~valvano/EE345L/Lectures/LLec16.pdf 
                Starter file
http://www.ece.utexas.edu/~valvano/EE345L/DataSheets/Lab7e.sch
1) There will be a 5 point extra credit for Lab 6. To get the credit (no partial extra credit) you must create a continuous sine-wave tone and measure the voltage across the speaker using both the spectrum analyzer (amplitude versus frequency) and the oscilloscope (amplitude versus time). You must include a printout of both measurement and include a half page discussion/analysis of what the data means.
2) I was asked to clarify “Using Ohm's law and the properties of the audio amplifier, make a table of the speaker voltage and current as a function of digital value.” First of all, the speaker is 32 ohms, and Ohm’s law is V=I*R. I suggest you collect 10 to 20 points including minimum and maximum, and about 10 consecutive values (e.g., n=11,12,13,14,15,16,17,18,19)
  a) Output n to the DAC using software
  b) Measure voltage across speaker with a voltmeter
  c) Calculate I=V/32
Put these data into a table. To analyze these data read the DAC section in Chapter 11 of the book. In particular you are experimentally calculating range, resolution, and precision. Is the DAC/amp monotonic? Is it linear? If you build a 5-bit DAC using resistors, it make only be monotonic as a 4-bit DAC. Similarly, the 8-bit Max549 may actually be monotonic to only 7 bits.

3) Some of the Lab 7/9 parts will be distributed in recitation March 31. Come see me if you want the parts before then. In particular, each group of two will get (to keep):
1- 78M05 0.5 amp +5V regulator (78m05.pdf)  $0.17         
1-  JACK DC Power MALE 2.1mm (2.1mmJack.pdf) $0.39        
3-  resistor 1/8W 5% 220 OHM $0.0069 
6-  resistor 1/8W 5% 10K OHM $0.0069 
1-  resistor 1/8W 5% 10MEG $0.0069   
2-  CAP CERM DISC 22pF 50V 20%  $0.05 
1-  52 pin PLCC socket (Plcc.pdf) $0.99
1-  28 pin machine-pin IC socket $0.64
1-  8 MHz crystal
2-  0.47 uF Tantalum 35V 10% caps (0.1in footprint) (tantalumCap.pdf) $0.23
4-  0.1uF ceramic capacitors, bypass cap for each chip, (0.1in footprint)  $0.05
2-  PN2222 NPN transistor (Pn2222a.pdf, Pn2222-d.pdf) $0.04
3-  B3F tactile push button switch (B3f-1059.pdf) $0.17
3-  2.2V 10mA LED (Led.pdf) $0.05
You can have additional switches, PN2222A, 10k, 220 ohm, connectors, and LEDs after the boards come in, and you are ready to solder. The statically sensitive parts 74HC138, 74HC573, MC34164, MC68HC11E1CFN2, and 8k EEPROM will also be given later.
1- MC68HC11E1CFN3  (M68hc11e.pdf, 6811techref.pdf) $6.55
1- 28C64BL-12 120ns 8K by 8 EEPROM (28C64B.pdf) $2.00    
1- MC34164-005 reset circuit (Mc34164.pdf, MC34164b.pdf) $0.54
1- 74HC573 (74hc573.pdf)  $0.22
1- 74HC138 (74hc138.pdf)  $0.18

4) Quiz 2 will be Monday April 10 in GAR1 (same room as Quiz 1) during normal class hours 1:00-1:50pm. Different from Quiz 1, you may use the textbook, and you may write as many comments as you wish in the margins of the book. Otherwise no additional paper, calculator, or notes will be allowed. It will focus on topics since Quiz 1, such as Labs 4, 5, 6, and 7. A detailed study guide will follow.
5) I graded Pop Quiz 3 solely on attendance. However, here are the solutions. In both cases, the data available interval must overlap the data required interval. This means available interval starts before the required interval starts, and the available interval ends after the required interval ends. E.g.,
                If RDA is (a,b) and RDR is (e,f), then a<=e and f<=b
                If WDA is (c,d) and WDR is (g,h), then c<=g and h<=d
6) There are minor differences between the 6811 timings in the book (which accurately describe a 68HC11A8) and the Freescale 68HC11E datasheet. For the quiz, we will be using only the 68HC11A8 timing as description (like book and lecture), rather than the Freescale 68HC11E datasheet
7) Lab 7 preparation is performed in groups of two (a PCH of the entire circuit and a PCB layout of just the memory interface. Since the EEPROM programmer can set 32 bytes at a time, you are free to map any 6811 A5-A12 into any EEPROM A5 to A12, but you must map A4-A0 exactly. It is not required as part of the preparation to Lab 7 to add PCB layouts for the power LED, I/O devices, external signal connectors (6 pin or 26 pin), switches, or LEDs. These will be added when you have a group of 6 as part of the Lab 7 report.
8) There are free MC68HC11E data sheets in ENS252C. There are also free 6811 programming reference books on the shelves across from the second floor checkout.
9) The PN2222 and MC34164 look exactly the same (size shape color). You have a PN2222 in your parts kit. You can use Semiconductor TO-18 on ExpressPCB for both. What ExpressPCB calls a TO-92 will be too big.
10) There is a way to link the PCB to PCH files. I suggest you do NOT use this feature.
11) There are three starter files for Lab 7. They are called Lab7e.sch, Lab7e.pcb and extraComponents.sch. The starter files and data sheets for Lab7 can be found at
http://www.ece.utexas.edu/~valvano/EE345L/DataSheets/
The LRC computers have an old version of ExpressPCB. There is one Lab7 starter file labeled “Lab7eOld.pcb” made in the old format, from last year. Download and use this one if you plan to perform all your Lab7 work on the LRC computers. Otherwise, you will need to do Lab 7 off campus using the newer version of ExpressPCB.
12) There are a couple of complete 6811 board designs for you to look at
http://www.ece.utexas.edu/~valvano/EE345L/DataSheets/c75dxsch.pdf
See page 207 of the following
http://www.ece.utexas.edu/~valvano/EE345L/DataSheets/M68HC11E.pdf
See pages 53 and 58 of the Handyboard reference
http://handyboard.com/techdocs/hbmanual.pdf  
See
http://www.pmb.co.nz/cpu3a1/cpu_3a2_sch_v2.pdf  
13) These are the steps to follow to finish Lab 7. The Lab 7 preparation is steps 1-5, performed in groups of 2. The Lab 7 report includes steps 6 and 7, performed in groups of 6. Lab 9 will be performed entirely in groups of 2.
Step 1) Your 8k EEPROM is at  $E000 to $FFFF. You need to design a minimal cost address decoder. Express your SELECT signal as a Boolean function of the high address pins A15, A14 and A13.
Step 2) Study the digital logic function of the 74HC138.
Step 3) Choose one of the following three options
a) Synchronize /CE by connecting E to pin 6 E3 of the 74HC138, connecting A15,A14,A13 to 74HC138 pins 3,2,1 A2,A1,A0. Connect one of the 74HC138 outputs to /CE.
c) Synchronize both /OE and /WE by connecting E to pin 6 E3 of the 74HC138, connecting R/W to 74HC138 pin 1 A0. Connect two of the 74HC138 outputs to /OE and /WE.
Step 4) Decide what you want your Lab 9 system to do
Step 5) Using ExpressPCB, layout all the wires connected to the 74HC138, 74HC573, and 8k EEPROM. As part of the preparation, you will connect some (E, R/W, AS, A15-8, AD7-AD0) but not all of the 6811 pins. Print the top-side and bottom-side separately.
Step 6) After the TA assigns you into groups of 6, you will combine the designs and produce one complete circuit diagram, and one complete PCB layout.
Step 7) Using foam board, Styrofoam, or cardboard, you will create a 3-D mock-up of the system.
14) HW8 is due April 7.


Email 17 and 18 were example SPI code

Email 16
1) The textbook is available in the bookstore! Thanks for your patience.
2) The next pop quiz will be tomorrow in class. Read book (or BookPreview3) chapter 9 about “Read data available” and “Read data required”.
3) There is HW due this Friday
4) Look ahead to Lab 7/9. Download and install ExpressPCB from www.ExpressPCB.com. Every group of 2 does the preparation for Lab 7, but teams of 6 students (3 groups) will produce a common PCB layout. So, it is ok to create these teams of 6 in advance.

Email 15
Here is an ExpressSCH component for the Max549  posted at
http://www.ece.utexas.edu/~valvano/EE345L/DataSheets/Max549.sch

Email 14
1) Here is some reading material for Spring break
http://www.ece.utexas.edu/~valvano/EE345L/Lectures/BookPreview3.pdf
2) If you are using the Max549A for Lab 6, look at the DAC8043 example from Chapter 7. In particular, set SS to manual mode
void DAC_Init(void){ // PM3=CS=1  simple out
  DDRM |= 0x38;  // PM5=SCLK=SPI clock out 
  PTM |= 0x08;   // PM4=Din=SPI master out
  SPICR1 = 0x50; // SSOE=MODFEN=0
  SPICR2 = 0x00; // normal mode 
  SPIBR = 0x01;} // 6MHz

Email 13
1) HW has been posted. It is due Friday
2) The SCI baud rate is a function of the PLL. Activating the PLL will require changing SCI_Init, because the MClk is the same as the Eclk.
3) You should study both versions of Question 11 for the final exam.
4) Lab 4 demo, lab 4 report, and lab 5 preparation are all due this week. Lab 5 demo is due immediately after spring break.  Lab 5 is easy, so I suggest you finish it before Spring break.
5) You will want to have a copy of the grading codes (A-R) when reviewing your Quiz 1. See

http://www.ece.utexas.edu/~valvano/EE345LFinal/Quiz1Sp06Asol.pdf
http://www.ece.utexas.edu/~valvano/EE345LFinal/Quiz1Sp06Bsol.pdf
http://www.ece.utexas.edu/~valvano/EE345LFinal/Quiz1Sp06Csol.pdf


Email 12
1) The Quiz 1 study guide had a typo. I fixed the posted version and I fixed quiz 1 itself. The RTI interrupt period is 64us*(m+1)*2**n  (not 128us)
2) I posted some preview material from the second edition. The material on switches, the RTI interrupts, and the glossary will help for studying for quiz1. The material on output compare and ADC will help for Labs 4,5.
http://www.ece.utexas.edu/~valvano/EE345L/Lectures/BookPreview.pdf
3) Many people are confused by the way CRGFLG TFLG1 and TFLG2 operate, because they think of these registers as regular read/write memory. They are not. They exist as a memory-mapped I/O registers containing flags with the following behaviors
  --the software can read the contents in the usual manner
  --the hardware sets the flag at the appropriate time
  -- a write access with a data bit high, will clear the flag
  -- a read access will not change the flag
  -- a write access with data bit low will not change the flag.
These software operations will clear all the flags in TFLG1
  TFLG1 = 0xFF;
  TFLG1 |= 0x04;
  bset TFLG1,#$04
If you think you understand how it works, consider the effect of
  TFLG1 &= ~0x04;
  bclr TFLG1,#$04
It will actually clear all the flags except C2F.


Email 11 (sent as #10), 2/23/06
1) I posted a Quiz1 study guide
http://www.ece.utexas.edu/~valvano/EE345LFinal/Quiz1study2006.pdf
along with the old exams, which can be found at
http://www.ece.utexas.edu/~valvano/EE345LFinal/
2) The last one page of this study guide contains the exact reference material I will provide during Quiz1. You don't need to print it or memorize this material.
3) TA Robin is taking his PhD qualifying exam Friday 10-12. Friday 2/24 I will be covering recitation 1-2, and I'll be in the office 2-3.
4) There is HW due this Friday 11pm. Remember, unless otherwise instructed, give numerical answers to 1%.
5) Quiz1 and Quiz2 will be in GAR1. Quiz1 will be closed book/notes. You can only use pencil, pen, and eraser. I will go over the study guide in recitation.
6) Critical sections occur with nonatomic (can be interrupted) multi-step access to global variables.
Case 1. Read, modify, write. E.g.,
  Data = Data+10; // Data is a global variable
Case 2. Write some, write the rest. E.g.,
  Hour++; Minute=0; // Hour Minute are global variables
Case 3. Write, read. E.g., (Save is a global variable)
  Save=x; // remember value of x
          // stuff
  x=Save; // restore x to previous value       
The bug occurs when the main program begins execution of a critical section, an interrupt occurs, and the ISR accesses the global variable.

Email 10, 2/22/06
As you probably noticed, the OSCCLK period for the RTI interrupts is 125ns and not 250 ns. The comments for the RTI interrupt ritual should be (please change 250ns to 125ns in Lecture 5 and RTI project). This OSCCLK of 125 ns is unaffected by the PLL. (The book Chapter 4 when you get it will be correct.)

void RTIinit(void){
  asm sei        // Make ritual atomic
  DDRT |= 0x03;  // PortT bit 1,0 to LEDs
  PTT = 0x00;
  CRGINT = 0x80; // RTIE=1 enable rti
  RTICTL = 0x33; // period=
125ns*4096*4=2.048ms
  Count = 0;     // interrupt counter
/*  base clock is OSCCLK=
125nsec
RTR[6:4] Real Time Interrupt Prescale Rate
  000 off
  001 divide by 1024
  010 divide by 2048
  011 divide by 4096
  100 divide by 8192
  101 divide by 16384
  110 divide by 32768
  111 divide by 65536
RTR[3:0] Real Time Interrupt Modulus Counter
 0000 divide by 1
 0001 divide by 2
 0010 divide by 3
 0011 divide by 4
 0100 divide by 5
 0101 divide by 6
 0110 divide by 7
 0111 divide by 8
*/ 
  Ack = 1;       // means foreground is ready
  asm cli
}

Email 9, 2/20/06
1) Please review the solutions to the two pop quizzes. This material will be on the quiz. Old exams can be found at
http://www.ece.utexas.edu/~valvano/EE345LFinal/
2) You will need to refer to the 9S12C32 ADC port datasheet at
http://www.ece.utexas.edu/~valvano/EE319K/MC9S12C128_V1.pdf
3) You are free to interface the switches any way you want. In my opinion, the best way to interface switches uses a simple 10k pullup resistor, as shown in lecture 5 (The simple 10k pulldown resistor is ok too). If you read the switches within a periodic RTI interrupt service routine (running at a period of 10 to 250ms), then values you read will be unaffected by switch bounce.
4) If you are still having trouble with the busy bit. See the 4-bit timing diagrams, figure 9, in the file  hd44780.pdf  at
http://www.ece.utexas.edu/~valvano/EE345L/DataSheets/
5) This week, I will be in the office 11-12am Wednesday, and 2-3 Friday. I will conduct recitation is this Friday.
6) Quiz1 and Quiz2 will be in GAR1. Quiz1 will be closed book/notes. You can only use pencil, pen, and eraser. A more detailed study guide will be provided, but if you want to get started, look at Quiz1 2004 (9S12C32).

Email 8, 2/14/06
Suggestions for Lab 3 (not requirements, just suggestions)
1) Add a 100ms delay at the beginning of LCD_Open before sending initialization code to the LCD. This allows the LCD to perform correctly after power up.
2) Before adding busy-wait to the LCD routines, connect the LCD and run the starter file. This way you know your board, your wiring, and your LCD are operational.
3) When adding busy-wait to the LCD routines, first add it just to the LCD_OutChar. This way you're sure the LCD is properly initialized.
4) When adding busy-wait to the control output, make two outCsr functions. Keep the original blind-cycle synchronized version, and add a second busy-wait synchronized version. Use the original blind-cycle synchronized version in LCD_Open, but substitute the new busy-wait synchronized version for control functions occurring after initialization.
5) It will be faster to move the cursor, rather than erasing the screen.
6) There are tiny push buttons in checkout (figure in lab assignment), like the two on your board if you want more inputs. If you read/process the switches inside the RTI interrupt handler running at a period longer than 10ms (with no backward jumps), the effect of switch bounce will be
eliminated.
 7) Read Section 1.7.6.2, on page 17 of
http://www.ece.utexas.edu/~valvano/EE345L/DataSheets/OptrexLCD.pdf  
Our 16 character LCD module is actually interfaced as 2-line 8 char/line display. Notice the 9th character is at address $40.

Email 7, 2/10/06
1) Question:
How can we access the relevant chapters of the book to complete the homework assignment?
Answer: I understand the problem, I can't post chapters without violating copyright. The second edition of the book is so much better than the first, which is my rational for asking you to wait. If you are going to spend $120 on a book, let's buy the better one. Here is my plan for future HW... I will double check each assignment and attempt to cover the issues in class. Your job is to review the questions due Friday before coming to class on Monday and Wednesday, this way you can recognize the answers as I give them. If there are any HW questions, please ask in class, email me, or bring them to recitation.
2) Lab 2 says “E. Thread Profile using hardware.  You will connect the four output pins to the logic analyzer to visualize in real time the function that is currently running.” Since we haven’t shown you yet how to use the logic analyzers in Lab, you are allowed to collect this information using the dual channel scope by looking at two channels at a time (e.g., channels 0&1, then channels 0&2, then channels 0&3). The TAs will demonstrate the logic analyzers to you next lab session, Monday or Tuesday.


Email 6 2/8/06
1) I will be covering the recitation Friday (2/10/06), 1-2pm in the regular classroom. You are welcome to bring Homework or Lab questions.
2) Pop quiz solutions
Question 1) Voltage_Threshold          
D) public scope, permanent allocation (RAM). This is a public variable accessible by all software in the system, and defined in the file Voltage.h.
Question 2) VoltageThreshold
C) private scope, permanent allocation (RAM). This is a private variable accessible only in the module of this file, and defined in a code file (something.c).
Question 3) voltageThreshold
A) private scope, temporary allocation (stack). As you know, this variable might exist only in a register, but it is still temporary allocation, and accessible within the function.
Question 4. An unsigned fixed point system has values ranging from 0.0 to 100.0 with a resolution of 0.1. With which of the following data types should the software variables be allocated?
   B) unsigned short. The integer part of the number has values from 0 to 1000.
3) HW3 is due this Friday (on line)
4) The two missing figures from today’s lecture are at
http://www.ece.utexas.edu/~valvano/EE345L/DataSheets/Lab/LLec07add.pdf
 

Email 5 2/2/06
1) I will be in my office 9:30-12 tomorrow (2/3/06), if you have any questions.
2) The TA Robin Tsang will cover the recitation tomorrow (2/3/06), 1-2pm in the regular classroom
3) HW2 is due this Friday (on line)
4) The the demonstration for Lab 1, the report for Lab 1 and the preparation for Lab 2 are due next week in lab
5) There are two errors in the printed assignment for Lab 1. Please change CorrectAnswer and Result from unsigned short to
short
6)
A cool option for Lab 6 will be to use a real DAC chip (rather than building one from resistors). If you want you can request free sample parts now from Maxim
http://www.maxim-ic.com/
1) search MAX549ACPA (any 5V serial interface DAC will be ok)
2) request samples
3) register as a new user (they are OK with sending free parts to students)
4) make sure to request DIP package

Email 4 1/24/06
1) Those who have not previously received a 9S12C32 kit from the ECE department can see Daryl Goodnight, 2nd floor lab (look in room across from checkout) at these times
    Wednesday January 25, 10:00am  to 12:00 noon, 1:00pm to 3:30pm
    Thursday January 26, 10:00am to 12:00noon 1:00pm to 3:30pm
     Friday January 27, 1:00pm to 3:30pm
2) If your kit is lost or broken, additional kits can be ordered at Technological Arts, http://www.technologicalarts.com ,  order part number NC12C32SP. The cost is $49.95 plus shipping
3) HW1 is due this Friday (on line)
4) The preparation for Lab 1 is due next week in lab

Email 3 1/19/06
1) HKN lab manual is $18. You need this manual or you'll need to download files from datasheets/lab directory.
2) Recitation Friday 1-2 in the regular classroom is optional. But I will be covering how to program the 9S12C32, how to test the board, how to install the debugger. It is a good time to ask a lot of questions.
3).TA assignments
15480 TTH 9:30 AM - 11:00 AM John
15485 TTH 11:00 AM - 12:30 PM Nachiket
15490 MW 3:30 PM - 5:00 PM Anil
15495 TTH 3:30 PM - 5:00 PM John
15500 MW 5:00 PM - 6:30 PM Anil
15505 TTH 5:00 PM - 6:30 PM Robin
15510 MW 6:30 PM - 8:00 PM James
15515 TTH 6:30 PM - 8:00 PM Robin
15525 TTH 8:00 PM - 9:30 PM James

Email 2 1/17/2006
(I) Useful web links:
The EE345L course descriptor
http://www.ece.utexas.edu/~valvano/EE345LSp06.html
The EE345L example programs
http://www.ece.utexas.edu/~valvano/metrowerks/
The entire EE345L Lab manual (many files)
http://www.ece.utexas.edu/~valvano/EE345L/DataSheets/Lab/
The lectures (LLec01.pdf is this Wednesday’s lecture slides)
http://www.ece.utexas.edu/~valvano/EE345L/Lectures/
Data sheets for many of the devices we will be using
http://www.ece.utexas.edu/~valvano/EE345L/DataSheets/
Grading sheet for your submission, staple this to front of lab software
http://www.ece.utexas.edu/~valvano/EE345L/Lectures/style_policy.pdf
http://www.ece.utexas.edu/~valvano/EE345L/Lectures/style_policy.doc
Logic analyzer instructions
http://www.ece.utexas.edu/~valvano/metrowerks/logic.pdf
General information about the 9S12C32 kit
http://www.ece.utexas.edu/~valvano/EE345L/Lectures/board_information.pdf


(II) There are no labs during the week of Jan 17, but we will be having optional recitations each Friday 1-1:50 in CPE2.214 starting Jan 20.

(III) Installing Metrowerks
1) Start at
http://www.metrowerks.com
2) Click on Embedded
http://www.metrowerks.com/MW/Develop/Embedded/default.htm
3) Click on HC(S)12
http://www.metrowerks.com/MW/Develop/Embedded/HC12/Default.htm
4) Click on Download the product and install the free of charge Special Edition license key also available from this web site
http://www.metrowerks.com/MW/Develop/Embedded/HC12/Downloads
5) Click on Download CodeWarrior Development Studio for HC(S)12 Microcontrollers
6) Fill in name country email, click submit
7) Check your email, download installer and license, You will get an email like the following
Thank you for requesting to download an evaluation edition of CodeWarrior Development Studio for HC12 Microcontrollers.
To download your software, please use the following link:
ftp://ftp.metrowerks.com/pub/embedded/HC12/CW12_V3_1.exe - 163.2 MB
To use your software you must have a license key, please use the following link to download one:
ftp://ftp.metrowerks.com/pub/embedded/HC12/CW12R31_SE32Klicense.ZIP
Most of our products will automatically generate an evaluation license during installation. Should you have any questions regarding licensing you may view http://www.metrowerks.com/MW/Develop/Licensing.htm You may obtain a permanent license by purchasing by contacting Metrowerks Sales at http://www.metrowerks.com/mw/about/contact.htm

Email 1) 1/9/06 (edited)
(I) The EE345L course descriptor has been posted (I will not be making Xerox copies of the descriptor to pass out, so this is the official course descriptor)
http://www.ece.utexas.edu/~valvano/EE345LSp06.html
My book is expensive, but can be used for both EE345L and EE345M. It will be ready in March.
(II) The 9S12C32 Technological Arts kit will be required. Do one of these three options:
        1) If you got a 9S12C32 kit in EE319K last semester (and it still works), then you will use it this semester.
        2) If you got a kit in EE319K last semester (but it is lost or broken), then you must buy a new one to use this semester. Go to the http://www.technologicalarts.com    web site and click the University of Texas at Austin link (order NC12C32SP). The cost is $49.95 plus shipping.
        3) If you did not get a 9S12C32 kit yet (because you took EE319K prior to last semester), then one will be given to you after classes start.
The TAs will give demonstrations during the second week of classes.
(III) You will also need ExpressPCB (for designing PCB boards) and ExpressSCH (for drawing circuit diagrams) this semester. They are free to install at http://www.expresspcb.com
(IV) There are no labs during the week of Jan 17, but we will be having optional recitations in CPE2.214 each Friday 1-1:50 starting Jan 20.

 

If you have comments or suggestions, email me at valvano@mail.utexas.edu

 

 

 

Spring 2005 EE345L Announcements

Email 19 5/2/05
1) If anyone has any extra MC34164 chips left, please return them to your TA. We have two or three groups needing them, and we have run out.
2) ICC11 does not support const (putting structures in ROM)
3) There is a new TExaS/6811 assembly example moore.zip, in the lecture notes page. It is an interrupt driven moore FSM.
4) A review for the final will be given in class Wed
5) If your 6811 doesn't work, I suggest you verify pin 1 of the 6811 (it is possible to solder the PLCC socket 90, 180, 270 degrees off), then check MODA MODB VDD VSS RESET using a voltmeter. With a scope right on the 6811 chip itself, look for 2MHz E clock. There should be a 10us pulse on RESET when you type r into hyperterminal. After the r, there should be SCI transmissions both directions on PD1 and PD0. Please share any debugging experiences/corrections with the other members of your design team

Email 18 4/23/05
1)
I have posted two more 6811 examples. The first example assembles under TExaS and includes input capture 3 and output compare 5 interrupts. The end of this example includes a table showing you where all the interrupt vectors are located. This example can be downloaded as file tut5.zip at
http://www.ece.utexas.edu/~valvano/EE345L/Lectures/
The second example compiles under the Freeware ICC11 (EEPROM version) and includes output compare 5 interrupts. This example has modified the crt.s file placing the stack at $01FF. This example can be downloaded as file ICC11tut5.zip at
http://www.ece.utexas.edu/~valvano/EE345L/Lectures/ 
2) HW10, the last one, is due April 29.


Email 17 4/15/05
1) Quiz2 median = 89. Quiz 2 Question 1 was confusing, so I dropped it. This is what I had in mind
Steps occurring once in the software ritual
  The RDRF interrupts are armed by setting the RIE bit in the SCICR2 register
  The I bit is cleared to zero (enable)
Steps occurring in hardware for each character (this part was what I was asking in Quiz2)
  Incoming data is moved from the shift register to the data register, setting RDRF
  The CC, A, B, X, Y, PC registers are pushed on the stack
  The I bit is set to one (disable)
  The PC is loaded with the 16-bit contents of $FFD6
Steps occurring in the software ISR for each character
  The SCISR1 is read with RDRF set, followed the reading of SCIDRL, clearing RDRF
  The PC, Y, X, B, A, CC registers are pulled from the stack
2) Common errors in the last question.
  Forgetting to enable interrupts in the ritual
  Trying to run the OC interrupts too fast (e.g., interrupt every 1 usec)
    (This was a result of trying to make it run like last year's Quiz 2)
  Any backward jump costs you 15 points! See the solution. In general you want the time to execute the ISR to be short as compared to the time in between interrupt request. Waiting 20ms inside once instance of a  ISR is usually very bad
3) Lab 9 Prep1 due week of April 18 is
1: Recheck the PCB layout on the actual board looking for dropout (missing traces) and inadvertent shorts.
Follow the +5V and ground signals around the board verifying with an ohmmeter than there are no shorts to inappropriate places.
2: Verify that Read Data Available overlaps Read Data Required and that Write Data Available overlaps Write Data Required. Draw the combined READ timing diagram and draw the combined WRITE timing diagram, as described in Chapter 9 of the book. (Theory)
4: Next, write a very simple program that interacts with the switch input and LED output on your system.
5: Please outline a rubric for how you wish to be graded on lab 9 based on what you will accomplish (i.e.) what your system will do. You can choose any lab to do on the board you want, but just keep in mind the memory and number of pin restrictions while you propose to do certain lab. For example: design a FSM-based traffic light controller with 3 inputs and 7 outputs. For example: design a stepper motor controller with 3 inputs and 4 outputs that allows the operator to control the speed and direction of the motor.  For example: design a game of pong that has 2 inputs and 8 outputs, where the game speed increases and the system keeps score.
4) Lab 9 Prep2 due week of April 25 is
1: Assemble the components required to complete the interface, and solder them to the PC board.
2: Before plugging the microcomputer and memory chips into their sockets, check the power supply circuit. Look on the oscilloscope to verify the absence of noise in the power signal. Using a DVM make sure the voltage level is within tolerance of the microcomputer and memory.
5: Write the main application that implements the final objective of the embedded system.

Email 16 4/5/05
1)
The Lab 9 PCB parts will be distributed in recitation April 8. Come see me if you want the parts before then.
2) I will not be on campus Monday April 11, the day of the quiz. Please look over the material for the quiz and ask me questions this Wednesday or Friday. I will be answering email over the weekend.
3)
Quiz 2 will be Monday April 11 in JES A121A (same room as Quiz 1) during normal class hours 1:00-1:50pm. Similar to Quiz 1, it will be closed book and I will supply some data sheets with the quiz. See
http://www.ece.utexas.edu/~valvano/EE345LFinal/Quiz2Sp05A.pdf
It will focus on topics since Quiz 1, such as Labs 3, 4, 5, and 6. See
http://www.ece.utexas.edu/~valvano/EE345LFinal/Quiz2study.pdf
The input capture registers TCTL3 TCTL4 and the timer overflow bits are included in the reference material for Quiz 2, but will not be covered in Quiz 2. I put them there for completeness.
4) HW9 is due April 8.


Email 15 3/31/05
1) There will be a 5 point extra credit for Lab 6.
To get the credit (no partial extra credit) you must create a continuous tone and measure the voltage across the speaker using both the spectrum analyzer (amplitude versus frequency) and the oscilloscope (amplitude versus time). You must include a printout of both measurement and include a half page discussion/analysis of what the data means.
2) There are many ways to interface the keyboard. E.g., input capture/output compare like lecture, or simple periodic polling. You may choose any method as long as it
a) Scans the keyboard in a background ISR
b) Uses a FIFO linkage data structure between the foreground (
Key_InChar) and the ISR
c) Has no gadfly or time-Wait loops in the ISR  
3) The Lab 9 PCB parts will be distributed in recitation April 8. Come see me if you want the parts before then.
4) Remember to cut the 28pin connector before soldering, so it creates a 0.3in separation required to go into the protoboard.
5) Quiz 2 will be Monday April 11 in JES A121A (same room as Quiz 1) during normal class hours 1:00-1:50pm. Similar to Quiz 1, it will be closed book and I will supply some data sheets with the quiz. It will focus on topics since Quiz 1, such as Labs 3, 4, 5, and 6. http://www.ece.utexas.edu/~valvano/EE345LFinal/Quiz2study.pdf
6) HW8 is due April 1, and HW9 is due April 8.

Email 14  3/18/05
1) The state legislature commonly closes all state agencies (including UT) the afternoon of Good Friday.
  In anticipation of this event, there will be no recitation on Friday. In you have any questions, look for me in my office Monday 10:30-12:45 and 2:15-3, or Wednesday 9:30-10, 2:15-3.
2) It is my observation that the sensor in Lab 3 yields very noisy results.  This is actually wonderful, because you get to try methods to measure and reduce the noise. First, you should characterize the type of noise using the oscilloscope. See if the noise contains specific frequencies like 60Hz or if the noise is random. There is a “line-trigger” mode on the scope. If the noise synchronizes (the image looks cleaner) with line trigger, then the noise is 60 Hz electromagnetic pickup. Second, you should measure the magnitude of the noise using a DVM in AC mode. The DVM in AC mode is the most accurate way to quantify noise. To reduce the noise you can make an analog filter by adding a capacitor (to ground) in parallel with the analog signal. You can also add a 10k resistor between the sensor output and the ADC input. E.g.,
Pin 1 of the pot to +5V
Pin 2 of the pot to +side of a 0.1uF cap and one side of a 10k resistor
Pin 3 of the pot to ground and to the –side of the cap
The other side of the 10k resistor to the ADC input
Use the above noise measurement techniques to verify your analog low-pass filter is reducing the noise.
The noise can also be reduced using a digital filter. A simple low pass digital filter can be created by measuring the signal at a regular rate (using the interrupts) and averaging a large number of samples (e.g., 1000 samples measured at 1000 Hz). Figure 15.17 in the book shows you the gain versus frequency of this type of averaging digital low-pass filter. The frequency axis will go from 0 to 0.5*sampling frequency. Figure 15.17 is drawn for a sampling frequency of 100 Hz, and k=32 means a 32-point average.  
3) The Lab 9 PCB boards are back, so see your TA
4) Pop quiz 3 will be this Wednesday in class. Print out the attachment, fill it out, do not put your name on it, and bring it to class. Scores will be based solely on attendance.

Email 13
Email 12 2/28/05
0) Quiz 1 will be in JES A121A.
1) A good memory interface quiz study question is in the book, chapter 9, question 9.2.
2) Three is no HW the week of 2/28
3) There is a typo on Lecture 4 page 8. 4.8 many of the = signs should be <= (the book is correct)
4) There is a  confusion on Lecture 4 page 5 and in fig 9.34  in the book. t26 is the time from the beginning of the cycle to the rise of AS.
5) There are minor differences between the fig 9.34 in the book (which accurately describe a 68HC11A8) and the Freescale 68HC11E datasheet. For the quiz, we will be using only the 68HC11A8 timing as description (like book and lecture), rather than the Freescale 68HC11E datasheet

Email 11 2/23/05
1) Quiz 1 is Wednesday March 1, in JES A121A (normal time 1:00-1:50pm)
The quiz is closed book without calculator. You may use only pen/pencil/eraser. There will be a huge pile of backpacks on the stage, so try not to bring much that is fragile or valuable. There are lots of 6811 memory interface questions at the end of Chapter 9 in the book. The exact format of the reference material that I will give you on the quiz can be found on the quiz1 study guide at
http://www.ece.utexas.edu/~valvano/EE345LFinal/Quiz1study.pdf

2) Anil’s email has changed to
kottam@mail.utexas.edu

3) Quiz 2, on Monday April 11, will also be in JES A121A


4) Equipment and parts checked out from 2nd floor lab must be returned. Some items are short term and others are long term. Many LCD’s ended up broken and more have been ordered. For now, some of you will need to check out the LCD on short term basis.

5) Parts for 6811 system that you get from your TA do not have to be returned.

6) If you take EE345M, you will not be getting another free 9S12C32 board. We want you to keep the board you have and use it again in EE345M.


Email 10 2/19/05
1) Quiz 1 study guide http://www.ece.utexas.edu/~valvano/EE345LFinal/Quiz1study.pdf
Since the quiz is closed book without calculator,
you will need to know some basic constants:

2**0=1=0x01

2**6=64=0x40

2**12=4096=0x1000

2**1=2=0x02

2**7=128=0x80

2**13=8192=0x2000

2**2=4=0x04

2**8=256=0x0100

2**14=16384=0x4000

2**3=8=0x08

2**9=512=0x0200

2**15=32768=0x8000

2**4=16=0x10

2**10=1024=0x0400

 

2**5=32=0x20

2**11=2048=0x0800

2**16=65536

Range of integers for 8-bit signed (-128 to +127), 8-bit unsigned (0 to 255)
Range of integers for 16-bit signed (-32768 to +32767), 16-bit unsigned (0 to 65535)

Fixed-point numbers (decimal/binary, signed/unsigned, 8/16 bit)
1) Convert value to integer. E.g., What integer is stored in the computer, when the value 2.1 is stored in 16-bit unsigned binary fixed-point, with a resolution of 2**-10? Answer: I = 2.1*1024, which is about 2150. I will make the math so easy a calculator will not be needed.
2) Convert integer to value. E.g., What is the value of an 8-bit signed decimal fixed-point number (resolution is 0.1) if the integer stored in memory is –123? Answer: –123*0.1 equals –12.3.
3) Basic concepts of range, resolution and rounding.
4) Given the range and resolution, choose the format

Programming Techniques
1) How to check for overflow when performing integer calculations in C. Answer: promote to higher precision and check intermediate results.
2) Stack picture of parameters, and locals
3) Memory allocation: global, local, constants, and reset/interrupt vectors
4) Modularity linking call graph to
#include ′file.h′, private versus public
5)