User Tools

Site Tools


lab1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
lab1 [2010/02/24 16:32] natalialab1 [2010/02/24 17:14] (current) natalia
Line 1: Line 1:
-==== Lab Objectives ==== 
-The purpose of this lab is to familiarize you with the development process of applications using //CodeWarrior IDE// for the //MC9S12DP256B// microcontroller. 
- 
 ==== Background information ==== ==== Background information ====
 === Embedded Systems === === Embedded Systems ===
Line 34: Line 31:
 provide Emulated EEPROM.  provide Emulated EEPROM. 
  
-Freescale HC1x platform has been around from 1990s which makes it affordable, well tested and stable candidates for embedded projects. Documentations can be downloaded free of charge from Freescale Semiconductor's website. GNU tool chain has been ported and tested on HC1x MCUs [1]. BDM features of HC12 series provide ease of transfer, testing and debugging codes to MCUs. We have decided to use HCS12 hardware as the host system for μC/OS.+Freescale HC1x platform has been around from 1990s which makes it affordable, well tested and stable candidates for embedded projects. Documentations can be downloaded free of charge from Freescale Semiconductor's website. GNU tool chain has been ported and tested on HC1x MCUs((http://gcc-hcs12.com)). BDM features of HC12 series provide ease of transfer, testing and debugging codes to MCUs. We have decided to use HCS12 hardware as the host system for μC/OS.
  
 === Dragon12 Evaluation Board === === Dragon12 Evaluation Board ===
Line 76: Line 73:
 In this lab we are going to make a simple C program to turn on the LEDs on the 7-segment display module of Dragon12 board. The 7-segment display is connected to PORTB of microprocessor. We will use Data Direction Register for Port B (DDRB) to mark all the Port B's pins to output. This can be done by calling DDRB = 0xff In this lab we are going to make a simple C program to turn on the LEDs on the 7-segment display module of Dragon12 board. The 7-segment display is connected to PORTB of microprocessor. We will use Data Direction Register for Port B (DDRB) to mark all the Port B's pins to output. This can be done by calling DDRB = 0xff
  
-  * Launch the Freescale CodeWarrior IDE. The shortcut may look like:  +  * Launch the Freescale CodeWarrior IDE. The shortcut may look like: {{:icon.jpg}}
-  {{ :icon.jpg }}+
   * Start a new project and use the following settings:   * Start a new project and use the following settings:
-   {{ :setting1.jpg }} +{{ :setting1.jpg }} 
-   {{ :setting2.jpg }}+{{ :setting2.jpg }} 
 +  * We will use Data Direction Register for Port B (DDRB) to mark all the Port B's pins to output which can be done by calling DDRB = 0xff. On the main.c file add the following: 
 +<code> 
 +DDRB=0xff; 
 +PORTB=0x5e; // sample value just to turn some of the LEDs on 
 +</code> 
 +{{ :code1.jpg }} 
 +  * To compile the project use: {{:icon2.jpg}} 
 +  * To upload the compiled program to the board use: {{:icon3.jpg}} 
 +    * Make sure the board is powered up and connected to serial port on the PC (COM1). Please use only the top-left serial port as shown in the picture below. {{ :board1.jpg }} 
 +    * If it is the first time you are running the the program you may need to setup the PC's serial port: {{ :setting3.jpg }} 
 + 
 +  * Please demonstrate the program to your TA and make sure to understand how use the simulation and debugging tools as shown in the above picture. 
 + 
 +==== Reference Manuals ==== 
 +Please note all the drivers to run the subsystems of the Dragon12 board will be provided and you don't need to write any driver code. However, in case you want to look at the official manuals of //MC9S12DG256B// they can be found in the course directory or on-line at 
 +http://gcc-hcs12.com/documnets/Freescale/motorolaindex.html
lab1.1267029179.txt.gz · Last modified: 2010/02/24 16:32 by natalia

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki