Pages

microcontroller using IAR Embedded Workbench

Summary: This is a short tutorial created by a student at the University of North Florida to help familiarize students with constructing the PCB and Flashing a program onto the microcontroller using IAR Embedded Workbench.


Embedded System Design 

graphics1.png 

 
TI MSP430F449 Microcontroller
  
 

Table of Contents

Topic:

  • Background
  • Introduction
  • Board Construction
  • Soldering
  • Soldering Surface Mounted Components
  • Soldering the MSP430
  • Mounting the LCD Display
  • Order for Soldering Components to Board
  • Sample Devices From Industry
  • Texas Instruments' MSP430F449 Samples
  • Sensors
  • Project Software
  • Programming the MSP430F449
  • Appendix

Background:

The purpose of the student tutorial is to introduce and familiarize the user with the Embedded System Design utilizing the TI MSP430F449 microcontroller. In addition, the student tutorial serves as a guide on how to assemble the Printed Circuit Board (PCB) along with a sensor of choice. The guide also includes an introduction on programming the TI MSP430F449 using the Embedded IAR Workbench. The student will need the Flash Emulation Tool (FET) kit purchased from Texas Instruments that allows connection from the Personal Computer (PC), where the software or micro program is developed, to the PCB the student constructs. Basically, the student downloads or “Flashes” the micro program to the MSP430F449 Flash nonvolatile memory. More information about the TI MSP430F449 microprocessor is available at http://www.ti.com. Under Products, click on Analog and Mixed Signal MSP430 Ultra-Low-Power MCU.
The parts kit allows the student to build a circuit board with the TI MSP430F449 microprocessor, a sensor of choice, along with an LCD display. The micro program to for the TI MSP430F449 is mostly developed in the C programming language with the aid of a software package, the Embedded IAR Workbench.
After the PCB is constructed, a micro program with a message such as HELLO to be displayed on the LCD is prepared and placed in Flash memory, (“flashed”). A valid message on the LCD indicates that the soldering was correct and the circuits are functioning. After some familiarity is developed with the system, the student is responsible for connecting a sensor to the PCB and writing the software (micro program) that allows the sensor to display a reading on the LCD.
This student tutorial is intended for the student to have fun and to learn how to use a microprocessor to design an Intelligent Sensor. This serves as a foundation to build upon for later courses and to stimulate an interest in the art of Embedded System Design.

Introduction:

The purpose of this student project is multi-fold.

  • It provides the opportunity to work as a member of a team.
  • The student starts by learning to interpret a printed circuit board (PCB) layout. Several components will be provided to mount (solder) on to this board.
  • Learn some basic skills of making ultra-find solder connections.
  • Learn some basic steps of troubleshooting a printed circuit board (PCB).
  • Pull-together files to form a project and compile and link the programs of the project.
  • Introduction to the IAR debugging tool.
  • Learn to flash software to the microprocessor mounted on the PCB.
  • Select a sensor and learn the characteristics of the sensor.
  • Write a program to allow the student to read the analog voltage of a sensor into the MSP430F449 and display the signal in appropriate units on the PCB’s LCD.
  • The expected outcome from this tutorial is that the student becomes familiar, at a first level, on how several aspects of engineering (hardware construction, software development, sensors) are brought together to form an intelligent sensor.

Board Construction:

Table 1 shows a list of parts that are needed to carry out the main objectives in the student tutorial. Be sure to take an inventory of the items listed in Table 1.
There are soldering stations and microscopes available to accomplish the student tutorial. A microscope is necessary to see how to do the soldering work. This will be realized as practice in soldering is done often and over time. Solder and flux are provided with the soldering stations.
The student is expected to solder two surface mounted 0.1 uF capacitors to the printed circuit board. In addition, the user is expected to solder all 100 pins of the MSP 430F449 package to the printed circuit board.
TABLE 1: Inventory of Parts
Item #Description (Digikey)Quantity
1MHC14K-ND: JTAG Connector1
2EG1868CT-ND: Push Button Switch1
3CP-102A-ND: Power Connector1
4LM2937IMP-3.3CT ND: Voltage Regulator1
5CT2192MST-ND: Switch 2 position1
6300-1001-ND: 32.7 kHz Crystal1
7399-1249-1-ND: 0.1uF SMD capacitor3
8399-1296-1–ND: 1uF SMD capacitor1
9311-47kECT-ND: 100 kohm resistor2
10SBLCDA2: LCD Display1
11circuit board - no mask - practice soldering1
12circuit board - with mask - final product1
13miscellaneous 24 gauge wire2
14TI MSP430F449IPZ chip1

Soldering:

Avoid breathing the fumes from the solder. The solder is rosin core with a certain percentage of lead (about 2%). It is not healthy to breathe these fumes. Read the label on the soldering tube provided with the soldering station and use the precautions given on the label.
Set the temperature of the soldering station to 800 F. After the tip has reached this temperature, dip the tip of the iron into the tinning paste. Clean the tip with the sponge that comes with the station (add water to the sponge). After this step you may want to take a knife blade and lightly scrape the tip of the iron. Repeat dipping the tip in the tinning past and cleaning the tip on the sponge until the lower 1/4 inch of the tip is “silvered.” A clean silvered tip is the first indication that the tool has passed the first necessary step toward being properly tinned. Next, touch a strand of solder to the tip. If the solder balls up and drops from the tip, then the tip is not properly tinned. Repeat the above steps until the solder will stick to the tip. At that point the tip is properly tinned and ready for use. Another thing; when you are through soldering, always clean the tip before turning off the station. You might want to take the edge of a knife blade and lightly scrape the tip. Be careful when using the soldering iron. Soldering iron burns hurt! So does melted solder that splashes on you!

Soldering Surface Mounted Components:

Figure 1 illustrates a top view representation of the PCB utilized to mount the MSP430F449 and the SoftBaugh LCD among other components.
Figure 1: Illustration of the MSP430F449 board.
Figure 1 (graphics2.png)


Now consider soldering a surface mounted (SMD) device such as the MSP430F449, a resistor or capacitor to a board. The PCB has a solder pad or tab for each end of the SMD pads to rest. This is indicated in Figure 2.
Figure 2: Illustrating surface mounted component on a board.
Figure 2 (graphics3.png)


The PCB pads are thin and most often do not provide enough solder for connecting the SMD component. Before placing the SMD component on the board, one should flux and lightly tint each tab. To do this, take a toothpick or similar object and deposit and ever so slight amount of flux on each pad. Next, place the tip of the soldering iron in the tinning paste, remove and clean on the sponge. Now touch the tip to a strand of solder and tin-up the tip of the iron. Focus in on the tabs and bring the tip of the iron over one of the tabs. Touch the tip of the iron to the tab and slight rub the tip over the tab to deposit a thin layer of solder that should bond with the board tab. Do this to each tab. Now take a pair of tweezers and hold the SM component in place. Bring the tip of the iron to one edge of the tab and melt the solder. Figure 3 illustrates the tab for each pin of the MSP430F449 soldered onto the board.
Figure 3: Soldered in place MSP430F449.
Figure 3 (graphics4.png)


Do not touch the tip to the SMD component. As the solder on the tab melts, the solder on the tip of the SMD component will also melt. In order to observe all this, a microscope will be needed. Remove the tip of the iron but hold the component in place, momentarily, for the solder to cool and set. Remove the tweezers and repeat the process at the other end of the component. Most often there is a good bond and no further soldering is required. Furthermore, there is a slight change in the procedure for mounting polarized capacitors. This slight change is illustrated in Figure 4.
Figure 4: Drawing showing surface mounted polarized capacitor.
Figure 4 (graphics5.png)


Also, on many polarized capacitors the two small solder tabs have the same size. In this case the backside of the capacitor will have a small stripe to indicate the + (positive) terminal of the capacitor. One should always check the source catalog for this information if it is not clear which side is positive.

Soldering the MSP430 to the Board:

The MSP 430F449 is a very fine-pitch chip. That is, the connect point to the chip are numerous and very close together. There are 25 connect points on each side of the chip. The chip is roughly 1/2 inch on each side. That is, one is looking at roughly 25 connect points spread over 1/2 of an inch. To mount the MSP 430 to the PCB requires some tedious soldering work.
Start by placing the board on the microscope with the base light and top light of the microscope turned on. This provides heat to the board that will be helpful in the fluxing process. Consider the diagram of Figure 3 that represents the portion of the PCB where the MSP 430 will be mounted.
Figure 5: Board pin layout for the MSP430.
Figure 5 (graphics6.png)


The student should take an appropriate object such as a toothpick with flux on the tip and place the flux in the shaded areas shown on the circuit traces of Figure 5. Next, place the MSP 430 on the trace pattern above with the MSP 430 centered all-around. This takes a little time. Be careful to align the connect points to the PCB completely around the MSP 430. The notch on the bottom left corner of the MSP 430F indicates the placement of the first pin.
Figure 6: Showing the MSP430 placed on circuit traces.
Figure 6 (graphics7.png)


With all the connect points of the MSP 430 on top of the corresponding PCB pads, hold things in place and use the soldering iron to tack a connect point of the chip to a trace at pins 25 and 1 as shown above. DO NOT ADD ANY SOLDER TO THE TIP OF THE SOLDERING IRON! Set things up as shown in Figure 5. Apply a touch of flux to the tip of each microchip pin.
Figure 7: Soldering technique for connecting MSP430 to traces on board.
Figure 7 (graphics8.png)


At pin 25, shown in Figure 6, continue to hold the chip in place. Place the tip of the soldering iron on the circuit trace as shown above. The solder on the trace will melt. This should temporarily tack the circuit connect point to the trace. Allow the solder joint to cool for about 5 seconds. Continue to hold the chip in place. Move to another corner point on the chip (pin 1) and repeat the above process. At this point the chip should be tacked to the traces and lined up properly. Now move to another connect point (pin 24) and place the tip of an exacto knife on top of the chip connect point as shown in Figure 7. Apply the tip of the soldering iron to the corresponding circuit trace and allowing the solder on the trace to flow. Place the tip of the xacto knife on top of the connect point to the board; remove the soldering iron tip and apply a small pressure (with the xacto knife) to hold the connect point down; allow the junction to cool for a few seconds.
Then, the above process is continued by moving around the board. A good idea is to pin down connect pin 2 then move to pin 23. This allows connect point at pin 2 to cool for a few seconds before coming back to solder at pin 23 and so on. If at some point there does not seem to be enough solder on the traces to bond to the connect point, try placing the soldering iron tip in the tinning paste. Clean on the sponge. There is usually a slight amount of solder left on the tip. This can be used to add a little solder to the trace.
After soldering all the pins to the board, the user should check the connections. A good way to do this is to place the tip of your xacto blade to the edge of each pin. Apply a slight amount of pressure to the pin. If the pin moves you know you have a faulty solder connection. Clean and flux the tip of the soldering iron two or three times and then proceed to Re-do the solder joint.

Mounting the LCD Display:

The SoftBaugh LCD display unit has 24 pins on each side. The following procedure establishes one manner in which to mount the unit to the board.
To begin with, the small notch at one end of the LCD should be on the left side when lining up pins on the board. Place the pins on one side of the unit over the corresponding holes on the board. Slightly jiggle the unit until you can get the one side to slide into the holes. There are times when slightly jiggling the unit will result in both sides of the LCD to smoothly slide into the holes of the board. However if this is not the case, do not try to force the pins into the holes. It is fairly easy to get one side of the unit to go into the board. Where the pins emerge from the bottom of the board, keep the tips about flush with the board. Then attempt to line things up with the other side of the LCD. Start at one end and use the tip of a xacto knife to move each pin over the corresponding hole. Continue to move down the pin line and line up the pins with the holes. Once the pins have lined up, the second side will fit in place. Push the LCD in place with the pins protruding from the back of the board.
Now that the LCD is in place, flip the PCB over and solder the pins to the PCB. To do this bring the solder tip next to a pin; touch the pin with the strand of solder. The solder “sucks” down into the hole on the PCB. Figure 8 illustrates the SoftBaugh LCD mounted on the board.
Figure 8: Mounted SoftBaugh LCD Display.
Figure 8 (graphics9.png)


The remaining components are relatively easy to mount to the PCB. In mounting the switches, it is a good idea to apply a small amount of flux to the solder pads and even tin the tips of the switches with a slight amount of solder. This makes it easier to solder the switches to the board.
The PCB for this project was designed to serve the needs of several projects at the university. Therefore, the board is populated according to the particular project. The lettering on the board identifies the surface mounted capacitors for this tutorial and Figure 9 illustrates the board with most of the essential components mounted.
Figure 9: PCB with Components Mounted.
Figure 9 (graphics10.png)

Order for Soldering Components to Board:

The following order is recommended for soldering components to the board. (1) The MSP430F449. (2) Surface mounted capacitors and resistors next. (3) Push button switch, voltage regulator, 5 volt input plus, slider switch. (4) Now solder in the pins of the JTAG connector. (5) Wait until last to solder in the SoftBaugh LCD.

Sample Devices from Industry:

Most all industries support students in their quest for learning about particular products from their company. Within reason, companies will provide samples of devices for students to use in their projects. There are at least two reasons that come to mind as to why they want to provide this support. First, they support education. Engineers, with good educations, are the foundation or backbone of their company. Second, if students become familiar with their products they are more likely to place orders with them during your professional career.

TI MSP430F449 Samples:

