lab1
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
lab1 [2010/02/23 22:07] – natalia | lab1 [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 // | ||
- | |||
==== 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' | + | 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' |
=== Dragon12 Evaluation Board === | === Dragon12 Evaluation Board === | ||
Line 64: | Line 61: | ||
* 8 8-bit PWMs or 4 16-bit PWMs | * 8 8-bit PWMs or 4 16-bit PWMs | ||
* 16-channel 10-bit A/D converter | * 16-channel 10-bit A/D converter | ||
+ | * Bus speed up to 25 MHz | ||
+ | * The 112-Pins on-board MCU (MC9S12DP256B) with 89 I/O-Pins is included | ||
+ | * BDM-in connector to be connected with a BDM from multiple vendors for debugging. | ||
+ | * BDM-out connector for making this board as a HCS12 / 9S12 BDM or programmer. | ||
+ | * PC board size 8.4" X 5.3" | ||
+ | |||
+ | ==== Evaluation ==== | ||
+ | Demonstrate your program to your T.A. | ||
+ | |||
+ | ==== Procedure ==== | ||
+ | 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: {{: | ||
+ | * Start a new project and use the following settings: | ||
+ | {{ : | ||
+ | {{ : | ||
+ | * 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: | ||
+ | < | ||
+ | DDRB=0xff; | ||
+ | PORTB=0x5e; // sample value just to turn some of the LEDs on | ||
+ | </ | ||
+ | {{ :code1.jpg }} | ||
+ | * To compile the project use: {{: | ||
+ | * To upload the compiled program to the board use: {{: | ||
+ | * 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: {{ : | ||
+ | |||
+ | * 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 // | ||
+ | http:// |
lab1.1266962865.txt.gz · Last modified: 2010/02/23 22:07 by natalia