Pages

8051 Microcontroller Based DC Motor Control





SOURCE CODE:   used Ride compiler


 #include<reg51.h>
        
   sbit sw1=P2^0;
    sbit sw2=P2^1;
        
  sbit  L293D_A = P1^0;             //Make positive of motor 1
    sbit    L293D_B = P1^1;             //Make negative of motor 0
     sbit   L293D_E = P1^2;             //Enable L293D



void rotate_f(void);         //Forward run funtion
void rotate_b(void);         //Backward run function
void breaks(void);           //Motor stop function
void delay(void);            //Some delay

void main(){ 
P2=0xFF;
P1=0x00;
                //Our main function
    while(1){                //Infinite loop
                              
                             
               if(sw1==1 && sw2==0)
               {
                rotate_f();          //Run forward
                delay();             //Some delay
                breaks();            //Stop
                delay();             //Some delay
                }
                
                if(sw2==1 && sw1==0)
                {
                rotate_b();          //Run Backwards
                delay();             //Some delay
                breaks();            //Stop
                delay();             //Some delay
               }                 //Do this infinitely
}
}

void rotate_f(){
        L293D_A = 1;             //Make positive of motor 1
        L293D_B = 0;             //Make negative of motor 0
        L293D_E = 1;             //Enable L293D
}

void rotate_b(){
        L293D_A = 0;             //Make positive of motor 0
        L293D_B = 1;             //Make negative of motor 1
        L293D_E = 1;             //Enable L293D
}

void breaks(){
        L293D_A = 0;             //Make positive of motor 0
        L293D_B = 0;             //Make negative of motor 0
        L293D_E = 0;             //Disable L293D
}

void delay(){                //Some delay...
    unsigned char i,j,k;
    for(i=0;i<0x20;i++)
        for(j=0;j<255;j++)
                for(k=0;k<255;k++);

    }


PIC16F886 horn driver

A very interesting horn driver project presented by Microchip technology is presented in this circuit diagram . This horn driver project is based on PIC16F886 microcontroller , from Microchip . This microcontroller horn driver circuit diagram is very simple and require few external components . The PIC MCU has peripheral resources within the device to provide horn driver services in a very simple manner.

The PIC MCU peripherals include the Enhanced CCP (ECCP) module in Pulse-Width Modulation (PWM) Half-Bridge mode to drive the 2 horn drive leads and a single ADC input to monitor the horn feedback after it has been conditioned.

Horn characteristics are required to determine the defined parameters for the range of the PWM module.


For example , a horn with a resonant frequency of 3.5 kHz ± 0.5 kHz; the PWM module generates a PWM frequency output from 3 kHz to 4 kHz with 50% duty cycle.

With a device that is running off of the internal oscillator at 8 MHz, the clock source to Timer2 that drives the PWM period generates 2M clocks per second. For a 3 kHz period, this is 667 clocks per cycle, and for a 4 kHz period, this is 500 clocks per cycle. Because Timer2 is an 8-bit timer, accepting only a maximum value of 255, these clocks per cycle must be divided (a prescaler of divide-by-4, yielding 166 clocks per cycle for 3 kHz, and 125 clocks per cycle for 4 kHz) .


The PWM output driven by the ECCP module in Half-Bridge mode, with both the P1A and P1B outputs active-high, will step through the 125 through 166 clocks per cycle periods at a period rate, and as the Period register is loaded, the value will be dividedby- 2 and loaded into the Duty Cycle register for a 50% duty cycle. This will become the new PWM period for measuring the feedback from the horn driver, and drives the transistor that raises the level that the horn lead sees, to 9V.
Software for this project was developed by Bill Anderson , Microchip Technology Inc..


You can download the software for the PIC16F886 horn driver following this link : PIC16F886 horn driver.



PIC16F886 horn driver schematic circuit

Digital clock project using PIC16C54A microcontroller

Using microcontrollers you can design many interesting and useful electronic projects . This electronic project circuit is based on PIC16C622 microcontroller ( manufactured by Microchip ) . This PIC project is a simple resistance and capacitance “Pic Meter” which can measure resistance in the range 1W to 999W and capacitance from 1 nF to 999 nF.

This PIC METER uses a variation of the single-slope integrating converter.
All measured data are transmitted to a PC which displays the value measured.


This Pic Meter project is powered directly from the RS-232 serial port ,the RTS and DTR lines from the serial port output 3V to 11V to the PIC METER. The diodes D2 and D3 prevent any damage to the PC’s serial port.


Resistor R10 is used to current limit the Zener diode, D4. D4 is used to regulate the RTS and DTR voltage to 5.6V. Capacitors C3 and C4 provide power supply filtering to the Zener diode and the PIC16C622. Using this type of powering source for the PIC Meter will not damage the RS232 port , because this project has an very low current consumption of 7mA.

S1switch is used to select either a resistor or capacitor measurement. RB5 of the PIC16C622 is used to detect what type of component is being measured.


Resistor measurements that are started without any component connected to the measuring terminals will cause an error. Capacitor measurements without a component connected to the measuring terminals will give a result of 0 pF.

