EE319K Introduction to Embedded Systems   EE319K will continue the bottom-up educational approach, started in EE302 and EE306. The overall educational objective is to allow students to discover how the computer interacts with its environment. It will provide hands-on experiences of how an embedded system could be used to solve EE problems. The focus will be understanding and analysis rather than design. The analog to digital converter (ADC) and digital to analog converter (DAC) are the chosen mechanism to bridge the CE and EE worlds. EE concepts include Ohms Law, LED voltage/current, resistance measurement, and stepper motor control. CE concepts include I/O device drivers, debugging, stacks, FIFO queues, local variables and interrupts.  You may use, edit, run or distribute these files as long as the copyright notices within the files remain. No specific warrantee exists concerning the accuracy or reliability of these examples. I think they work, but history has shown, sometimes I can be wrong.
Send comments to: Jonathan W. Valvano    Go to Lab Material   Spring 2012 homework    Lecture examples  Old Exams   Data sheets  Home Page 
 

Spring 2012 Lectures (we are having trouble with the website, if you cannot see a file because of permissions, try another browser, the lab manual is also on blackboard)

Download Link

Description (**to do** means not done yet, used Fall 2011)

aLec01_dataflow

Introduction to EE319K, data flow graphs, flowcharts, call graphs, interrupts

aLec02_texas

Usage of TExaS simulator, 9S12 assembly, top down design

aLec03_numbers
Lecture3worksheet

How numbers are stored, precision, basis, hexadecimal, binary, TExaS help

aLec04_ArchAddrMem
Lecture4worksheet

9S12 architecture, addressing modes, memory allocation

aLec05_Ports
Lecture5worksheet

I/O ports, stack, subroutines, direction register

aLec06_LogicShift
Lecture6worksheet

AND OR EOR NOT, shift, addition

aLec07_Debugging
Lecture7worksheet

Functional debugging, performance debugging, trace, profile, monitor, dump, stabilization

aLec08_Arithmetic
Lecture8worksheet

Addition, subtraction, overflow, number wheels, conditional branch

aLec09_switch_LED
Lecture9worksheet

Switch interface, LED interface, if-then conditional, 9S12 board

aLec10_subroutinesStack
Lecture10worksheet

Successive refinement, modular programming, parameter passing, stack usage

aLec11_IndexMode
Lecture11worksheet

Arrays, strings, indexed addressing, timer, "how do we prove our software works?"

aLec12_timer_debugging

Lecture12worksheet

Time delay, intrusiveness, monitors, dumps

aLec13_exam1review.pdf

Review

aLec14_FSM_debugging

Software abstraction, finite state machines, Moore/Mealy FSM, debugging

aLec15_FSM
aLec15b_FSM_C

Traffic light controller, Stepper motor interface, arrays in C, pointers in C, struct in C, Moore Finite State Machine written in C using struct

aLec16_localVariables
Lec8.ppt

Fixed point, temporary/permanent allocation, private/public scope
Yerraballi's PPT lecture on local variables, nicely done

aLec17_locals_LCD

Stack frame pointers, I/O synchronization, blind/busy-wait/interrupts, LCD interface

aLec18_LCD_fixedpoint

LCD interface, fixed point numbers

aLec19_timer_threads

Blind/busy-wait/interrupts, threads, interrupt service routines, output compare

aLec20_Metrowerks

C programming, projects, assembly-C linkage, phase lock loop (PLL)

aLec21_DAC

Digital to analog conversion, range/resolution/precision, accuracy, monotonic, audio amp

aLec22_sound

Signal generation, sound, RMS measurement of noise, oscilloscopes, spectrum analyzer

aLec23_ADC

Analog to digital conversion, range/resolution/precision, Nyquist Theorem, real time, time jitter

aLec24_Lab8

Successive approximation, ADC device driver

aLec24_arrays_math to do

**Arrays, tables, 32-bit math, interpolation, conversion from ADC sample to measurand

aLec25_SCI

Serial port, baud rate versus bandwidth, asynchronous transfer, device driver

aLec26_SCIinterrupt

Buffered I/O using interrupts and FIFO queue, performance measures

