You have no items in your shopping cart.

Subtotal: 0.00

How to Interface LEDs with MSP430F5529 MSP430 Development Board

PS Development MSP430 kit

The MSP430 Development kit is specifically designed to help students to master the required skills in the area of embedded systems. This kit designed in such a way that all the possible features of the microcontroller will be easily used by the students. The kit supports with Code Composer Studio v4 and later through USB port.

Texas Instrument Microcontroller, MSP430 Development kit is proposed to smooth the progress of developing and debugging of various designs encompassing of speed 16-bit Microcontrollers. It integrates on board PS2, UART, ADC, PWM, Temperature Sensor, Relay, Buzzer, I2c Seven Segment, I2C Serial EEPROM, I2C RTC, Temperature Sensor LM35, Stepper Motor Driver, Matrix Keypad, Switch, LED, Traffic Light Controller, LCD & GLCD Display to create a stand-alone versatile test platform. User can easily engage in Development in this platform, or use it as reference to application primer.

LED (Light Emitting Diodes)

Light Emitting Diodes (LED) is the most commonly used one components, usually to display the pins digital states. Typical uses of LEDs include timers, alarm devices & confirmation of user input such as a keystroke or mouse click.

Interfacing LED with MSP430F5529

Figure shows how to interface the LED to microcontroller. As you can see the Cathode is connected through a resistor to GND & the Anode is connected to the Microcontroller pin. So when the Port Pin is HIGH the LED is ON & when the Port Pin is LOW the LED is turned OFF.



The MSP430 Development kit has eight numbers of LEDs, connected with the following lines

  • MSB P6.7 P6.6 P6.5 P6.4
  • LSB P7.7 P7.6 P7.5 P7.4



Pin Assignment with MSP430F5529



 

LEDs

MSP430F5529 Lines

LED Selection

DIGITAL OUTPUTS

LED8

P6.7

LED7

P6.6

LED6

P6.5

LED5

P6.4

LED4

P7.7

LED3

P7.6

LED2

P7.5

LED1

P7.4

 



Circuit Diagram to Interface LED with MSP430F5529





C Program to ON and OFF LED using MSP430F5529

***************************************************************************************

Title : Program for ON & OFF LEDs

***************************************************************************************

#include 

#include 

#define LED 4

#define Switch 24

#define DEBUG 0 void MSP430F5529_Clock_Init();

void DelayMs(int Ms);

int main(void)

{

WDTCTL = WDTPW + WDTHOLD;

// Stop watchdog timer P6DIR |= 0xF0;

// Set P6.4-P6.7 to Output direction P7DIR |= 0xF0;

// Set P7.4-P7.7 to Output direction

while(1)

{

P6OUT = 0x00;

P7OUT = 0x00;

DelayMs(1000);

P6OUT = 0xF0;

P7OUT = 0xF0;

DelayMs(1000);

}

}

void DelayMs(int Ms)

{

int i; while(Ms>0)

{

for(i=0;i<104;i++);

Ms--;

}

}