lab4 - Getting Started with the DRFG4618 Hardware Platform...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Getting Started with the DRFG4618 Hardware Platform by Alex Milenkovich, [email protected] Objectives: This tutorial will help you get started with the MSP30 IAR Assembly program development on the hardware platform DRFG4618. You will learn the following topics: ¡ Assembly programming ¡ Creating an application project using assembly programs ¡ Debugging using the IAR C-SPY® Debugger (Simulator) ¡ Program downloading on a real platform (Softbaugh DRFG 4618). Note: It is required that students have completed the tutorial Getting Starting With MSP430 IAR Embedded Workbench before starting with this one. 1. Blink a LED Project: Problem Statement This section defines the problem that will be solved by the “Blink a LED” application. Your task is to write an assembly program that will repeatedly blink the LED1 on the Softbaugh’s DRFG4618 board every second, i.e., the LED1 will be on and off for about 0.5 seconds each. Step 1: Analyze the assignment. In order to better understand the assignment we will first study schematics of the Softbaugh’s DRFG4618 board. This board includes a TI’s MSP430 microcontroller (MSP430FG4618), wireless transceiver CC2420, serial RS232 port, 4 leds (LED1-LED4), 4 switches (SW1-SW4), a potentiometer, and several extension slots that allow an easy access to all microcontroller ports. Detailed schematic of the board is provided in the following document: http://www.ece.uah.edu/~milenka/cpe323-08F/docs/DRFG4618_Schematic.pdf. Open the DRFG4618_Schematic.pdf file and go to page 6. Please locate LED1 output port. What microcontroller port pins are connected to LED1? Go to page 5 of the schematic and see how the LED1 port is actually connected to a physical led (a diode through a resistor). Step 2. Develop a plan. From configuration it is clear that if we want LED1 on, we should provide a logical ‘1’ at the output port of the microcontroller (port P1.0), and a logical ‘0,’ if we want LED1 to be off. We could take several approaches to solving this problem. The simplest one is to toggle the port P1.0 and have 0.5 seconds delay in software. After initializing the microcontroller, our program will spend all its time in an infinite loop (LED1 should be repeatedly blinked). Inside a loop we will toggle the port P1.0 and then wait for approximately 0.5 seconds. The port P1.0 toggling can be done using an XOR operation of the current value of the port (P1OUT) and the constant 0x01, i.e., (P1OUT=P1OUT xor 0x01). Software delay of 0.5 seconds can be implemented using an empty loop with a certain number of iterations. 2. Blink a LED Project: Assembly Code Figure 1 shows the assembly code of the blink application. Here is a short description of the assembly code for this application....
View Full Document

{[ snackBarMessage ]}

Page1 / 8

lab4 - Getting Started with the DRFG4618 Hardware Platform...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online