EE319K Introduction to Embedded Systems   EE319K will continue the bottom-up educational approach, started in BME303 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 warranty exists concerning the accuracy or reliability of these examples. I think they work, but history has shown, sometimes I can be wrong. 

Syllabus for EE319K Introduction to Microcontrollers

EE319K E-Book : Has reading material, interactive tools and instructor videos   UT.6.01x Embedded Systems - Shape The World 

Send comments to: Jonathan W. Valvano    Go to Lab Material      Lecture examples  Old Exams   Data sheets  Home Page  Pictures of TAs
Embedded Systems: Introduction to ARM Cortex-M Microcontrollers (Volume 1),   ISBN: 978-1477508992  Available from Amazon   Available from CreateSpace
To download all LM3S1968 software (For use with LM3S1968)
To download all TM4C123 software EE319K_ware.exe (EE319K Fall  2014, includes DLLs which will automatically install). This installer includes starter files for Labs 1-4. The starter files for Labs 5-10 will be delivered as part of the SVN repository.

Keil Debugger Issue: Keil real-board debugger used to work, now it quits immediately Window8KeilDebuggerFix.htm

Lectures (we are having trouble with the website, if you cannot see a file because of permissions, try clearing cookies), Fall 2014 lectures will be posted as we create them.
PowerPoint lectures written by Professors Ramesh Yerraballi, Andreas Gerstlauer, Bill Bard, Nina Telang, Vijay Janapa Reddi, and Jonathan Valvano



Introduction, microcontroller, binary, digital logic, Ohm's Law

TM4C123, Flowcharts, Design Cycle

TM4C123, embedded systems, Thumb-2



Data flow graphs, call graphs, numbers

Debugging, design of a microcontroller-based NOT gate

Fixed-point, condition codes, errors, dropout, overflow, truncation, roundoff






Assembly syntax

Functions, logic operations

Parallel I/O

Switches and LED interfaces




I/O Abstraction, software design, branches

Carry and overflow bits




Functions, ARM Architecture Procedure Call Standard (AAPCS), parameter passing, call by value, call by reference, arrays, indexing, functional debugging

Code for parameter passing examples from the slides, book and more

Parameter passing example (in C) 

Functional debugging code from slides



SysTick, and review for Exam1



PLL, Array access, Abstraction, finite state machines, linked structures, introduction to I/O synchronization


I/O synchronization, Thread synchronization, fundamentals of interrupts, Periodic interrupts with SysTick, DAC, sound generation. Modular programming in C


Local variables, LCD interface, blind cycle, fixed-point


ADC fundamentals, Nyquist Theorem

ADC Programming



Fixed-point, Data acquisition system, Lab 8


FIFO Queues



2-D array, structures, Timer2A periodic interrupt, Kentec display, sounds


Project illustrating the use of struct


Floating Point (floating point will not be on the final exam)
Security (security will not be on the final exam)





Starter files 

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

Link to download







Fall 2014 Lab manual

Spring 2014 Lab manual 

Fall 2013 Lab manual

Lab 1 grading sheet     old
Lab 2 grading sheet      old
Lab 3 grading sheet     old
Lab 4 grading sheet     old
Lab 5 grading sheet      old
Lab 6 grading sheet       old
Lab 7 grading sheet     old
Lab 8 grading sheet    old

Lab 9 grading sheet   old
Lab 10 grading sheet   old(certification)


Grading sheets









If you are using PD0 or PD1 remove R9 and R10 from board



List of components in the baggy each EE319K student receives


LaunchPadDLL.dll (new 9/2/2014)

pdf of instructions
Random Num
Switch in, LED output
 DLL to simulate Port F
Toggles two Port F pins

Details of the first and second EE319K lab demonstrations


Lab 1 grader

Use this DLL to simulate Lab 1.  Put the DLL in your Keil\ARM\BIN folder.


Lab 2 grader 

Use this DLL to simulate Lab 2. It configures the logic analyzer within the simulator. Put the DLL in your Keil\ARM\BIN folder.

