CSE/EE 470/570: Microprocessor-Based System Design -- Winter 2007
Lab 1
Pre-Lab Assignment
- Read the section on Lab Assignments in the course outline that was distributed during the first lecture.
- Order the S12UB board, which comes with Freescale CodeWarrior Development Studio for HC(S)12 Special Edition (Version 4.5).
- Read the following materials to get ready for Lab 1.
(1) S12UB board schematic.
The PDF file is located in the CD comes with the S12UB board, the location is D:\ \ROOT \SUPPORT\REFERENCE\SCHEMATIC (D is the CD driver in my system). This file can be found in the lab room SEB 133 computers also.
(2) S12UB board user manual.
The PDF file is located in the CD comes with the S12UB board, the location is D:\ \ROOT \SUPPORT\REFERENCE\ USER_GUIDE (D is the CD driver in my system). This file can be found in the lab room SEB 133 also.
(3) CodeWarrior Quick Start Manual.
The file name is “HCS12X_quick_start.pdf”. Please find it in the CD that came with the board and also in the lab room 133 SEB.
- Pre-Lab questions:
(1) Draw the block diagram of MC9S12DG128 microcontroller (one page).
(2) How does the 7-segment display connect to MC9S12DG128 on S12UB board? Refer to the schematic and draw the circuit.
(3) Draw a flow chart for your program
Lab Assignment
Purpose
(1) To get familiar with the basic concepts of microcontrollers.
(2) To get familiar with the S12UB board build using MC9S12DG128.
(3) To get familiar with the Freescale CodeWarrior IDE.
Assignment
Use S12UB board. Develop and run both assembly and C code to display different hexadecimal numbers on the 7-segment display. Refer the enclosed “main1.c and main.asm” files also.
Hand in
(1) Get your pre-lab answer signed by the TA before starting the lab.
(2) Get your assembly and C code files signed by the TA after successfully finishing the lab.
CSE/EE 470/570: Microprocessor-Based System Design -- Winter2007
Lab information:
(1) Order the S12UB board: go to www.freescale.com, on the right top corner, in “Part Number” area, search “S12UB”, you can easily find “LFEBS12UB” and “LFEBS12UBLAB”. You can buy directly or from the distributor Arrow Electronics. Ordering information is also on the first day course handout.
(2) Explore the CodeWarrior documentation: after getting Freescale CodeWarrior special edition v4.5, you should be able to find the quick guide, which is “HCS12X_Quick_Start.pdf”, and is located under CodeWarrior installation directory in SEB133.
(3) Explore the S12UB board documentation: the documentation can be found in either your CD comes with your order, or in SEB133. The directory in SEB133 is: C:\Freescale Board\ROOT.
A. General information for HCS12/MC9S12DG128 is located at C:\Freescale Board\ROOT \SUPPORT\REFERENCE\DG128 in SEB133.
B. S12UB Schematic is at C:\Freescale Board\ROOT \SUPPORT\REFERENCE\ SCHEMATIC in SEB133.
C. S12UB user manual is at C:\Freescale Board\ROOT \SUPPORT\REFERENCE\ USER_GUIDE in SEB133.
(4) Load Freescale Serial Monitor GDI into S12UB board: follow lab instructions located in the C:\Freescale Board\ROOT\LABS\CORE\LAB09. (You must finish these steps to be able to use CodeWarrior to do labs)
(5) S12UB layout information: (As shown in the classroom, you MUST connect the DEBUG RS232 (NOT the TARGET RS232) to your PC RS232 port).