CSE421: Microprocessors and Microcontrollers

9 downloads 427 Views 87KB Size Report
Compiler languages, for MSP430 Family and its features. ... For Code Composer Studio MSP430 Core Edition. 1. ... v4.2.0 → Code Composer Studio v4. 2.
CSE421: Microprocessors and Microcontrollers 2013-2014 Fall Semester

Experiment 1: Integrated Development Environments for MSP430: CCS & IAR

Important Notice: There will be a quiz at the beginning of this Lab work. In the quiz you will be asked a 10 min question from previous lab section, and desired information for previous lab report. Also, for every Lab, students are expected to get prepared for topic of the lab. In this lab you will be familiarized with Compiler languages, for MSP430 Family and its features. You will be re-program and run led blinking project that used in previous lab with assembly and C language and you will be familiarized with program commands. Experiment 1: This experiment will give you briefly information about programming MSP430 with assembly and C languages. Firstly some useful operations and configuration of digital I/O will be given. You will practice some of them with example codes.

List of Tasks that Each Student/Group has to complete in the Lab: For IAR Embedded Workbench KickStart for MSP430 ; 1. Start the Workbench (Start → Programs → IAR Systems → IAR Embedded Workbench KickStart for MSP430 → IAR Embedded Workbench). 2. Click File → Open Workspace to open the file at: \Embedded Workbench x.x\430\FET_examples\Flashing the LED.eww. The workspace window opens. 3. Click on the tab at the bottom of the workspace window that corresponds to your MSP430 device (MSP430xxxx) and desired language (assembler or C). 4. Click Project → Options → FET Debugger → Setup → Connection to select the appropriate port: Texas Instruments LPT-IF for the parallel FET Interface (MSP-FET430PIF) or Texas Instruments USB-IF for the USB Interface (MSP-FET430UIF) or for the eZ430. 5. Click Project → Rebuild All to build and link the source code. You can view the source code by double-clicking on the project, and then double-clicking on the displayed source file. 6. Click Project → Debug to start the C-SPY debugger. C-SPY erases the device flash and then downloads the application object file to the device flash. 7. Click Debug → Go to start the application. The LED should flash. 8. Click Debug → Stop Debugging to stop debugging, to exit C-SPY, and to return to the Workbench. 9. Click File → Exit to exit the Workbench. 10. Change the blinking frequency of the LED in code, re-compile, reload and run the application

For Code Composer Studio MSP430 Core Edition 1. Start Code Composer Studio Start → All Programs → Texas Instruments → Code Composer Studio v4.2.0 → Code Composer Studio v4. 2. Create a new Project by selecting File → New → CCS Project. 3. Enter a project name and click next. 4. Set Project Type to MSP430. 5. Click next twice to get to the CCS Project Settings page. Select the Device Variant used in the project. 6. Add the flashing LED code example to the project by clicking Project → Add Files to Active Project. Code examples are located in \ccs4\msp430\examples according to the device family that you are using. 7. To compile the code and download the application to the target device, go to Target→ Debug Active Project. 8. The application may be started by selecting Target → Run (F8) or clicking the green Play button on the toolbar. 9. To terminate the debug session click go to Target → Terminate All.

Helpful Documents and Hints for the LAB:

You will implement flashing led application. You will use MSP430FG4618/F2013 experimenter kit. See above links and download necessary documents. You will use both IAR and CCE softwares. You will write your programs both in assembler and in C. Thus example codes will be useful for you. In addition you need microprocessor pin descriptions and features so look up to datasheets which microprocessor belongs to.