Jump to content
43oh

chulen

Members
  • Content Count

    3
  • Joined

  • Last visited

Everything posted by chulen

  1. Hi again. I'm having trouble with my MSP430G2553, as I want to have 6 different outputs. They all have to work at the same frequency, but the times at which they are on are different. For instance, what I want is described in the attachment. Is this possible? I have read that there are three registers for Timer A, but I have read that there are more timers such as Timer A1, and Timer B. Can I use these? If not, is there any possible way to get six signals out of the MSP? Thanks a lot for your time.
  2. Hi all, this is my first post in this forum. I am new to C programming and I managed to produce a variable frequency - variable duty cycle. I did it with the following code. #include void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop WDT BCSCTL1 = CALBC1_16MHZ; // Set DCO to 16MHz DCOCTL = CALDCO_16MHZ; P1DIR |= BIT2; // P1.2 to output P1SEL |= BIT2; // P1.2 to TA0.1 CCR0 = 16-1; // PWM Period CCTL1 = OUTMOD_7; // CCR1 reset/set CCR1 = 1; // CCR1 PWM duty cycle TACTL = TASSEL_2 + MC_1; // SMCLK, up mode _B
×
×
  • Create New...