January 29, 2012
For information on using the board to develop C programs,
For the 9S12C32, 9S12DG128, and 9S12DP512 example programs http://users.ece.utexas.edu/~valvano/Starterfiles/
To download data sheets for the 9S12C32 system
To download data sheets for the 9S12DG128 microcontroller
To download data sheets for the 9S12DP512 microcontroller
The information about the TechArts 9S12DG128 and 9S12DP512
Department policies concerning the 9S12DG128 kit
Starting Fall 2010, we are no longer giving microcontroller boards to students. I can tell you the discussions on how to maintain educational excellence in the face of repeated budget cuts has been long and careful. Every group of two EE319K students will be required to have a 9S12DG128 or 9S12DP512 boards. The first possibility is to buy or borrow a Technological Arts Adapt9S12DP512 or Adapt9S12DG128 board from a previous EE319K/EE345L student. If you obtain a kit from a previous student, you will need the board, power supply, RS232 cable, and a protoboard. The second possibility is to purchase a new Technological Arts Adapt9S12DG128 kit, which includes a board, power supply, serial cable, and solderless breadboard. The student cost will be $79.00 per kit (some credit card companies add $1 to $3 fee for the Canadian transaction). The buying process is:
a) The student goes to the http://www.technologicalarts.ca/uta/ web site and pays $79 to TechArts for the kit via PayPal.
b) The department will get an email from TechArts that you have paid.
c) You will go to ENS220 (checkout window) to pickup the kit. There will be specific scheduled hours for the pickup phase, ask your TA about this schedule.
d) Your TA shows you how to test your board to verify it is operational. If the board does not work during the testing procedure, we will replace it. Our experience with EE319K is if the board works during the initial test, almost all students complete EE319K labs without damaging the board. However, if you do damage your board, then you must purchase another one.
How to test the 9S12DG128 or 9S12DP512 board.
Check out from the second floor, the aluminum 9S12DP512 board tester.
0) download and unzip the Tester_9S12DG128.zip or Tester_9S12DP512.zip programs from this website
1) plug the 9S12DG128/9S12DP512 H1 module into the H1 testing ZIF socket
2) connect RS232 cable to module and a PC COM port
3) place the 9S12DG128/9S12DP512 in LOAD mode
4) apply power to the module
5) hit reset on the module
6) run Metrowerks and download this program (Project->Debug)
7) quit Metrowerks and start a terminal program e.g., HyperTerminal
set COM port to match the cable, and baud rate 115200 bits/sec
8 bit data, no parity, no hardware flow control
8) place the 9S12DG128/9S12DP512 in RUN mode
9) hit reset on the module
10) follow the directions, see results
11) disconnect power, then plug the 9S12DG128/9S12DP512 H2 module into the H2 testing ZIF socket
12) connect RS232 cable to module and a PC COM port
13) apply power to the module
14) hit reset on the module
15) follow the directions, see results
16) remove power before unplugging
Simple way to test the 9S12DP512 board using TExaS or Metrowerks
Download and unzip the LED toggle programs from this website
0A) TExaS assembly language example http://users.ece.utexas.edu/~valvano/Starterfiles/Simple_DP512asm.zip
0B) Metrowerks C language example http://users.ece.utexas.edu/~valvano/Starterfiles/LEDtoggle_DP512.zip
1) Download, print and cut a label for the pins. Place it between the 9S12DP512 and the protoboard. The pins of the 9S12 module straddle the gap running down the center of the protoboard. To push the docking module into the protoboard, push straight down.
2) connect RS232 cable to docking module and a PC COM port
3) place the 9S12DP512 in LOAD mode
4) apply power to the 9S12DP512 module
5) hit reset on the 9S12DP512 module
6A) run TExaS, open SimpleDP512 project, set TExaS to Real 9S12 mode, assemble, and run the program. The LED should flash
6B) run Metrowerks, open LEDtoggle_9S12DP512 project, compile/download (Project->Debug), and run the program. The LED should flash
7) place the 9S12DP512 in RUN mode
8) hit reset on the docking module, the LED should flash
Required equipment (you will need to buy these)
1) You will need a voltmeter (any cheap one will do, spending $10 to $20 is sufficient),
2) A wire stripper for 22 or 24 gauge wire
3) Soldering iron and solder
1) Test the system within 7 days of receiving the kit.
2) Print the corresponding pdf for your board at 100% (no scaling). Make the cutout of a small piece of paper trimming it as close to the writing as possible, and place it between the docking module and the protoboard.
The pins of the docking module straddle the gap running down the center of the protoboard. To push the docking module into the protoboard, push straight down.
3) Label all your pieces (CPU module, docking module, cable, wall wart, and protoboard) with your name.
Precautions to avoid damaging your system (the $79 learning experience)
0) Do not attach or remove wires on the protoboard when power is on. Always shut power off when making hardware changes to the system.
1) Touch a grounded object before handling CMOS electronics. Try not to touch any exposed wires.
2) Do not plug or unplug the docking module into a protoboard while the system is powered.
3) The male pins on the docking module have been very robust as long as you limit the twisting forces. To remove the docking module from the protoboard pull straight up (or at least pull up a little at a time on each end.)
4) Use and store the system with the docking module plugged into a protoboard (this will reduce the chances of contacting the metal pins tied directly to the 9S12 with either your fingers or stray electrical pulses).
5) Do not use the 9S12 with any external power sources, other than the supplied wall-wart, unless you really know what you are doing.
6) Avoid connecting signals to the 9S12 that are not within the 0 to +5V range. In particular, voltages less than 0V or greater than +5V will damage the 9S12.
7) Lastly, do not connect to the Reset pin, unless you really know what you are doing.
Things you can do with the power on
1) Hit the reset button
2) Move the Run/Load switch
3) Touch/release buttons on the board or protoboard
4) Connect/disconnect voltmeter and scope probes to the system
5) Plug and unplug the RS232 cable
Any version of CodeWarrior for the 9S12 will compile programs we need for EE319K/EE445L. Follow these steps to install the Special edition of Metrowerks CodeWarrior Version 5.1 (free 32 KiB-limited version for C code)
2) click "Microcontrollers" under "Products"
2) click "16-bit Microcontrollers"
2) click "CodeWarrior for HCS12(S) Microcontrollers" under "Featured Tools"
3) click "Downloads" tab
4) In the "Special Edition: CodeWarrior for HCS12(X) Microcontrollers (Classic) " row, click "Download"
5) Save the CW_S12_v5.1_Special.exe file (354 MiB). After downloaded, run it. The special edition does not require downloading a separate license.
6) For the 9S12DP512, I suggest you try
For the 9S12DG128, I suggest you try
7) You can find data sheets and starter projects from my web site at
The interrupt vectors of the 9S12 that we will use are
0xFFD4 interrupt 21 SCI1
0xFFD6 interrupt 20 SCI0
0xFFDE interrupt 16 timer overflow
0xFFE0 interrupt 15 timer channel 7
0xFFE2 interrupt 14 timer channel 6
0xFFE4 interrupt 13 timer channel 5
0xFFE6 interrupt 12 timer channel 4
0xFFE8 interrupt 11 timer channel 3
0xFFEA interrupt 10 timer channel 2
0xFFEC interrupt 9 timer channel 1
0xFFEE interrupt 8 timer channel 0
0xFFF0 interrupt 7 real time interrupt
0xFFF6 interrupt 4 SWI software interrupt
0xFFF8 interrupt 3 trap software interrupt
0xFFFE interrupt 0 reset
If you have comments or suggestions, email me at email@example.com