Other Parts Discussed in Thread: MSP-EXP430G2ET
Tool/software:
I have the MSP430G22553, to be precise, I have bought the MSP-EXP430G2ET development kit. I have tested the code that I will leave below. This code is for using PWM to control the LEDs on the development kit, and it works for the red and blue LEDs, but the green one is not working. After several tests, I still don't know how to make it work and how to use PWM on all three LEDs at the same time to show different types of light or colors. While doing some tests, I accidentally burned the green LED on the board, so I bought another complete kit, and I am sure this one is working properly. I'm looking forward to a solution because I'm getting desperate with this.
#include <msp430.h>
int main(){
WDTCTL = WDTPW | WDTHOLD
P1SEL |= BIT6
P1DIR |= BIT6
TA0CCTL1 |= OUTMOD_6;
TACTL = TASSEL_2 + MC_1;
CCR0 = 30000;
CCR1 = 0;
_BIS_SR(GIE);
while(1){
if((P2IN & BIT0) !=0){
CCR1 + CCR1+ 3000;
_delay_cycles(150000);
}
if(CCR1>30000)
}
CCR1=0;
}
}
}