Lab 3 grader  Use this DLL to simulate Lab 3. It configures the logic analyzer within the simulator. Put the DLL in your Keil\ARM\BIN folder.

Lab 4 grader  Use this DLL to simulate Lab 4. It configures the grader within the simulator. You must export the symbols DataBuffer, TimeBuffer, DataPt, and TimePt for the grader to work. Put the DLL in your Keil\ARM\BIN folder.
edXLab10.dll Lab 5 grader (similar to edX lab 10) Use this DLL to simulate Lab 5.The EE319K lab grades are determined by the TA during checkout and not really a function of the score provided by the autograder. Put the DLL in your Keil\ARM\BIN folder.
edXLab13.dll (not ready yet)
Lab 6 grader (similar to edX lab 13) Use this DLL to simulate Lab 6.The EE319K lab grades are determined by the TA during checkout and not really a function of the score provided by the autograder. Put the DLL in your Keil\ARM\BIN folder.
Lab 7 will not have a grader
Use this project to perform Lab 7. Low level graphics interface. The Nokia project is for Lab 7B
Lab 8 will not have a grader
Slide pot data sheet
  Uses the ADC to measure distance. You may use either display. Copy your LCD.s and print.s files from Lab 7 into this project.
Lab 9 starter will be your Lab 8
Lab 9 will not have a grader
  Connected to microcontrollers such that data collected on one system are displayed on the other
Lab 10 will not have a grader
YouTube video of superfinals (for the Nokia 5110)
Keil uVision project, BMP, JPG, WAV, XLSX, TXT, C Use this project to perform Lab 10. Hand-held, arcade-style game. Runs on LM4F120/TM4C123 with Kentec display. Sights and sounds to build the game. There are three potential games to choose from: Connect Four, Space Invaders, and Pipe Dream
Porting_Project.pdf pdf Directions on how to port one uVision project into another


PCB Artist Drawing file

This starter file has the LM3S1968  or the TM4C123/LM4F120 and all the external parts that we will be using in EE319K. You can get this free program at but be careful because downloading attempts to add junk (say no to all special offers like buzzdock, aspca, etc.)

Lab 10 video from Fall 2012

