Microcontroller › 8051 › How to control a PWM signal with counters in 8051 › Yes PWM is generated using
Yes PWM is generated using timers, and i'm getting the output of it,which i'm generating in different port.
Now I have taken a seperate I/O port, where i'm getting the signal high and low, now my question is
how to control this signal for particular count/timer period[say for about maximum 5 to 10 minutes the
signal should be high and next it should be low]
Here is the part of the code:
sbit CLOCK = P2^3;
unsigned char check = 1;
void timer1_ISR`(void)
{
//timer tick functions
if(check == 0)
{
CLOCK = 0;//getting a low signal
}
else
{
CLOCK = ! CLOCK;//toggling high& low
}
}
I'm checking this in the isr routine.
Hope I have not confused, please let me know where i'm going wrong.