Starter files used in the design of microcontroller-based embedded systems
These starter files are used in the embedded systems labs at the University of Texas at Austin. They are specifically designed for EE319K (assembly language), EE345L (interfacing in C), EE345M (embedded systems, real-time operating systems, and robotics), EE385J.17 (biomedical instrumentation) and EE464 (capstone design lab). These files are are Copyright by Jonathan W. Valvano. 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.
Functional descriptions  Data sheets  Go to Home Page

Link to download

Course(s)

Type

Description of starter file

Applications

ADC_9S12.zip

EE345L

Metrowerks C

9S12C32 ADC input, LCD output

Sample analog input, display output on LCD. This driver can be used for any application needing the ADC on the 9S12C32.

ADC_9S12DP512.zip

 

Metrowerks C

9S12DP512 ADC input, LCD output

Sample analog input, display output on LCD. This driver can be used for any application needing the ADC on the 9S12DP512.

AGM1264_9S12.zip

 

Metrowerks C

9S12C32 LCD graphics interface, including driver, circuit diagram, and design documents.

Plot graphics, text on a 128 by 64 bit LCD. This driver can be used for a real-time DAS based on the $10 LCD1030 available at www.bgmicro.com.

C32AdaptPin.pdf

EE345L/EE345M

PDF

TechArts 9S12C32 board

Place paper between board and protoboard

         

EE319K_DP512.sch

EE319K

ExpressSCH

Circuit drawing file of components used in EE319K

This file can be used when drawing interface circuits for the Adapt 9S12DP512.

Connector.pcb

 

ExpressPCB

PCB layout for connectors

Use this to connect power, stereo jack, 14-pin LCD, 16-pin LCD, 9S12C32, 9S12DP512, DIN5, and various cables to a PCB

DFtest10.zip

EE345M

Metrowerks C

9S12C32 project for testing unsigned 10-bit digital filters. The input is simulated and the output is displayed using SCI.

This project can be used to experimentally determine the gain versus frequency response of an unsigned digital filter based on simulated unsigned 10-bit ADC data.

DFtest10s.zip

EE345M

Metrowerks C

9S12C32 project for testing signed 10-bit digital filters. The input is simulated and the output is displayed using SCI.

 This project can be used to experimentally determine the gain versus frequency response of an unsigned digital filter based on simulated signed 10-bit ADC data.

Dac.xls

EE319K

Excel

4-bit sine wave table

EE319K students can use this Excel sheet to design the 4-bit sine wave table for Lab 8.

DigitalFilterDesign.xls

EE385J.17

Excel

Digital filter design method

Use this file to design and analyze digital filters with up to 8 poles and 8 zeros.

DP512AdaptPin.pdf

EE319K

PDF

TechArts 9S12DP512 board

Place paper between board and protoboard

EE345LextraComponents.sch

EE345L

ExpressSCH

Circuit drawing file of components used in EE345L

This file can be used when drawing interface circuits for the Adapt 9S12C32.

EE385JextraComponents.sch

EE385J.17

ExpressSCH

Circuit drawing file of components used in EE385J.17

This file can be used when drawing interface circuits for the Adapt 9S12C32.

FFT.CPP

EE345M

Visual C++

Code file for a FFT

Derived from Numerical Recipes in C, Cambridge University Press

FFT.H

EE345M

Visual C++

Header file for a FFT

 

FFT16.xls

 

Excel

Simple 16-bit FFT

Use this file to explore the FFT, understand the Nyquist Theorem and see the consequences of aliasing.

FlashSerialMonitor.zip 

 

Metrowerks assembly

Serial monitor for the 9S12C32

Using a BDM, you can reflash the serial monitor debugger on your 9S12C32 

FlashSerialMonitorDP512.s19

 

Machine code

Serial monitor for the 9S12DP512

Using a BDM, you can reflash the serial monitor debugger on your 9S12DP512

Fuzzy_9S12.zip

 EE345M

Metrowerks C

Fuzzy logic motor controller

This example shows how to implement a fuzzy logic motor controller on the 9S12C32. It also shows how to link an assembly program (fuzzy logic engine) to a C project (motor controller). 

GCC11.zip

EE345L

Gnu C

Open source compiler for the 6811 and example files for EE345L Labs 8, 11, and 12

EE345L students can use the Gnu project to compile software for the 6811 embedded system. It also includes a 6811 debugger that runs on a 9S12C32.

