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), EE445L
(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 |
EE445L |
Metrowerks C |
9S12C32 and 9S12DP512 projects with 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. or 9S12DP512. Analog to digital conversion, data acquisition system, LCD output. |
|
|
Metrowerks C |
9S12C32 and 9S12DP512 projects with LCD graphics interface, including driver, circuit diagram, and design documents. |
Plot graphics, text on a 128 by 64 bit LCD. This AGM1264 driver can be used for a real-time DAS based on the $10 LCD1030 available at www.bgmicro.com. |
|
EE445L/EE345M |
TechArts 9S12C32 board |
Place paper between board and protoboard. Make sure you print file this with no scaling. |
||
EE319K |
PCB Artist |
Circuit drawing file of components used in EE319K |
This file can be used when drawing interface circuits for the Adapt 9S12DP512 or 9S12DG128. |
|
EE345M, EE385J.17 |
Metrowerks C |
9S12C32 and 9S12DP512 projects 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 (0 to 1023). |
|
EE345M, EE385J.17 |
Metrowerks C |
9S12C32 and 9S12DP512 projects 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 (-512 to +511). |
|
EE319K |
Excel |
4-bit sine wave table, 4-bit exponential pacemaker wave |
EE319K students can use this Excel sheet to design the 4-bit sine wave table for Lab 9. |
|
EE445L |
Excel |
sound wave tables for a digital to analog converter |
EE445L students can use these Excel sheets to design the 12-bit sound for Lab 5. Adjust the red parameter, then copy paste table. The tables have DAC values used to create sound. |
|
EE385J.17 |
Excel |
Digital filter design method. Infinite impulse response filter (IIR) |
Use this file to design and analyze IIR digital filters with up to 8 poles and 8 zeros. |
|
EE319K, EE445L |
TechArts 9S12DP512 board |
Place paper between board and protoboard. Make sure you print file this with no scaling. H1 version is 18 copies for TAs to cutout. |
||
|
ExpressSCH |
Circuit drawing file of components used for 9S12 systems |
This file can be used when drawing interface circuits for the Adapt 9S12C32. No longer used in EE445L |
|
|
ExpressSCH |
Circuit drawing file of components used in EE385J.17 |
This file can be used when drawing interface circuits for the Adapt 9S12C32. No longer used in EE385J |
|
|
Visual C++ |
Code file for a FFT |
Derived from Numerical Recipes in C, Cambridge University Press |
|
|
Visual C++ |
Header file for a FFT |
|
|
|
Excel |
Simple 16-bit FFT |
Use this file to explore the FFT, understand the Nyquist Theorem and see the consequences of aliasing. |
|
EE445L |
Metrowerks assembly |
Serial monitor for the 9S12C32 or the 9S12C128 |
Using a BDM, you can reflash the serial monitor debugger on your 9S12C32 or the 9S12C128 |
|
|
Machine code |
Serial monitor for the 9S12DP512 |
Using a BDM, you can reflash the serial monitor debugger on your 9S12DP512 |
|
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). |
|
|
Gnu C |
Open source compiler for the 6811 and example files |
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. |
|
|
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. Malloc and free |
|
EE445L |
Metrowerks C |
Memory manager: malloc, calloc, realloc, and free. |
Jacob Egner wrote this memory manager using the binary buddy system. This manager can be used in systems needing a dynamic memory allocation. In EE445L we use it as a case study to describe the proper use of header and code files. |
|
EE445L |
Metrowerks C |
Keyboard interface for 9S12C32 and 9S12DP512 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. |
|
|
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. |
|
|
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 |
|
EE445L |
Metrowerks C |
LCD interface to the 9S12C32 and 9S12DP512 |
This is a 4-bit mode interface using 7 pins on the 9S12 to send data to a HD44780-based LCD display |
|
|
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. |
|
EE445L, EE345M, EE385J.17 |
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. |
|
EE445L |
TExaS |
Microcomputer file to link TExaS |
Allows you to compile on Metrowerks and simulate on TExaS |
|
EE445L |
Metrowerks C |
Test file for EE445L Lab 1e |
Contains input/output parameters for testing the fixed-point conversion programs in Lab 1e. It is an example of how to test. |
|
EE445L |
Metrowerks C |
Two projects for Lab 2g |
Examples of how to create debugging instruments, new Fall 2010 |
|
EE445L |
PCBArtist |
LM3S1968 with switch, speaker |
Simple drawing file for creating circuit for Lab3 |
|
Lab6h_artistStarter.sch |
EE445L |
PCBArtist |
Lab 6 starter files, one with serial interface for serial monitor |
Freescale 9S12C32 circuit and PCB |
EE445L |
PCBArtist |
Stepper Motor and LM3S1968 |
Unipolar stepper motor with 7-pin connector , stepper motor, 2N2222 and L293 |
|
EE445L |
Excel |
Parts available for Lab 8 |
EE445L students use this list as they design Lab 8. It includes part number, price, and source for many components needed for an embedded system. |
|
|
|
Test of reentrant behavior with various FIFO implementations |
||
|
Metrowerks C |
Fully running project |
Real-time OS kernel for 9S12, spin-lock semaphores |
|
|
Metrowerks C |
Prototype for an OS |
Starter file for real-time OS |
|
EE319K, EE445L |
Metrowerks C |
Simple program that toggles an LED on and off, for the 9S12DP512 and the 9S12DG128 |
This example illustrates Port P direction register, Port P data register and 1/2 sec time delay using TCNT timer. Timer_Wait function |
|
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 |
EE319K |
Metrowerks C |
Two input, two output FSM |
Illustrates how to many a ROM-based FSM controller, showing linked lists and the timer |
|
Nanocore_C32_Artist.sch | EE445L | PCBArtist | Template for using the Nanocore | Tech Arts 32-pin nanocore has a 9S12C32, RS232 and regulator |
EE445L |
Metrowerks C |
|
|
|
EE319K |
TExaS assembly |
Input from PT7 output to PP7 |
This is a very simple 9S12D assembly examples with one input and one output. Can be simulated or run on the real 9S12DP512 or 9S12DG128 |
|
|
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. |
|
|
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. |
|
EE319K |
Metrowerks C |
Output compare periodic interrupt on the 9S12DP512, DG128 |
This example illustrates how to create two periodic interrupts, one at 100 Hz and one at 1000 Hz. |
|
PCBArtistLibrary.zip | EE445L/EE345M | PCBArtist | Library files for EE445L and EE345M 9/11/11 | Place the six library files into the PCB library directory, or add folder in the Library Manager |
|
Metrowerks C |
Pulse width modulation on the 9S12C32 and 9S12DP512 |
Port T on the 9S12C32 and Port P on the 9S12DP512 can be used to generate waves with a fixed period, but with a user programmable duty cycle. PWM is an effective way to adjust power to a DC motor. |
|
|
Metrowerks C |
Pulse accumulator on the 9S12C32 and 9S12DP512 |
This is an example application of the pulse accumulator, which can be used to measure period or frequency on PT7. |
|
|
Metrowerks C |
Real time interrupt on the 9S12C32 and 9S12DP512 |
This example illustrates the RTI interrupt on the 9S12 |
|
EE445L |
Metrowerks C |
Interrupt driven SCI driver for the 9S12C32 and 9S12DP512 |
This example illustrates interrupt-driven serial I/O using the serial port SCI, including two FIFOs. The SCI driver includes a debugging instrument to collect histograms of FIFO sizes during execution. |
|
|
Metrowerks C |
SCI driver using two Port T pins |
Use this driver when a second SCI device is needed on the 9S12C32 and 9S12DP512. It uses one input capture and two output compares to implement a virtual serial port SCI port on PT2 and PT3. |
|
EE445L |
Metrowerks C | Busy-wait SCI drivers for the 9S12C32 and 9S12DP512 | These examples illustrate serial I/O using serial port SCI | |
EE319K |
TExaS assembly | Busy-wait SCI drivers for the 9S12DP512 |
These examples illustrate serial I/O using serial port SCI0 and SCI1 |
|
EE345M |
Metrowerks C |
A real-time thread scheduler for fixed-time periodic threads |
This is a real-time thread scheduler. One task is low priority but the remaining three tasks are high priority threads. The high priority threads are run at fixed (but unequal) rates |
|
SDC_DP512.zip | Metrowerks C | Low level driver code for a secure digital card (SDC). Includes initialization, read block and write block commands. Includes a full FAT16 and FAT32 file system driver for the 9S12. | The SDC can run in simple SPI mode. This driver implements initialization, block write and block read functions on the card. It runs on the 9S12DP512, but porting to other 9S12 boards should be easy. It requires one SPI port and one output compare interrupt. If you are building the circuit shown in Figure 10.22, replace 10k pullup resistors with 470 ohms. FAT FAT16 FAT32 software driver | |
EE319K |
TExaS assembly |
Output to PP7 |
This is a simple 9S12D assembly examples, showing a LED output and the delay loop. Can be simulated or run on the real 9S12DP512 or 9S12DG128 |
|
EE445L |
Excel |
Shows mixing of two sine waves |
Two 5-bit DAC waves are added into one 6-bit output |
|
EE345M |
Encapsulated PS |
Circular template for a tachometer |
To be used with an optical sensor for RPM measurement |
|
EE345M |
Freehand |
Circular template for a tachometer |
To be used with an optical sensor for RPM measurement |
|
EE345M |
Circular template for a tachometer |
To be used with an optical sensor for RPM measurement |
||
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 or 9S12DG128 |
|
EE445L |
Metrowerks C |
Timer overflow periodic interrupt for the 9S12C32 and 9S12DP512 |
This example illustrates the TOF interrupt |
|
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 |
|
|
Metrowerks C |
9S12C32 board tester |
First checkout the orange platform for the tester, download this program to the 9S12C32, quit the debugger, and run HyperTerminal |
|
Tester_DP512.zip Tester_DG128.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 HyperTerminal, disconnect power, move to H2 socket, apply power and run tester again |
|
EE445L |
Multisim |
Bridge circuit for thermistor interface |
This simulation file can be used to design a thermistor bridge and amplifier using just one op amp. |
|
EE445L |
Excel |
Design process for a 10-bit, 12-bit or 16-bit temperature DAS, with instrumentation amp reference at 0V and at 2.5V |
Enter calibration data for the thermistor, choose resistor values for bridge, select gain for instrumentation amp, then copy paste calibration tables into C program. Used for EE445L Lab 6. |
|
TRobots1_85.zip | EE319K | Metrowerks C | 9S12DP512 engine for TRobots | This starter file can be used with TRobots version 1.85, Spring 2011. TRobots is a simulated tank battle that is used as a programming competition. Each contestant writes assembly or C code that runs on a 9S12 to control a tank. 2 to 50 tanks operate in a simulated battle. |
EE319K |
TExaS assembly |
Output to PP7 |
This is a 9S12DP512 assembly example, showing LED toggling with the delay function implemented with TCNT. Can be simulated or run on the real 9S12DP512 |
|
|
ExpressSCH |
Circuit drawing for the USB interface |
Use this drawing template in the UM245 USB module |
Last updated September 15, 2011 Send comments to: Jonathan W. Valvano .