Switch S2 is used to initiate a measurement. The switch is connected to RB6 of the PIC16C622 and the
PORTB wake-up on change interrupt is used to detect a key press.


The charge time of the unknown RC network is measured using Timer0 , measured value is multiplied by the known value of resistance or capacitance and stored in an accumulator. Then the charge time of the known RC network is measured. The accumulator is divided by the known RC network charge time to give the value of resistance or capacitance of the unknown component.


This software and project was designed by Rodger Richey from Microchip Technology Inc.


You can download the software for this project from the Microchip website or following this link .Pic meter pic16c22 source code


 simple Pic meter schematic circuit diagram using pic16c22 microcontroller

PIC16F84A digital thermometer microcontroller project

You can measure temperature using various methods like : analog circuits , digital circuits or some other methods . This electronic project is a very simple thermometer that is based on the PIC16F84A microcontroller , designed by Microchip .

Why to use a thermometer that is designed using a microcontroller and not a classic analog thermometer ? because you can design a complex solution using few external components , resulting an low cost application that provide a high precision measurement .

This microcontroller project use watchdog timer function to measure temperature . The WDT on all PICmicro microcontrollers has a nominal time-out period of 18 ms. The WDT time-out period varies with temperature, VDD and part-to-part process variations. Without using a separate temperature sensor, it is possible to calculate the temperature with reasonable accuracy using the WDT time-out period.


To translate the environment temperature into an actual reading, the system must be able to do the following:
• Provide a method for establishing time-out to temperature calibration
• Count the number of WDT time-outs for a given period of time
• Equate the number of time-outs to a temperature

The system design also includes wake-on-interrupt key scanning and temperature display.
The circuit diagram is built around a PIC16F84A microcontroller, three seven segment
LEDs to display temperature. The common anode of each LCD is connected to PORTA<2:0> through PNP transistors, which are used to source the current for each digit. The entire device operates on a single 9V battery.

The PIC16F84A microcontroller is normally in SLEEP mode, consuming
very little operating current but if any key is pressed, it ‘wakes up’ from SLEEP and updates the WDT count, and checks for additional key presses. If there are none, it returns to SLEEP mode.
The WDT Thermometer has three distinct operating modes:
SLEEP Mode: This is the default mode the system starts in when power is applied .
Display Mode: When the TEMP key is pressed, the system wakes up and the LEDs show the temperature
in degrees Centigrade.
Calibration Mode: This mode creates a set of new calibration values, in addition to those present in the firmware.
To calibrate the device you must to :
1. Place the system in the temperature forcing system at the higher of the two calibration temperatures, and wait 5 minutes for the temperature to stabilize.
2. Press and hold the SET key while applying power to the system.
3. Press either the UP or DOWN key to increase or decrease the displayed temperature setting by one degree to match the actual temperature.
4. Press the SET key. The new high temperature calibration is stored in data EEPROM.
5. Change the temperature of the forcing system to the low calibration temperature (allow 5 minutes for the temperature to stabilize).
6. Press either the UP or DOWN key to increase or decrease the displayed temperature setting by one degree to match the current temperature.
7. Press the SET key. The new low temperature calibration is stored in data EEPROM, and the firmware sets a flag (Default) to indicate that new calibration information is available.
8. To return to the preprogrammed calibration at any time during this process, press the TEMP key.
This project ( hardware and software ) was designed by Leena Chaudhari from Microchip Technology Inc.


You can download source code for this PIC16F84A project by following this link


PIC16F84A digital thermometer electronic microcontroller project



PWM motor contoller with MSP430

A very simple and useful PWM dc motor controller circuit can be constructed using MSP430 integrated circuit manufactured by Texas Instruments.

Many of the MSP430 microcontrollers have either the Timer_A module or the Timer_A and Timer_B modules included in them. These modules contain a 16-bit counter that can be incremented from a number of clock sources. They can even count in low power modes. These timers also have a number of capture/compare registers that lend themselves to a variety of applications. One of these applications is the automatic generation of a PWM output to control a DC motor.

The circuit operates by polling the two push button input pins and either incrementing or decrementing the Timer_A capture/compare register CCR1, when either of the inputs is at a logic low state. The software checks the value of the register to ensure that it does

not exceed the minimum or maximum values the register will hold, and thereby prevents it from rolling over. Timer_A is configured in UP-mode with MCLK as timer clock source and output unit Out1 in output mode 7 to produce a PWM square wave output on P1.2/TA1.


The CCR0 value is set to 255 to define Timer_A to count up to 256 counts (8 bits).
Changing the value in CCR1 varies the duty cycle of the PWM signal produced by Timer_A. The PWM signal is used to switch a Darlington transistor. The transistor in turn powers the DC motor. As the PWM duty cycle varies, the average power to the motor also changes.


This change in average power is what controls the speed of the motor. The motor speed is variable in 256 steps from 0 to maximum. The DCO is set to approximately 5MHz to achieve a PWM frequency around 20KHz thereby allowing the motor to run without producing any audible PWM noise.