This is the micro computer that is utilized in this tutorial. Samples will be provided to students enrolled in the course. The following Texas Instrument URL is where you can order a 3-lot sample of the MSP430F449. Just follow the instructions. Be sure to give a mailing address where UPS/FedEx or order delivery services can deliver a package to you. You cannot use P.0.Boxes. In filling out the request form for parts indicate as necessary that you are a student working on an embedded microcomputer project. 
http://focus.ti.com/docs/prod/folders/print/msp430f449.html#samples

Sensors:

After you have constructed your board and you know that you can flash a message to the LCD, the next part is for you to select a sensor for application with the PCB you have built. In particular, you are to connect the output voltage from a sensor you select to an input port to the Analog to Digital converter of the MSP 430. You might select a temperature sensor, a force sensor, a magnetic field measurement sensor and so on. The choice of sensor is left up to you. However, you must find a sensor you want to use and you must order free samples.
There are a number of companies that manufacture sensors. One company is Analog Devices. Their web address ishttp://www.analog.com . Other companies such as Texas Instruments and Freescale also provide sample sensors.

Project Software:

The software required for this tutorial is available on the TI website to download for free. The web address to obtain the software is: 
http://focus.ti.com/docs/toolsw/folders/print/iar-kickstart.html
You will find the software from both IAR and TI that supports the Flash Emulation Tool. You are encouraged to spend some time looking over this material.

Programming the MSP430F449:

We now explain how to use the above tool to exercise the embedded processor board so that that the LCD displays a count from A-Z.
First connect the 25-pin cable connecter of the FET to the printer port of your PC. Connect the 14-pin connector to the JTAG port on your board. Be sure this cable is connected in the “Up” position. This is illustrated in Figure 10.
Figure 10: Board with 14-pin connector connected to JTAG port.
Figure 10 (graphics11.png)


Step 1: On your PC create the following directory: C:\430project\software. The files required to implement this student tutorial for the MSP430F449 will be given by the instructor. Once given, copy the files to your Computer. These files may include: lcd.c, lcd.h, lcddemo.c.
Step 2: Take the following path on your PC: Start / Programs / IAR Systems/ IAR Embedded Workbench for MSP430 KickStart/IAR / Embedded Workbench. This will open the screen shown in Figure 11.
Step 3: Now click on Project/Create New Project… and you will see the screen shown in Figure 12.
Step 4: Now double click on the programming language you will be using for the project and click on main. This step is shown in Figure 13. A Save As dialog box appears. Choose a name to save your project under.
Step 5: Once you’ve created your project, this will produce the screen shown in Figure 14.
Step 6: Now click on Project/Options… Under category, highlight general options and select which device you will be using for the project. The screen shown in Figure 15 illustrates this step.
Step 7: From the screen in Figure 15, under category highlight Debugger and choose the FET Debugger as your driver. This will produce the screen shown in Figure 16.
Step 8: Now under category highlight FET Debugger. Choose your connection whether it is USB or not. This is shown in the screen in Figure 17.
Step 9: To add the project files, click on Project/Add Files. Highlight all the files needed for the project and click Open. The files will then be added to your workspace. This is illustrated in the screen shown in Figure 18.
Step 10: Once the files are downloaded, click on the arrow on the top right screen of your window which means you are ready to download and debug your project. This is shown in Figure 19.
Step 11: After building your project, the debugger window opens at the bottom part of your screen. Click on the three arrows encircled in Figure 20 to run the program.
Step 12: Provided that the FET cable is inserted to your PC printer port and the JTAG plug on your processor board andprovided you have built your board correctly, you will see the screen go through a stage of showing that the board is being erased and then show it being programmed. After the programming stage is complete you should see some a count from A-Z scroll across the LCD.
Figure 11: Showing procedure in building software, Step 2.
Figure 11 (graphics12.png)


Figure 12: Showing procedure in building software, Step 3.
Figure 12 (graphics13.png)


Figure 13: Showing procedure in building software, Step 4.
Figure 13 (graphics14.png)


Figure 14: Showing procedure in building software, Step 5.
Figure 14 (graphics15.png)


Figure 15: Showing procedure in building software, Step 6.
Figure 15 (graphics16.png)


Figure 16: Showing procedure in building software, Step 7.
Figure 16 (graphics17.png)


Figure 17: Showing procedure in building software, Step 8.
Figure 17 (graphics18.png)


Figure 18: Showing procedure in building software, Step 9.
Figure 18 (graphics19.png)


Figure 19: Showing procedure in building software, Step 10.
Figure 19 (graphics20.png)


Figure 20: Showing procedure in building software, Step 11.
Figure 20 (graphics21.png)

Appendix

