Greetings,
If Your spare led is glowing on direct connection this means only two things
1. Your program is working.
2. your Led is faulty or you are connecting jumpers wrong way.
Check jumpers they must be connected as in image :-
**broken link removed**
Try Green Led too:
Code:
#include <msp430.h>
#define P0 BIT0 // Red LED
[COLOR=#00ff00]#define P6 BIT6[/COLOR]
void Delay_ms(unsigned int ms);
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Set WDT to stop
[COLOR=#4B0082]P1DIR |= 0x41; [/COLOR]// Set direction of the LED
while(1){
[COLOR=#FF0000]P1OUT ^= P0|P6; [/COLOR]// Toggle P1
Delay_ms(500); // Delay for 500 milliseconds
}
}
void Delay_ms(unsigned int ms)
{
while(ms--)
{
__delay_cycles(1000);
}
}
On the second thought, after reading your last comment again I seriously doubt that you have connected your jumpers wrong way.
1. Remove both the led jumpers
2. Take a spare wire, tie its one end to the P1.0(LED1) pin and the other in between the two resistors and touch it to one of the resistor soldered side.
3. If it still does not glows then touch wire directly to the led1 / led2(in this case touch wire to the left of the led i.e. not in between leds) (
Do not make contact for long time as it may get burn).
Bad Luck Case Scenario- If this works Your resistor are faulty(Bad Luck :arrow
and if it doesn't (Bad Luck again :evil
Time to change Led's.
P.S. - Try connecting wire to the bottom pin of your LED jumper. If this works your jumper is faulty.
Good Luck ;-)