Programming the Tech Arts 6812 boards
Jonathan Valvano, March 18, 2007
You are free to use this material as long as the copyrights and textbook references remain.

Datasheets click to see all the datasheets
    Tech Arts 9S12C32 board (technical information for the TechArts 9S12C32 board)
    MC9S12C data sheet (9S12C32 I/O ports)

    CPU12 programmer manual (6812 assembly op codes)
    CPU12 reference guide (short 6812 assembly programming guide)

 
Metrowerks C Software click to see all the starter files
Simple examples
Not gate (NotGate_9S12.zip), simple input/output 
Moore FSM (Moore_9S12.zip), simple finite state machine, PLL 
Simple SCI (SCI_9S12.zip)  busy-wait synchronization serial I/O
LCD (LCD_9S12.zip), blind cycle 4-bit HD44780 LCD interface, PLL,
Analog to Digital Conversion (ADC_9S12.zip), ADC, TimerWait, LCD, PLL
Pulse Width Modulation (PWM_9S12.zip), uses PLL, PWM
Interrupt examples
Interrupt RTI (RTI_9S12.zip), demonstrates real time interrupts
Simple Output Compare (OC3_9S12.zip), simple FSM using OC interrupts, PLL
Generalized Output Compare (OC_9S12.zip), OC driver, stepper motor output, call back function, PLL 
Simple Capture (IR_9S12.zip), IR remote input, period measurement, input capture interrupt
Interrupting Input Capture (IC_9S12.zip), 2 by 2 matrix scan, two input capture, one output compare, PLL
Interrupting SCI (SCIA_9S12.zip), interrupting I/O, PLL
Interrupt TOF (TOF_9S12.zip), demonstrates periodic timer overflow interrupts
Fuzzy Logic (Fuzzy_9S12.zip), ADC, Fuzzy Logic speed controller, PLL
Pulse Accumulator (PulAcc_9S12.zip), measures pulse width, PLL
Complex examples
DFtest (DFtest10.zip), 9S12C32 10-bit unsigned digital filter tester uses SCI, PLL
DFtest (DFtest10s.zip), 9S12C32 10-bit signed digital filter tester uses SCI, PLL
LCD graphics (AGM1264_9S12.zip), uses 64 by 128 pixel LCD graphics driver
Scanned LED graphics board (LED_9S12.zip), uses PLL, SPI, ASCII fonts, double buffer, OC6 interrupts
Lab17 (Lab17_9S12.zip), 9S12C32 Preemptive Real-time OS with spinlock semaphores uses SCI, PLL

Fixed Scheduler (Scheduler_9S12.zip), 9S12C32 Non-preemptive Real-time OS
Serial Monitor (FlashSerialMonitor.zip), on-chip debugger, needs a BDM to download
 

Board tester for the 9S12C32
Software to test the 9S12C32
Instructions on running the 9S12C32 tester 
 
Assembly Software  click to see all the starter files
http://www.ece.utexas.edu/~valvano/EE319K/CW12asm.pdf
Digital output (Square_asm.zip), Metrowerks, simple squarewave output
Moore FSM (Fsm_asm), Metrowerks, simple finite state machine
Simple SCI (SCI_asm.zip)  Metrowerks, busy-wait synchronization serial I/O
Moore FSM (Moore_asm11.zip)  TExaS, 6811 finite state machine

EE345L 2007 Laboratory Manual (based solely on the 9S12C32) 
EE345L 2006 Laboratory Manual (based solely on the 9S12C32) 
EE345L Spring 2006 and Spring 2007 Lecture Slides

Embedded Microcomputer Systems: Real Time Interfacing, 2nd edition, Jonathan W. Valvano, Thomson Publishers, 2006, ISBN 0-534-36642-2, outline, lab manual, list of errors

Introduction to Embedded Microcomputer Systems: Motorola 6811 and 6812 Simulation, 2002
Jonathan W. Valvano, Thomson Publishers, ISBN 0-534-39177-x, outline

Software for TechArts Adapt812, MC68HC812A4
Simple SCI, busy-wait synchronization I/O, Starter file for Lab2
Debugging example, RTI interrupts, Starter file for Lab3
Interrupt TOF, demonstrates timer overflow interrupts (new 2/8/04)
LCD, demonstrates 8-bit HD44780 LCD interface, Starter file for Lab 4
Interrupt RTI, demonstrates real time interrupts
Moore FSM, simple finite state machine, Starter file for Lab 5
Simple Output Compare, demonstrates OC interrupts, Starter file for Lab 5
Generalized Output Compare, OC driver, call back function, Starter file for Lab 5
ADC, analog to digital converter, LCD, Starter file for Lab 7
Interrupting Input Capture, 2 by 2 matrix scan, Starter file for Lab 8
Interrupting SCI, interrupting I/O, Starter file for Lab10
Fuzzy Logic, ADC, Fuzzy Logic speed controller

Old Labs based on the MC68HC812A4
  How to program the TechArts Adapt812 
  Lab 1c. Memory PCB layout (Adapt812 only)
       Lab1prep.pcb Lab1prep.sch Lab1prep.pcb(old)
  Lab 2e. SCI fixed point, driver
  Lab 3c. Debugging, dump profile
  Lab 4e. Alarm clock (2 weeks)
       Lab4_812A4.sch 
  Lab 5d. Stepper motor finite state machine 
       Lab5_812A4.sch    
  Lab 6e. SPI  DAC tone generator
         Lab6_812A4.sch   
  Lab 7d. Position measurement
  Lab 8d.  Calculator (2 weeks)
  Lab 9a.  Memory diagnosis (Adapt812 only)
  Lab 10c. Serial peer-peer network chat room (2 weeks)  group of 6

Go to Home Page


Send comments to: Jonathan W. Valvano .