The TI TPS77133 shown in the circuit provides both the regulated VCC to the MSP430 and a power on reset signal to control the reset input of the MSP430. The TPS77233 can be used if the supply voltage supervisor (power good) function is required. The code is written in assembly language using the IAR Kickstart integrated development environment.

Download Programming code for pwm motor control with msp430

pwm dc motor control using msp430 microcontroller

PIC16C54 dual dice electronic project circuit

An electronic dice project circuit can be designed in various modes , using logic circuit or using microcontrollers . This electronic project is based on the PIC16C54 microcontroller , manufactured by Microchip . This project is a simple dual dice electronic project , that use few external electronic parts and LED displays , to generate ( simulate ) dices .

As you can see in the schematic circuit , the main advantage of this electronic dice project is that this circuit require few external electronic parts ( like many of the microcontroller based projects ) .

The circuit needs to be powered from a 5 volts DC power supply circuit , but you can use a 9 volts battery and a 5 volt three terminal regulator ( connected like in this circuit diagram ) .

There are two I/O ports in the 16C54; one 8 bit & the other 4 bit. The 8 bit port, Port B, is connected to the 7 segment display. Three pins of the 4 bit Port A are used and the other pin is tied high. Pin 4 of the PIC is also tied high to give a power-on reset.


A 150R resistor acts as a current limiting resistor for each display. PIC ports have a maximum sourcing current of 40mA ( the maximum current for the LED display is 200mA so it is the PIC that R1 is protecting, not the display.)

The PIC uses its internal RC clock oscillator option (with the 10K resistor, R3, and the 330pF capacitor, C2) and runs at about 330kHz. The switch is connected to input RA0. Normally this line is pulled high via R4 to +5V, but when the switch is closed the input is pulled low. The software detects the falling edge as a dice roll.

PIC16C54 microcontroller dual dice electronic project circuit

You can download souce code for this electronic project following this link

PIC12F683 microcontroller based metal detector

The metal detector project is designed using PIC12F683 microcontroller.

The circuit schematic is shown below


The source code for this project is shown below


/*
 *******************************************************************************
 * PIC12F683 microcontroller based metal detector
 *******************************************************************************
 *
 * 
 *
 * source code for mikroC PRO compiler V1.65
 * feel free to use this code at your own risks
 *
 * target : PIC12, oscillator in HS mode, watchdog enabled
 *
 * PIC PIN Assignemnt :
 *
 * GP0 : detect LED indicator
 * GP1 : calibrate LED indicator
 * GP2 : NC
 * GP3 : NC
 * GP4, GP5 : inductor
 *
 *******************************************************************************
 */

#define MAXTRY 15       // number of watchdog restart to calibrate loop counter

unsigned char   ctr ;           // number of loops between two watchdog resets
unsigned char   previous ;      // previous value of ctr
unsigned char   calibr ;        // calibration value when oscillator runs free
unsigned char   restarts ;      // number of watchdog restarts
unsigned char   en ;            // enable flag, allows detection

/*
 * main loop
 */
void    main()
        {
        unsigned char   i ;
        

        /*
         * configure GPIO as digital port
         */
        CMCON0 = 7 ;
        ANSEL = 0 ;
        TRISIO = 0 ;
        GPIO = 0 ;

        /*
         * power up ?
         */
        if(STATUS.NOT_TO)
                {
                /*
                 * yes, init variables
                 */
                restarts = 0 ;
                calibr = 1 ;
                }

        /*
         * watchdog reset counter
         */
        if(restarts < 255) restarts++ ;

        /*
         * if counter differs too much from calibration value
         */
        if((previous ^ ctr) > calibr)
                {
                /*
                 * turn detect LED on
                 */
                GPIO.F0 = en ;
                
                /*
                 * if not on power up
                 */
                if(STATUS.NOT_TO == 0)
                        {
                        /*
                         * while in calibration mode
                         */
                        if(restarts < MAXTRY)
                                {
                                /*
                                 * shift calibration value
                                 * and wait a little bit
                                 */
                                calibr <<= 1 ;
                                Delay_ms(5) ;
                                }
                        }
                else
                        {
                        /*
                         * turn detect LED off
                         */
                        GPIO.F0 = 0 ;
                        }
                }

        /*
         * save last counter
         */
        previous = ctr ;

        /*
         * is calibration over ?
         */
        if(restarts > MAXTRY)
                {
                /*
                 * yes, turn calibrate LED off
                 * and set enable flag
                 */
                GPIO.F1 = 0 ;
                en = 1 ;
                }
        else
                {
                /*
                 * no, turn calibrate LED on
                 * and clear enable flag
                 */
                GPIO.F1 = 1 ;
                en = 0 ;
                }

        /*
         * set watchdog prescaler
         */
        OPTION_REG = 0b11111001 ;
        
        /*
         * start counter, to be interrupted by watchdog
         */
        ctr = 0 ;
        for(;;)
               {
               ctr++ ;
               }
        }



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

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.