Lab10: WavConv.m (Matlab/Octave script to convert wav files into C declaration with 4-bit sound

YouTube video;

Matlab/Ocatve script

To learn more about Game Engine design look at Chapter 15 of the E-book


LM4F120/TM4C123 Reference material 
Keil uVision instructions for download and setup version 4.74 (do not install version 5)

How to install EE319K/EE445L/EE345M software on a Macintosh
CortexM_InstructionSet.pdf              Assembly instruction set

CortexM4_TRM_r0p1.pdf                 Technical Reference Manual Cortex M4,  Assembly instruction set
QuickReferenceCard.pdf                    ARM® and Thumb-2 Instruction Set Quick Reference Card

CreatingProject.pdf                              uVision4 instructions

tm4c123gh6pm.pdf                            Data sheet of microcontroller

tm4c123gh6pmErrata.pdf                Known bugs of microcontroller

TM4C123_LaunchPadUsersManual.pdf  Board information

lm4f120.s           lm4f120h5qr.h            Assembly/C files will all the port addresses for the microcontroller.

tm4c123gh6pm.s   tm4c123gh6pm.h    Assembly/C files will all the port addresses for the microcontroller.


LM3S1968 Reference material 
LM3S1968.pdf                                    Data sheet

LM3S1968errata.pdf                           Known bugs

LM3S1968kit.pdf                                Evaluation kit, circuit diagram
lm3s1968.s                                       This assembly file contain all the port addresses for the microcontroller.

SystemDesignGuidelines.pdf                 How to design embedded systems

LM3S1968pins.pdf                              Piece of paper between board and protoboard (print at 100%)

LM3S1968soldering.pdf                       How to solder pins on the kit

RiT_OLED_P1420_revision2.pdf         OLED data sheet

Ifyoumessuptheboard.pdf                      How to reflash chip


Homework assignments (one page printouts turned in to TA at the start of class)
HW0.doc   HW0.pdf    Definitions and numbers, Due 9/2

HW1.doc   HW1.pdf   Circuits, Simple Assembly, Due  Monday 9/15 (Note the date has changed)

HW2.doc   HW2.pdf   Assembly programming, Switch/LED interface, Due  Monday 9/22

HW3.doc   HW3.pdf   Introduction to C, logical operations, due in the first class during the week of 2/17

HW4.doc   HW4.pdf   Old Exam 1 practice, Zyante Chapter 3,4, due on 2/20 at exam1 time.

HW5.doc   HW5.pdf Zyante Chapters 4 and 5,  due in the first class during the week of 3/3

HW6.doc   HW6.pdf Zyante Chapters 5 and 6, Arrays, indexing, functional debugging, due Wednesday/Thursday  3/19-20

HW7.doc   HW7.pdf   Two easy practice Exam2s, due in the  class Wednesday/Thursday  3/26-27

HW8.doc   HW8.pdf   Two harder practice Exam2s: Mode and BCD, due  Thursday 4/3 at the time of the exam

HW9.doc   HW9.pdf    Zyante functions and pointers, due Monday/Tuesday 4/14-15

HW10.doc HW10.pdf  Zyante structs and E-Book Game Desgin  due Wednesday/Thursday 4/23-24

HW-Extra.doc   HW-Extra.pdf    This is an optional homework that can be used to replace any missed homeworj and is due Monday/Tuesday 4/21-22


Old Exams  (old 9S12 exams)
Quiz1ASp11FunSize.pdf  old Valvano exam converted to TM4C123
Quiz1ASp12FunSize.pdf  old Valvano exam converted to TM4C123
Quiz1AF12.pdf   Quiz1AF12sol.pdf This is Valvano exam

Exam1Practice1.pdf  Exam1Practice1Sol.pdf This is Yerraballi exam to be presented Monday 9/30/2013 7:30pm by Saugata and Chinmaya

Exam1Practice2.pdf  (I don't have solution to this one) This is Yerraballi exam to be presented Tuesday 9/30/2013 7:00pm 

Exam1Practice3.pdf  Exam1Practice3Sol.pdf This is a Gerstlauer exam  

Exam1F13asol.pdf  Exam1F13bsol.pdf    Solutions to Fall 2013 exams   Easy practice Exam2 involving strings and addition (HW7)   Easy practice Exam2 involving arrays and multiplication (HW7) Hard practice Exam 2 involving strings and pointers (HW8) (60 min) Hard practice Exam 2 involving Port initialization and a Moore FSM (HW8) (60 min) Easy practice Exam 2 involving ASCII strings  Hard practice Exam 2 involving ASCII strings  Easy practice Exam 2 involving 32-bit numbers and overflow (35min)

Exam2thoughts.pdf Study guide for Exam 2  Practice Exam shown in class Monday and Tuesday

FinalSp12_1968.pdf  Final exam from Spring 2012 converted to LM3S1968

FinalF12a.pdf   FinalF12aSol.pdf Final exam Fall 2012

FinalSp13a.pdf   FinalSp13aSol.pdf   FinalS13.pdf  S13Final.pdf   Final exam Spring 2013

FinalF13.pdf   FinalF13Sol.pdf   Final exam Fall 2013

ReferenceMaterialForFinalF13.pdf Reference material for Fall 2013 final , Wed, Dec 11, 7-10pm, location: JGB 2.324

Major changes for Fall 2014 EE319K
  Lab 5 will be written in C

  Exam 2 will be in C
  The LCD will be Nokia5110

  The autograding engine can be run, but the scores are not used for your grade

Major changes for spring 2014 EE319K
Code repository, such as SVN, starting with Lab 4

  Implement both receiver and transmitter in Lab 9

  More labs will have an autograding engine, put custom DLLs in the Keil\ARM\BIN folder


Last updated September 3, 2014 Send comments to: Jonathan W. Valvano .