9S12C32/9S12DP512 board information

August 18, 2007

For information on using the board to develop assembly or C programs, see the end of the supplement
http://users.ece.utexas.edu/~valvano/EE319K/EE319K_Fall2007.pdf

To see/download example programs

http://users.ece.utexas.edu/~valvano/metrowerks/
For 9S12C32 programs http://users.ece.utexas.edu/~valvano/Starterfiles/
For 9S12DP512 programs http://users.ece.utexas.edu/~valvano/Starterfiles/9S12DP512/  

To download data sheets for the 9S12C32 system
http://www.ece.utexas.edu/~valvano/Starterfiles/TechArts.zip

To download data sheets for the 9S12DP512 microcontroller and the TechArts the Adapt board
http://users.ece.utexas.edu/~valvano/Datasheets/MC9S12DP512.zip
http://users.ece.utexas.edu/~valvano/Datasheets/TechArts9S12DP512.pdf

Department policies concerning the 9S12C32/9S12DP512 kit
Each student will be given one kit, which must last for the EE319K, EE345L EE345M sequence. You should test the board within 7 days (see link below or ask your TA how to test it). If it broken at the time of this initial test, show it to your TA who will verify that it is indeed broken, then bring it back to the department for an exchange. If the board stops working after this initial test, you are responsible for purchasing a replacement.


Buying another 9S12C32 board
In the past we have used Metrowerks+TechArts 9S12C32
 Cost is $50 (each student will be given one, which must last for the EE319K, EE345L EE345M sequence)
 Can program/download/debug at home
 includes cable, programmer/debugger, power supply
 MC9S12C32 single chip only (no address/data bus)
 32K ROM (C compiler is free up to 32K, C++ compiler up to 1K)
 2K RAM
 24 I/O pins (but enough for EE345L and EE345M)
 10-bit ADC
The specific part to buy is ORDER CODE:  NC12C32SP-SB $49.95 plus shipping. To order, click on the University of Texas at Austin link at http://www.technologicalarts.com/  


Buying another 9S12DP512 board
We are in the process of switching to the Metrowerks+TechArts 9S12DP512. Starting in Spring 2008 all EE319K students will get the 9S12DP512. About Spring 2009, EE345L will be switched to the 9S12DP512.
 Cost is $99 (each student will be given one, which must last for the EE319K, EE345L EE345M sequence)
 Can program/download/debug at home
 includes cable, programmer/debugger, power supply
 MC9S12DP512 single chip or expanded mode (with address/data bus)
 512K ROM (C compiler is free up to 32K, C++ compiler up to 1K)
 14K RAM
 91 I/O pins
 10-bit ADC
The specific part to buy is ORDER CODE:  UTA-kit2 $99 plus shipping. To order,  http://www.technologicalarts.com/  

How to test the 9S12C32 board.
Check out from the second floor, the orange 9S12C32 board tester.
    0) Download and unzip the Tester.zip programs from this website
       http://users.ece.utexas.edu/~valvano/Starterfiles/
    1) plug the 9S12C32 docking module into testing protoboard/ZIF socket
    2) connect RS232 cable to docking module and a PC COM port
    3) place the 9S12C32 in LOAD mode
    4) apply power to the docking module
    5) hit reset on the docking module
    6) run Metrowerks and download this program (Project->Debug)
    7) quit Metrowerks and start a terminal program e.g., Hypertermial
        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 9S12C32 in RUN mode
    9) hit reset on the docking module

How to test the 9S12DP512 board.
0) Download and unzip the LED toggle programs from this website
http://users.ece.utexas.edu/~valvano/Starterfiles/9S12DP512/LEDtoggle_9S12DP512.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.
http://users.ece.utexas.edu/~valvano/Starterfiles/9S12DP512/adaptPin.pdf
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
6) run Metrowerks and download the LED toggle program (Project->Debug)
7) place the 9S12DP512 in RUN mode
8) hit reset on the docking module, LED should flash


Required equipment (you will need to buy these)
1) You will need a voltmeter (any cheap one will do),
2) A wire stripper for 22 or 24 gauge wire

 General guidelines
1) Test the system within 7 days of receiving the kit.
2) 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.
  http://users.ece.utexas.edu/~valvano/EE319K/adaptPin.pdf
  http://users.ece.utexas.edu/~valvano/Starterfiles/9S12DP512/adaptPin.pdf
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
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) Never remove the 9S12C32 CPU module from the docking module. THE PINS ON THE CPU MODULE ARE VERY FRAGILE. On the other hand, 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. In particular, avoid connecting signals to the 6812 that are not within the 0 to +5V range. In particular, voltages less than 0V or greater than +5V will damage the ADC.
6) Do not connect any wires to the pins labeled Vin, DTR, TX, or RX. These pins contain voltages outside the safe 0 to +5V range. Also do not connect to the Reset pin.
 

Installing Metrowerks
CodeWarrior Version 3.1 will compile programs we need for EE319K/EE345L/EE345M. For version 3.1 you should use their 12K free educational license. There is an installer for Version 3.1 on the CD accompanying the second edition of the EE345L/EE345M textbook. Follow these steps to install the Special edition of Metrowerks CodeWarrior Version 4.5 (32K free educational license for C code)
1) http://www.freescale.com/
2) click "CodeWarrior Development Tools" under Products
3) click "HCS12(X)" under CodeWarrior Products
4) scroll down and click "Special edition" labeled Special Edition Evaluation for CodeWarrior Development Studio for HCS12X Microcontrollers V4.5
5) Register as a new user (if you have registered before, just log in)
   email must be correct
   decide whether or not you want email from Metrowerks
6) Fill in the page with "project details" stating you are a student taking a class, fill in all required fields
7) Download CW12_V4_6.exe (335 MB) and install (the special edition does not require downloading a separate license)
8) Download instructions and starter projects from my web site at
http://users.ece.utexas.edu/~valvano/metrowerks/


The interrupt vectors of the 9S12 that we will use are
0xFFD4    interrupt 21 SCI1 (9S12DP512 only)
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 valvano@mail.utexas.edu