1 / 9

Lab 0 – Warm-up Lab

Warm-up Lab. Lab 0 – Warm-up Lab. Acquire a Texas Instruments MSP430 LaunchPad Development Tool. Setup a CS user account. Install (if necessary) and "run" blink.txt on the Digital State Machine Simulator. Install (if necessary) and execute TI's Code Composer Studio (CCSv5.2).

kerem
Télécharger la présentation

Lab 0 – Warm-up Lab

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Warm-up Lab Lab 0 – Warm-up Lab • Acquire a Texas Instruments MSP430 LaunchPad Development Tool. • Setup a CS user account. • Install (if necessary) and "run" blink.txt on the Digital State Machine Simulator. • Install (if necessary) and execute TI's Code Composer Studio (CCSv5.2). • Create a new assembly project. Load, assemble, and execute blinky.asm on your LaunchPaddevelopment tool. • Modify blinky.asm to double the toggle speed of the LED. • Use Code Composer to create a new C language project. Load, compile and execute blinky.c on your LaunchPaddevelopment tool as well. • Modify blinky.c to double the toggle speed of the LED. Lab 0 - Warm-up Lab

  2. Warm-up Lab Lab 0 – Warm-up Lab No lab source material should ever be emailed to another student! Please avoid even the appearance of cheating by looking on another's monitor. • Read again the Academic Honesty declaration. Students are encouraged work together in as far as discussing, clarifying, and helping each other understand material. Lab 0 - Warm-up Lab

  3. Warm-up Lab Lab 0 – Warm-up Lab • Acquire a Texas Instruments MSP430 LaunchPad Development Tool directly from Texas Instruments (or BYU Book Exchange, Amazon, Digikey,…). Lab 0 - Warm-up Lab

  4. Warm-up Lab Lab 0 – Warm-up Lab • Setup a CS user account. • If you are using your own computer, you can still set up your account. • If you are using a computer science department computer, then you should already have an account setup for you. (If you are setting up an account for the first time you may need to use your RouteY ID as your username and your student number as your password.) • Note: you may be required to change your password at this time. Lab 0 - Warm-up Lab

  5. Warm-up Lab Lab 0 – Warm-up Lab • Install (if necessary) and "run" blink.txt on the Digital State Machine Simulator. Toggles on and off Load Blinky.txt Lab 0 - Warm-up Lab

  6. Warm-up Lab Lab 0 – Warm-up Lab • Install (if necessary) and "clock" control.txt on the MSP430 micro-architecture simulator. Lab 0 - Warm-up Lab

  7. Warm-up Lab Lab 0 – Warm-up Lab • Install (if necessary) and execute TI's Code Composer Studio CCSv5.xx. Lab 0 - Warm-up Lab

  8. Warm-up Lab Lab 0 – Warm-up Lab • Create a new assembly-only project. Load, assemble, and execute blinky.asm on your LaunchPaddevelopment tool. Modify blinky.asm to double the toggle speed of the LED. ;******************************************************************************* ; CS 124 Lab 1 - blinky.asm: Software Toggle P1.0 ; ; Description: Toggle P1.0 by xor'ing P1.0 inside of a software loop. ; ;******************************************************************************* .cdecls C,LIST, "msp430.h" ; MSP430 ;------------------------------------------------------------------------------ .text ; beginning of executable code RESET: mov.w #0x0280,SP ; init stack pointer mov.w #WDTPW+WDTHOLD,&WDTCTL ; stop WDT bis.b #0x01,&P1DIR ; set P1.0 as output mainloop: xor.b #0x01,&P1OUT ; toggle P1.0 mov.w #0,r15 ; use R15 as delay counter delayloop: sub.w #1,r15 ; delay over? jnzdelayloop ; n jmpmainloop ; y, toggle led ;------------------------------------------------------------------------------ ; Interrupt Vectors .sect ".reset" ; MSP430 RESET Vector .short RESET ; start address .end Lab 0 - Warm-up Lab

  9. Warm-up Lab Lab 0 – Warm-up Lab • Use Code Composer to create a new C language project. Load, compile and execute blinky.c on your LaunchPaddevelopment tool as well. Modify blinky.c to double the toggle speed of the LED. //****************************************************************************** // CS 124 Lab 1 - blinky.c: Software Toggle P1.0 // // Description; Toggle P1.0 by xor'ing P1.0 inside of a software loop. // //****************************************************************************** #include "msp430.h" volatile unsigned inti; // volatile to prevent optimization void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer P1DIR |= 0x01; // Set P1.0 to output direction for (;;) { P1OUT ^= 0x01; // Toggle P1.0 using exclusive-OR i = 0; // Delay while (--i); } } Lab 0 - Warm-up Lab

More Related