HeapSimple_9S12.zip

 

Metrowerks C

Allocate and Release.

This very simple memory manager allows you to allocate and release blocks of a fixed size. It illustrates linked lists

Heap_9S12.zip

EE345L

Metrowerks C

Memory manager: malloc, calloc, realloc, and free.

Jacob Egner wrote this memory manager.  This manager can be used in systems needing a dynamic memory allocation. In EE345L we use it as a case study to describe the proper use of header and code files.

IC_9S12.zip

EE345L

Metrowerks C

Keyboard interface for 9S12C32 using input capture interrupts 

This example illustrates how input capture interrupts can be used to interface a 2 by 2 matrix keyboard. Output compare interrupts are used to debounce the keyboard.

IR_9S12.zip

 

Metrowerks C

IR detector interface for the 9S12C32. Period measurement

A digital waveform from a IR detector is placed on PT2, and input capture interrupts are used to measure a sequence of pulses.

ICC12D.zip

 

ICC12 C

Three examples, LED, DAS, and output compare interrupts

These examples illustrate how C programs can be compiled on ICC12 and simulated within TExaS

LCD_9S12.zip

EE345L

Metrowerks C

LCD interface to the 9S12C32 

This is a 4-bit mode interface using 6 pins on Port M of the 9S12C32 for any HD44780-based LCD display 

LED_9S12.zip

 

Metrowerks C

64 by 8-bit LED interface

A 64 by 2 bit, 3-color LED board illustrates concepts of device driver, scanned display, double buffer, and output compare interrupts.

LPF.xls

EE345L

Excel

Design process for a low pass filter

You can use this spreadsheet to design a Butterworth 2-pole analog filter using one op amp, 3 capacitors of the same value, and 2 resistors of the same value.

Lab1d.UC

EE345L

TExaS

Microcomputer file to link TExaS

Allows you to compile on Metrowerks and simulate on TExaS

Lab1d.c

EE345L

Metrowerks C

Test file for EE345L Lab 1d 

Contains input/output parameters for testing the fixed-point conversion programs in Lab 1d. It is an example of how to test.

Lab2g_F07.zip

EE345L

 

 

 

Lab3f_9S12C32.sch

EE345L

ExpressSCH

 

 

Lab4h_9S12C32.sch

EE345L

ExpressSCH

 

 

Lab5e_9S12C32.sch 

EE345L

ExpressSCH

 SPI connected to a 74HC595

 

Lab5f_9S12C32.sch

EE345L

ExpressSCH

 SPI connected to a Max549

 

Lab6e_9S12C32.sch

EE345L

ExpressSCH

 74HC595 connected to a speaker

 

Lab8fParts.pdf

EE345L

pdf

Parts available for Lab 8

EE345L students use this list as they design Lab 8. It includes part number, price, and source for many components needed for an embedded system.

Lab8fprepv6.pcb

EE345L

ExpressPCB

 PCB layout file

 6811-based design for Labs 8,11,12

Lab8fprepv6.sch

EE345L

ExpressSCH

 Schematic file

 6811-based design for Labs 8,11,12

Lab9d_Keyboad.sch

EE345L

ExpressSCH

 

 Starter file for Lab 9 keyboard interface

Lab9dv2.zip

EE345L

 

 

 Test of reentrant behavior with various FIFO implementations

Lab17_9S12.zip

EE345M

Metrowerks C

 Fully running project

 Real-time OS kernel for 9S12, spin-lock semaphores

Lab18_9S12.zip

EE345M

Metrowerks C

 Prototype for an OS

 Starter file for real-time OS

Lab30_9S12C32.sch

EE345M

ExpressSCH

  Schematic file

 Robot parts

LEDtoggle_9S12DP512.zip

EE345L

Metrowerks C

Simple program that toggles an LED on and off, for the 9S12DP512

This example illustrates Port P direction register, Port P data register and 1/2 sec time delay using TCNT timer

LocalDP512_asm.zip EE319K TExaS Simple program illustrating how to create a local variable on the stack This example uses SP index mode to access the local variables, creates a binding using EQU, and has a STK window to observe the local variables on the stack

Max549.sch

 

ExpressSCH

Dual 8-bit DAC

Use this file when designing an interface with the Max549

Moore_9S12.zip

EE345L

Metrowerks C

Two input, two output FSM

Illustrates how to many a ROM-based FSM controller, showing linked lists and the timer for the 9S12C32.

