Forum Replies Created
-
AuthorPosts
-
ShubhamParticipant
Hi Ligo,
I have generated these two waves having different duty cycle.. but i want to general a delay of 10us between the start time of the two waves. i have tried to do it by delay function but it is not working. can you suggest me a method. the link you provided was not useful as it was difficult to interpret. can you help me by looking out this code?void main(void) { TRISC2_bit=0; PORTC=0; PWM1_Init(8000); PWM2_Init(8000); while(1) { PWM1_Start(); PWM1_Set_Duty(2.04); Delay_us(10); PWM2_Start(); PWM2_Set_Duty(32.64); } }
ShubhamParticipantHi Ligo
i want a generate a pulse with 1 uS ON time. the total time period is 255 uS. the duty cycle for this wave is 0.003984. but when i try to stimulate it in proteus the ON period comes out to be 0.1 uS. the code which i have written is as follows:
void main(void)
{
TRISC2_bit=0;
PWM1_Init(3920);
PWM1_Start();
while(1)
{
PWM1_Set_Duty(0.09996);
}
}please help me out as i m novice in using PIC Microcontroller.
-
AuthorPosts