aLec27_realtime **to do**

FIFO queues, I/O synchronization, distributed systems, latency, real time systems

aLec20_OCinterrupts **to do**

Output compare, running a FSM in the background, logic analyzer debugging

 

 

aLec30_EmbeddedSystems **to do**

Systems approach, design for testing, ECE curriculum

aLec31_pointers **to do**

**Pointers, linked lists, FSM in C, trees, MACQ

aLec32_steppers **to do**

Stepper motor basics

aLec33_Trobot **to do**

How to install and run Trobot

aLec34_GoodDesignPrinciples **to do**

Modular programming, coupling, cohesion, exceptions

aLec35_ProgrammingStyle **to do**

C programming style guidelines

aLec36_SystemsEngineering**to do**

Systems approach, requirements document, interfaces, standard values, batteries

aLec37_finalreview**to do**

Review

 

PowerPoint lectures written by Ramesh Yerraballi

Lec1.ppt

Embedded systems, development cycle; Flow charts, data flow and call graph

Lec2.ppt

TExaS simulator; Numbers, Hexadecimal

Lec3.ppt

Introduction to C; Structure of a C program, Parallel ports, direction registers; Logical and shift operations

Lec4.ppt

Debugging  - Debugging in TExaS, Arithmetic - Arithmetic operations; Condition code bits; C Programming – Functions

Lec5.ppt

Board- Demo of the board (bring board to class);Switch input and LED output, Modular programming - If-then, loops; Subroutines parameters and the stack; Debugging dump; C Programming – Loops

Lec6.ppt

Pointers - Indexed addressing; Arrays; Strings

Lec7.ppt

Timers  – Timers; Advanced functional debugging. C Programming – Arrays, Indexing, Pointers

Lec8.ppt

FSMs  - Finite state machines (FSMs); Fixed-point numbers

Lec9.ppt

C Programming – Scope of variables in C

Lec10.ppt

LCD interface - LCD programming; Number conversions;

Lec11.ppt

DAC conversion  - Digital to analog conversion (DAC) on the 9S12; Sound generation; ADC conversion  - Analog to digital conversion (ADC) Lab 8 design methods

Lec12.ppt

Numerical calculations - Multiplication and division; Table lookup and interpolation; Serial I/O - Serial communications interface (SCI); SCI programming and interrupts; Lab 9 introduction

Lec13.ppt

Thread communication  - Producer-consumer problems; FIFO queue; C Programming – FIFO; TRobots  - Stepper motors; TRobots discussion

 

 

 

Lab/homework materials (**to do** means not done yet)

Link to download

Type

Description

EE319K_LabManualSp12
Lab 1 grading sheet
Lab 2 grading sheet
Lab 3 grading sheet
Lab 4 grading sheet
Lab 5 grading sheet
Lab 6 grading sheet
Lab7 grading sheet
Lab 8 grading sheet

Lab 9 grading sheet

pdf

Spring 2012 Lab manual

PartsKit

text

List of components in the baggy each EE319K student receives

USBeeAX

pdf

USBee AX logic analyzer manual

LabDemo

pdf

Details of the first EE319K board demonstration

Lesson1.wmv
Lesson2.wmv
Lesson3.wmv

Windows media file

Demonstration movies showing how to use the TExaS simulator

Lab8Starter.zip

Metrowerks project
with TExaS simulator files

Use this project to perform Lab 8. It has templates for the PLL, ADC, LCD, OC modules. It also has the Metrowerks and TExaS configurations set.

Lab9starter.zip

TExaS IO and UC files

Use these TExaS files to simulate the receiver and transmitter for Lab 9

TRobots version 1.85

Spring 2012 Lab 10

Tank battle simulation for EE319K programming competition

Exam 2 HW6a String Compare
Exam 2 HW6b Dot Product
Exam 2 HW6c Moore FSM

Exam2 F09Exam2cReverse

Exam2 Sp08Exam2cSum

Exam2 Sp11Exam2eMerge

TExaS simulator files

Homework 6 Spring 2012. These are old Exam 2s.

HW8.zip **to do**old not for 2012

