Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 225244

Forum Post: msp430f5438 timea

$
0
0

hello ,I have some qustions about time_a; I want to get led to taggle state  all times;while the led is on all times

program is as follow,I hope someone can help me solove this problem out.

void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
P10DIR |= 0xC0;
// TA1CCTL0 = CCIE;
P10OUT= 0xFF;
// TA1CCR0 =0;
TA1CTL = TASSEL_2+ MC_2 +TAIE+TACLR; // SMCLK, contmode, clear TAR
__bis_SR_register(LPM0_bits + GIE); // Enter LPM0, enable interrupts
__no_operation(); // For debugger
while(1);
}

// Timer A0 interrupt service routine
#pragma vector=TIMER1_A1_VECTOR
__interrupt void TIMER1_A1_ISR(void)
{
P10OUT^=0x80;

}


Viewing all articles
Browse latest Browse all 225244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>