The following specifies the pin-out connections of the MSP430F449 Texas Instrument Mixed Signal Micro controller. Also, a general outline of the physical package is included. For more data on the device, check the following web site.
http://focus.ti.com/docs/prod/folders/print/msp430f449.htmi#technicaldocuments
Look under technical documents/data sheets.
pinout.PNG

1 comments:

Vinod said...

Nice blog created by blog director it’s very informative and template is according to blog theme. I would like to come on this blog again and again. Aluminium Soldering Flux, liquid soldering flux

Post a Comment

Share your knowledge

Related Posts Plugin for WordPress, Blogger...

Popular Projects

program for Dual DAC 8051 Microcontroller Based DC Motor Control A Microcontroller Based Turbidity Meter A m -Controller Based Thermostat ASCII to BCD conversion in 8051 AT90LS8515 Digital Message Machine Audio Frequency Response Analyzer Audio Homing Robot Automated Juice Mixer Automated Pet Feeder Autonomous Car Autonomous Parallel Parking RC Car Autonomous Search Robot Autonomous Tank Autonomous Vehicle Contrast Following Rover Autonomous navigating robot BCD number to ASCII in 8051 Balance Bot Blind Bot Blood Pressure Monitor Bloodshed Dev-C++ 5 Compiler/IDE Breath Alcohol Tester Converters on TI MSP430 CrossStudio MSP430 IDE Design of a Real-Time Digital Guitar Tuner Digital Oscilloscope Digital Stethoscope Digital clock project using PIC16C54A microcontroller Digital thermometer ECG monitoring system GPS Data Logger with Wireless Trigger Handwriting Recognition Systm Home Security System Home energy managment IAR Embedded Workbench IDE INFRARED TRACKING SYSTEM IntelliBOT Laser Communications System Line following van MSP-EXP430FG4618 Development Tool and the eZ430 kits MSP430FG4618 device implement a Buzzer tone generator MSP430FG4618 device implement a Real Time Clock MSP430FG4618 device implement a voltage ramp generator MSP430FG4618 device present a message on the LCD Basic Microcontroller(8051) Lab Mivo- RFID based mobile payment system Multi-Zone Fire Alarm System PC based temperature control PIC 16f877 RPM Meter PIC16C54 dual dice electronic project circuit PIC16F84A digital thermometer microcontroller project PIC16F886 horn driver PWM motor contoller with MSP430 Program Block data transfer in 8051 Program to add two BCD numbers in 8051 Program to check whether a 4th bit of a byte is 1 Program to convert ASCII to hex in 8051 Program to count from 0-9 in 8051 Program to count number of 1's in a given data byte in 8051 Program to divide an 8 bit no by another 8 bit number in 8051 Program to find largest of n numbers in 8051 Program to find the LCM of two numbers in 8051 Program to find the square of an 8 bit number in 8051 Program to generate 50msec delay in 8051 Program to implement BCD counter to count from 0-99 in 8051 Program to implement BCD counter to count from 99-0 in 8051 Program to interchange two blocks of data in 8051 Program to multiply 16 bit number by 8 bit number in 8051 Program to search an element in an array in 8051 Program to sort an array of 10 elements in 8051 Programming the ez430 Proximity Security System RAMP wave in 8051 RC Car Controller RObo Dog Radio-controlled Truck Retina color tracker Robotic Arm Controller with GUI Robotic Car Traction Control Safety-sensor vehicle Security Entrance System Self-Powered Solar Data Logger Snake Arm Ultrasonic Positioning Control System Store FFh if 1 Super Train Controller TI MSP430 Microcontrollers Timers on the MSP430 TouchPad Drawing Board Ultra-Sonic Parking Assistant Ultrasonic Parking Controller Ultrasonic Range finder Voice Activated Alarm Clock Voice Recognition Robotic Car Voting Machine Weather Station Web-Monitored Thermostat Wireless Drawing Device Wireless Telemetry Wireless message Communicator Write a C program to display the code of the key pressed in 8051 Zigbee Wireless Relay Control and Power Monitoring System add two multibyte numbers in 8051 convert a decimal number to hex number in 8051 convert an 8bit Hex number to decimal number in 8051 convert hex number to ASCII number in 8051 eZ430-F2013 Development Tool use SD16_A ADC eZ430-RF2500 Development Tool use ADC10 else store 00 in the same location in 8051 find the GCF of two numbers in 8051 find the average of 10 numbers in 8051 generate Fibonacci series in 8051 metal detector project microcontroller using IAR Embedded Workbench program for Elevator Interface in 8051 program for Stepper motor interface in 8051 spectrum analyser square wave in 8051 triangle wave in 8051 voice recognition security system

Sites U missed

Hint

Open Pictures in new page by right click on it, if it is not shown full image.