DOC PREVIEW
CU-Boulder ECEN 4517 - Introduction to the MSP430 Microcontroller

This preview shows page 1-2 out of 6 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Experiment 2 Introduction to the MSP430 Microcontroller ECEN 4517/5517 Spring 2014 The purpose of this experiment is to familiarize yourself with the MSP430 Microcontroller, so that later this semester you can implement maximum power point tracking algorithms in a dc–dc converter, and so that you can control an inverter to produce a sinusoidal output. You will use the Code Composer Studio tools to write programs that control the digital and timer/PWM outputs, and in a later experiment you will use the A/D converter. Finally, you will implement circuitry that causes a power MOSFET to switch at a duty cycle programmable within the MSP430. Power Lab MSP430F5172 Development Board Your group should purchase a parts kit from the ECEE electronics store. This kit includes a Development Board containing a Texas Instruments MSP430F5172 25 MHz microcontroller, with on‐board 3.3 V regulator, LED, and JTAG port. All parts have already been soldered onto the board. There are two ways to connect the development board to a computer: (1) using an MSP‐FET430UIF JTAG debug interface box, or (2) a TI Launchpad board. Your TA will instruct you which of these two options to take and will provide the appropriate cables: (1) MSP‐FET430UIF JTAG debug interface box plugs between a USB port of your lab computer and the JTAG connector (JP1) of the Development Board. (2) The Launchpad also connects to a USB port of your lab computer, but requires four jumper wires to be connected between the Launchpad and the Development Board. Please see detailed instructions in the “TI Launchpad” linked to the Exp. 2 course web page. The Development Board can be powered from an external dc power supply (any value from 5 V to over 15 V will work) or from the JTAG connector; a jumper (J5) (which you should add) selects this. The USB ports of the lab computers are capable of supplying the required power via the JTAG connector, but when operating your Exp. 3 system you will want to derive this power from an external bench or PV cart dc power supply. You will also need to add two other jumpers: (1) a jumper (J7) that connects the on‐board LED to pin P1.0, and (2) a jumper (J10) that selects the digital I/O voltage to either 3.3 V or an externally‐supplied 5 V— install the jumper to use the board 3.3 V. A schematic of the Development Board is linked to the Exp. 2 course web page. Task 1. Code Composer Studio, blinking LED The laboratory Windows 7 computers include the development system: Code Composer Studio version 5.5 Log into your lab computer, and start the Code Composer Studio program. If the program asks for a license, choose the free CODE SIZE LIMITED version. If the welcome page comes up, click on “Start using CCS”. Then choose the menu item: File > New > CCS Project Enter a project name. Create a directory inside the “temp” directory on your C: drive or on your Z: drive, and enter this location in the window (note that if you use the C: drive, this data will be erased when you log off of the computer). Select the “MSP430” Family, “MSP430x5xx Family” and “MSP430F5172” variant. Don’t change other menu settings, and click the “Finish” button. A default “main.c” edit window opens up as shown below, and you are now ready to begin coding: #include <msp430.h> /* * main.c */ int main(void) { WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer return 0; } Note that the first executable line within your main procedure is the code to disable the watchdog timer. This line should be included in the main file of all your projects. Enter the code discussed in Lecture 2 for blinking the LED, then save the file. Note that the LED is connected to pin 1.0, so it will be necessary to modify the code so that it outputs to the correct pin. You can now compile and link your code using the following menu command (or click on the build button): Project > Build All If there are no errors, your code is ready to be uploaded into your development board. Start the debugger using the following menu command (or click on the debug button): Run > Debug If an ultra‐low‐power advisor window pops up you can select “Do not show this message again” and Proceed. This should load the program into the MSP430. If Windows does not recognize the JTAG programmer or the Launchpad, it may be necessary to add this device manually. The driver for the JTAG debug interface board (MSP‐FET430UIF) should be on the local C: drive inside the Texas Instrument program folder. To start execution of the program on the Development Board, click on the green run button , or use the pulldown menu: Run > Resume If you want to make changes, click the red stop button, type your changes, and save. Then repeat the process of uploading and running the program. Demonstrate your blinking LED program to your TA, and ask the TA to record that you have completed Task 1. this part. (initial the attached scoresheet. Task 2. Pulse Width Modulation Create a new workspace directory using the command File > Switch Workspace … Create a new workspace directory within the temp directory. After the program restarts, edit the CCS project settings and create a new .c file, as described previously. Enter and modify the posted on the Exp 2 page to cause Timer D to output a PWM signal having a duty cycle of 36% and a switching frequency of 80 kHz. Operate Timer D with a clock frequency equal to 200 MHz, so that Timer D has a time resolution equal to 4 ns. Connect an oscilloscope to view the waveform, and debug as necessary. When this works, get your TA to record that you have completed Task 2. Task 3. Driving a Power MOSFET Thoroughly read the remainder of this procedure document before proceeding. The MSP430 is unable to directly supply the voltage and current required to drive the gate of a power MOSFET. The parts kit contains a TC4428 gate driver IC capable of producing gate currents of 1.5 A, and of shifting voltage levels from 3.3 V up to 12‐15 V. Connect one of the low voltage power MOSFETs (HUF75321) in your parts kit on a breadboard. The MOSFET source should be connected to ground, and the drain should be connected through a power resistor to the 0–35 V bench power supply through a power


View Full Document

CU-Boulder ECEN 4517 - Introduction to the MSP430 Microcontroller

Documents in this Course
Lecture 2

Lecture 2

24 pages

Lecture 4

Lecture 4

16 pages

Lecture 2

Lecture 2

48 pages

Lecture 1

Lecture 1

23 pages

Lecture 6

Lecture 6

26 pages

Battery

Battery

27 pages

Lecture 3

Lecture 3

20 pages

Lecture 4

Lecture 4

23 pages

Load more
Download Introduction to the MSP430 Microcontroller
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Introduction to the MSP430 Microcontroller and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Introduction to the MSP430 Microcontroller 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?