New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

EE 1106 Lab MSP430

by: Kumar Jyoti

EE 1106 Lab MSP430 EE 1106 - 001

Kumar Jyoti
GPA 3.3

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Lab 10 and 11 combined MSP430 Lab Report
Gregory K Turner
75 ?





Popular in Electrical Engineering

This 10 page Bundle was uploaded by Kumar Jyoti on Sunday January 3, 2016. The Bundle belongs to EE 1106 - 001 at University of Texas at Arlington taught by Gregory K Turner in Fall 2015. Since its upload, it has received 219 views. For similar materials see ELECTRICAL ENGINEERING FRESHMAN PRACTICUM in Electrical Engineering at University of Texas at Arlington.

Similar to EE 1106 - 001 at UTA


Reviews for EE 1106 Lab MSP430


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 01/03/16
EE1106 – Introduction to Electrical Engineering Practicum Lab Report Grading Rubric (To be attached as a coversheet to EVERY report) FORMATTING (see comments in graded report for more explanation): Formatting Evaluation Key (Lab 1, 2, 3, 4): 0 = Absent 1 = Extremely Lacking 2 = Poor 3 = Fair 4 = Good 5 = Excellent Formatting Evaluation Key (Lab 5 and all succeeding labs): 0 = Extremely Lacking 1 = Poor 2 = Fair 3 = Good 4 = Excellent 5 = Perfect Primary Structure: _____ Proper margins/spacing is used throughout the report (IEEE format) _____ Proper formatting of section titles and subtitles (IEEE format) _____ Proper font and font size (IEEE format) _____ Overall consistency of formatting throughout the report Figures/Tables: _____ Figures/tables are appropriately named and numbered (IEEE format) _____ Figures/tables are appropriately sized and spaced _____ Screenshots are neatly cropped and clear Spelling, Grammar, and Writing Style: _____ Spelling _____ Passive voice is used throughout the ENTIRE report _____ Sentence Structure _____ Paragraph Structure (IEEE format) _____ References (IEEE Format) CONTENT (see comments in graded report for more explanation): Content Evaluation Key: 0 = Absent 1 = Extremely Lacking 1 2 = Poor 3 = Fair 4 = Good 5 = Excellent _____ Abstract provides end­to­end coverage of the objectives and purpose of the lab experiment _____ Introduction demonstrates a working understanding of major theoretical concepts required for the experiment _____ Procedure is sufficiently detailed and clearly describes all steps taken during the lab experiment _____ Results are sufficiently detailed and data is neatly organized _____ Discussion is a thoughtful analysis of all experimental results and data _____ Discussion demonstrates a working understanding of the purpose of the experiment performed _____ Conclusion sums up the overall accomplishments of the experiment _____ Conclusion sums up the benefits (to the student) of performing the experiment 2  Lab Report 10 & 11          MSP430 Kumar Aman Jyoti Electrical Engineering University of Texas at Arlington Arlington, Texas Abstract: This paper is about an introduction to TI MSP430  Launch Pad, TI Code Composer Studio and also more  importantly become familiar with microcontroller features and  functions. Apart from this we will also learn about the different  types of Inputs and Outputs of a microcontroller. We will also  learn how to program the TI MSP430 Launch Pad to blink an  LED. Lastly we will use the timer modules on the MSP430 to  create a PWM wave and control the speed of a DC motor and  will also get familiar with using BJT transistor as a relay. Fig 1 – A Microcontroller.  I. INTRODUCTION Microcontrollers are used in a wide variety of control and pro  In this part of the experiment we will learn about the  cessing applications, including: mobile phones, home applian different types of inputs and outputs of a microcontroller and  ces, automobile electronics and toys. Almost any electronic d then create a new CCS Project, program the TO MSP430  Launch Pad to blink an LED.  evice that you use contains a microcontroller in one or many  subsystems. The purpose of this experiment is to introduce th e TI MSP430 LaunchPad, introduce TI Code Composer Studi Microcontroller input/output functions can be used in wide    o and become familiar with microcontroller features and func variety of combinations to control and automate systems.    tions. The definition of Microcontroller goes as this A  In this experiment, we will use the ADC on the MSP430 to re microcontroller is a compact microcomputer designed to  ada force sensor output and control an LED array depending  on the force sensor output. The objectives of this experiment  govern the operation of embedded systems in motor vehicles, are to control an LED array using a force sensor output and  robots, office machines, complex medical devices, mobile  radio transceivers, vending machines, home appliances, and  become familiar with microcontroller GPIO and also with  various other devices. Below is a picture of it Fig 1. analog‐to‐digital conversion using a microcontroller. An  LED array is shown in the picture below – 3 The components, instruments and software required for this  Lab were first bought and then installed like the TI MSP430  Launch Pad which is a microcontroller and the software  named TI Code Composer Studio Version 6.1. First of all we  programed the MSP430 as follows. First we started CCS and  went to the Resource Explorer, then navigated through to  find the code examples for the MSP430G2x53 and then  scrolled through the one­click projects to find the software  toggle P1.0 project. Selected it and choose the device that is  on the MSP430 Launchpad, MSP430G2553 which further  allowed us to create the project with one source file.  With the Launchpad plugged in, we clicked the debug button. This built the program and switched CCS to debug mode in  one step.  Clicked the run button in debug mode and the new  program started running. Now the red led was the only one  that blinked at a speed of one per second. After doing this we now changed the speed of the LED blink so that it can blink  Fig 2 – An LED array. faster for that we clicked the terminate button to go back to  the edit mode in   CCS then modified the source code file by  As mentioned above that microcontroller input or output  changing the value of  the    variable i from 50000 to 10000.   This variable sets the delay between led blinks.  Saved this  functions can be used in wide variety of combinations to cont rol and automate systems.  In this last experiment we will use and clicked the debug button to build the program and went  the  again into debug mode.   timer modules on the MSP430 to create a PWM wave and co Lastly clicked run and the led now blinked 5 times faster than ntrol the speed of a DC motor. In this lab experiment we will  that of previously done. The following figure shows the  experiment done in the lab with the LEDs.  be able to control the speed of DC motor using PWM and  become familiar with microcontroller timers. Also we will  use microcontroller timers to generate a PWM wave. At last  we will become familiar with using BJT transistors as a relay. A small DC motor is shown below which was used in the  Lab –  Fig 3 – Small DC Motor  II. PROCEDURE 4 In the second part of the experiment we will use components  3 – 820 Ω 1/4W Resistors, 10 KΩ 1/4W Resistor,  TI TLC274ACN Op‐Amp, Green, Yellow and Red LEDs,  Flexi Force 1 lb. Force Sensor. We will also need the TI  MSP430Launch pad which is a microcontroller and the TI  Code Composer Studio Version 6.1 software installed in the  laptop used. We start with connecting Input/output  peripherals to the MSP430. Firstly we created a new CCS  project and then choose the correct Target Family and  Specific Device (MSP430G2553). We gave the project a  name and selected the template as an empty project with no  main.c. After doing the above we copied the source code  from the Wiki page into this workspace location.  With the  Launchpad connected, clicked the Debug button to build and  program the Launchpad. Lastly we built the circuit in the  breadboard as shown below in the Figure –  Fig 6 – Resistance to Voltage Circuit Fig 4 : LED Blink Experiment in Lab. Fig 5 – Breadboard Circuit in Lab. 5 Fig 8 – DC Motor Relay Finally made the V1 supply from the MSP430 VCC  Fig 7 – LED Array Circuit  connection. Following is the picture of the Circuit made in  the lab along with the running motor. First we steeped our resistance to voltage conversion circuit.  This circuit allowed the changing resistance of the force  sensor to be converted into a voltage that the ADC of the  MSP430 can read. It consisted of the TLC274ACN op‐ amp, a 10 KΩ resistor and the Flexi Force sensor. We then  connected the output of the op‐amp to P1.5 on the MSP430.  IV. DISCUSSION Nextly we connected the LED array to three GPIO pins on th In the first lab we were able to successfully blink the LED by e MSP430. The LEDs were turned on according to the follow processing the TI MSP430 using the CCS software. We also  ing conditions that the Force should be less than .5lb and on  were able to change the blinking rate of LEDs with change in Green LED on. Secondly . the values in the source code. Secondly in the second part of  5 lb. < Force < 1 lb. → Yellow LED On and at last  the experiment we built a circuit in the breadboard which is  Force > 1 lb. → Red LED On. also shown above and connected it to three different color  Now that all of our input/output circuitry has been connected  LEDs. Again we programmed the MSP430 using the given  to the MSP430, we double checked our wiring and connected source code and ran the processor. As a result we saw that by the USB cable. Press down on our force sensor and watched  applying pressure to the sensor the LEDs successfully  the LEDs light up. blinked and we were also able to change the timing of  different LEDs to blink. At last in the third experiment we  In the last part of the experiment we will control the speed of  connected the MSP430 with a small DC motor and  DC motor using PWM. The components used, instruments  programmed the source code to run it. By this way we came  and software required are same as the above 1  experiment  to know that Microcontroller input/output functions can be  with addition of a 3V DC Motor, MPS8098 NPN BJT  used in wide variety of combinations to control and automate Transistor. We started with connecting the DC motor to the  systems. MSP430. Since my MSP430 was programmed during the  pre‐lab so in this portion of the experiment we will connect  the BJT relay transistor and DC motor to the MSP430 with  V. CONCLUSION all the powers disconnected. We then started to build the  circuit in the breadboard, we connected the P1.6 of your  On completion of this experiment we got an introduction to  MSP430 to the DC motor relay circuit shown below. TI MSP430 Launch Pad, TI Code Composer Studio and also  more importantly became familiar with microcontroller  features and functions. Apart from that we also learned about  the different types of Inputs and Outputs of a microcontroller. 6 We also learned how to program the TI MSP430 Launch Pad  } } to blink an LED. Lastly we used the timer modules on the  MSP430 to create a PWM wave and control the speed of a  DC  motor and also got familiar with using BJT transistor as a relay.) – Also the below picture shows the generated PWM wave­ // Introduction to Electrical Engineering at The University of Texas at Arlington #include <msp430g2553.h> unsigned int adcval = 0; // Variable to store ADC value void ConfigureADC(void) { ADC10CTL1 = INCH_5 + ADC10SSEL_3; // Set ADC to channel 5, select the SMCLK as the ADC clock ADC10CTL0 = ADC10ON + SREF_0 + ADC10SHT_2; // Turn the ADC on, set VCC and VSS as reference, use 16 SMCLK clock cycles to sample the analog input ADC10AE0 |= BIT5; // Set the ADC to Fig 9 – PWM Wave  read from P1.5     } V. APPENDIX void main(void) The Source Code after modifying is as follows – { WDTCTL = WDTPW | WDTHOLD; For Lab 10 (a) –  // Stop watchdog timer #include <msp430.h> DCOCTL = CALDCO_1MHZ; // DCO = 1MHZ int main(void) { P1DIR = 0x07; WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer // Set P1.0, P1.1 and P1.2 as outputs P1DIR |= 0x01; // Set P1.0 to P1SEL |= 0x20; output direction // Set P1.5 as ADC input (the PxSEL commands select peripheral for (;;) functions for the pin) { volatile unsigned int i; ConfigureADC(); // Call ConfigureADC P1OUT ^= 0x01; // Toggle P1.0 subroutine using exclusive-OR while(1) i = 200000; // Delay do (i--); // Infinite loop { while (i != 0); 7 __delay_cycles(10000); P1DIR |= 0x40; // Delay 10000 clock cycle to allow ADC to settle // Set P1.6 as output ADC10CTL0 |= ENC + ADC10SC; P1OUT |= 0x40; // Enable conversion and start conversion adcval = ADC10MEM; // Set P1.6 to low // Store ADC P1SEL |= 0x40; sampled value // Select P1.6 for PWM output if (adcval < 380) // Based on sensor input to TACCR0 = 5000; ADC, determine which pin to turn on. These values were determined // PWM period { TACCR1 = 500; // by calibrating the sensor prior to the lab. P1.0 = // PWM duty cycle force < 1/2 lb, P1.1 = 1/2 lb. < force < 1 lb. TACCTL1 = OUTMOD_7; if (adcval < 205) // P1.2 = force > 1 lb. // PWM output mode: 7 - PWM { reset/set, high below PWM duty cycle, low above P1OUT = 0x01; TACCTL0 = CCIE; } else { // Enable counter interrupt P1OUT = 0x02; TACTL = TASSEL_2 + ID_1 + MC_1; // Use } SMCLK for timer clock (1 MHz), set internal clock } divider to 2, set continuous count up to TACCR0 else { _BIS_SR(LPM0_bits + GIE); P1OUT = 0x04; // } Enter low power mode, enable all interrupts } } } #pragma vector = TIMER0_A0_VECTOR   // For Lab 11 –  Counter interrupt __interrupt void Timer0_A0 (void) { #include <msp430g2553.h> if(TACCR1 == 4000) int main(void) { // Slowly increase PWM duty cycle, reset WDTCTL = WDTPW + WDTHOLD; to 10% duty cycle at 80% duty cycle { BCSCTL1 = CALBC1_1MHZ; TACCR1 = 500; } // Set ACLK divider to 1 else DCOCTL = CALDCO_1MHZ; { TACCR1 = TACCR1 + 10; } // SMCLK = DCO/1 = 1MHZ 8 } [1] Lab 10 (a) handout from Lab wiki page [2] Lab 10 (b) handout from Lab wiki page V. REFERENCES [3] Lab 11 handout from Lab wiki page 9


Buy Material

Are you sure you want to buy this material for

75 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Jennifer McGill UCSF Med School

"Selling my MCAT study guides and notes has been a great source of side revenue while I'm in school. Some months I'm making over $500! Plus, it makes me happy knowing that I'm helping future med students with their MCAT."

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Parker Thompson 500 Startups

"It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.