Metrowerks Project

HW8 can be done in either codepad, or Metrowerks. If you use Metrowerks, then this project can be used.

HW10Moore.zip **to do**, old not for 2012

htm file with HW10 description and Metrowerks Project. See your professor for when/how HW10 is due.

There are three options for HW10. 1) Run in Codepad with printf (use the main.c file in sources directory). 2) Compile in Metrowerks and debug in TExaS (use the Metrowerks project and the TExaS files in the bin folder). 3) Compile in Metrowerks and debug on real board (use the Metrowerks project)

 

 

 

 

Lecture examples

Link to download

Type

Description

not.rtf
not.UC
not.IO

TExaS simulator files

A not gate built using the TExaS simulator, class example 1/21/2011

TimerWait.UC
TimerWait.rtf

TExaS simulator files

Time delay function using TCNT

stepper.RTF
stepper.UC
stepper.IO
stepper.SCP

TExaS simulator files

A stepper motor interface using the TExaS simulator, example of a Moore FSM

local.RTF
local.UC
local.STK

TExaS simulator files

A stepper motor interface using the TExaS simulator

classexamplemarch24.rtf
ClassExampleMarch24.UC
OC0Oct22.rtf

OC0Oct22.uc

March30_2011.zip

TExaS simulator files

Output compare interrupt example

 

Exam study materials examples
Quiz1F03.pdf    Quiz1F03sol.pdf
Quiz1F04.pdf    Quiz1F04Sol.pdf
Quiz1F05.pdf    Quiz1F05Sol.pdf
Quiz1F06.pdf   Quiz1F06sol.pdf
Quiz1F07.pdf   Quiz1F07Sol.pdf
Quiz1F08.pdf   Quiz1F08Sol.pdf
Quiz1F08shell.pdf
Quiz1BF08.pdf   Quiz1BF08Sol.pdf
Quiz1BF09.pdf   Quiz1BF09Sol.pdf
Quiz1ASp10.pdf  Quiz1ASp10sol.pdf
Quiz1AF10.pdf  Quiz1AF10sol.pdf Quiz1BF10.pdf  Quiz1BF10sol.pdf
Quiz1ASp11.pdf  Quiz1ASp11sol.pdf Quiz1BSp11.pdf  Quiz1BSp11sol.pdf  Quiz1ASp11FunSize.pdf
Quiz1ASp12.pdf  Quiz1ASp12sol.pdf Quiz1BSp12.pdf  Quiz1BSp121sol.pdf  Quiz1ASp12FunSize.pdf

Quiz1AF12.pdf   Quiz1BF12.pdf    Quiz1AF12sol.pdf   Quiz1BF12sol.pdf
Quiz3F03.pdf  Quiz3F03sol.pdf
Quiz3F04.pdf  Quiz3F04sol.pdf
Quiz3F05.pdf   Quiz3F05sol.pdf
Quiz3F06.pdf   Quiz3F06sol.pdf
Quiz3F07.pdf    Quiz3F07sol.pdf
Quiz3F08.pdf
Quiz3F09Reference.pdf (old)
Exam2A.zip Practice for Exam 2 This is a Mealy FSM (see also HW6 above)
Exam2y.zip  Practice for Exam 2 This calculates average
Exam2Directions.pdf
Exam2study.rtf
Exam2thoughts.doc
Exam2thoughts.pdf
FinalF04.pdf     FinalF04sol.pdf
FinalF05.pdf     FinalF05sol.pdf
FinalF06.pdf     FinalF06sol.pdf
FinalF07a.pdf
FinalF08a.pdf    FinalF08aSol.pdf
FinalF08b.pdf    FinalF08bSol.pdf
FinalF09a.pdf    FinalF09asol.pdf
FinalSp10b.pdf  FinalSp10bsol.pdf
FinalF10a.pdf FinalF10asol.pdf  FinalF10b.pdf  FinalF10bsol.pdf
FinalSp11a.pdf  FinalSp11aSol.pdf    FinalSp11b.pdf   FinalSp11bSol.pdf

Last updated September 23, 2012 Send comments to: Jonathan W. Valvano .