NotGate_9S12.zip

EE345L

Metrowerks C

 

 

NotGate_DP512asm.zip

EE319K

TExaS assembly

Input from PT7 output to PP7 

This is a very simple 9S12DP512 assembly example with one input and one output. Can be simulated or run on the real 9S12DP512 

OC3_9S12.zip

EE345L

Metrowerks C

Output compare interrupt on the 9S12C32

Simple output compare 3 interrupt, used to run a FSM in the background. Also includes the PLL.

OC_9S12.zip

EE345L

Metrowerks C Output compare interrupt on the 9S12C32

OC3 interrupt software module. The device driver allows the main program to pass a function and set the interrupt period. The main program spins a stepper motor at a constant speed.

OC_9S12DP512.zip

EE345L

Metrowerks C

Output compare periodic interrupt on the 9S12DP512

This example illustrates how to create two periodic interrupts, one at 100 Hz)and one at 1000 Hz.

PWM_9S12.zip

EE345M

Metrowerks C

Pulse width modulation on the 9S12C32

Port T on the 9S12C32 can be used to generate waves with a fixed period, but with a user programmable duty cycle. PWM is an effective means to adjust power to a DC motor.

PulAcc_9S12.zip

 

Metrowerks C

Pulse accumulator on the 9S12C32

This is an example application of the pulse accumulator, which can be used to measure period or frequency on PT7.

RTI_9S12.zip

EE345L

Metrowerks C

Real time interrupt on the 9S12C32

This example illustrates the RTI interrupt on the 9S12C32 

SCIA_9S12.zip

EE345L

Metrowerks C

Interrupt driven SCI driver for the 9S12C32

This example illustrates interrupt-driven serial I/O using SCI, including two FIFOs. The SCI driver includes a debugging instrument to collect histograms of FIFO sizes during execution.

SCIB_9S12.zip

 

Metrowerks C

SCI driver using two Port T pins

Use this driver when a second SCI device is needed on the 9S12C32. It uses one input capture and two output compares to implement a virtual SCI port on PT2 and PT3.

SCI_9S12.zip

EE345L

Metrowerks C Busy-wait SCI driver for the 9S12C32 This example illustrates serial I/O using SCI

SCI0_DP512asm.zip

EE319K

TExaS assembly Busy-wait SCI driver for the 9S12DP512

This example illustrates serial I/O using SCI0

SCI1_DP512asm.zip

EE319K

TExaS assembly Busy-wait SCI driver for the 9S12DP512

This example illustrates serial I/O using SCI1

Scheduler_9S12.zip

EE345M

Metrowerks C

 

 

Simple_DP512asm.zip

EE319K

TExaS assembly

Output to PP7 

This is a simple 9S12DP512 assembly example, showing a LED output and the delay loop. Can be simulated or run on the real 9S12DP512 

SineWave.xls

EE345L

Excel

Shows mixing of two sine waves

Two 5-bit DAC waves are added into one 6-bit output

Slot32.EPS

EE345M

Encapsulated PS

Circular template for a tachometer

To be used with an optical sensor for RPM measurement

Slot32.FH11

EE345M

Freehand

Circular template for a tachometer

To be used with an optical sensor for RPM measurement

Slot32.pdf

EE345M

pdf

Circular template for a tachometer

To be used with an optical sensor for RPM measurement

Square_DP512asm.zip

EE319K

TExaS assembly

Output to PP7 

This is a simple 9S12DP512 assembly example, showing a LED output and the timer. Can be simulated or run on the real 9S12DP512 

TOF_9S12.zip

EE345L

Metrowerks C

Timer overflow periodic interrupt

This example illustrates the TOF interrupt on the 9S12C32 

Test_DP512asm.zip

EE319K

TExaS assembly

Output to PP7 

This is a simple 9S12DP512 assembly example with one output, showing the stack and a subroutine. Can be simulated or run on the real 9S12DP512 

Tester.zip

 

Metrowerks C

9S12C32 board tester

First checkout the orange platform for the tester, download this program to the 9S12C32, quit the debugger, and run Hyperterm

Tester_9S12DP512.zip   Metrowerks C

9S12DP512 board tester

First checkout the silver platform for the tester, place board in H1 socket, apply power, download this program to the 9S12DP512, quit the debugger, and run Hyperterm, disconnect power, move to H2 socket, apply power and run tester again

Therm3.msm

EE345L

Multisim