hi all.i want to send the 120khz with 50% duty cycle pwm signal only for 1ms.how can i do it.i'm using pic16f877a.the following code show how the pic generate the pwm signal:
define osc 8
TRISC = 0 'PORTC all outputs
main:
PR2 = 15 'Load Period Register
CCPR1L = 8 'Set 50% duty cycle
CCP1CON = %1100 'PWM mode
T2CON.2 = 1 'Start TIMER2
goto main
i only want my pic inject the pwm signal for only 1ms...please help me...