Other Parts Discussed in Thread: MSP430F149
Tool/software: TI C/C++ Compiler
MSP430f149 issue with pulse pack
Dear friends,
Please help me with this issue: I've tried to get pulse pack from 1.5 pin MSP430f149.
I need to generate pulse packs with frequency: 40 000 Hz from TA0. But I can't do it. I get only pulses.
How to make the delay of the timer? I need it for ultrasonic receiver/sender. Pulse pack need to excite the ultrasonic sensor and pause - to receive the signal input.
If I use only pin 1.5(TA0) may I use CCR1 to make the PWM?
How to make the PWM?
Please, anybody, help me with this issue.
void timerA_PWM()
{
TACCR0=18;
TACCR1=10;
TACCTL1=OUTMOD_7;
TACTL=TASSEL_2 +MC_1;
}
void timerA_pause()
{
TACCR0 = 12000-1;
TACCTL0 = CCIE;
TACTL = MC_1|ID_3|TASSEL_1|TACLR;
}
#pragma vector = TIMERA0_VECTOR
__interrupt void TIMERA0_VECTOR_ISR(void)
{
timerA_PWM();
_delay_cycles(1000);
timerA_pause();
}