In an eight bit register I’m turning ON a bit 100 times & the other 155 balance I’m turning OFF.
So how can I tell this as a percentage I mean the duty cycle?
Yes. I assume you are using a PIC (From your other posts). The PWM frequency depends on the PICs clock frequency and the values in the PR2 and T2CON registers. From a datasheet:
PWM period = [(PR2) + 1] * 4 * TOSC * (TMR2 prescale value)
PWM frequency = 1 / PWM period.
But in my application i'm not using any Timers its just a basic software type one.Incrementing a register 100 times while the bit is turned ON & the other balance counting upto 256 while the bit turns OFF.
My XT is 4mhz.In this situation how to tell the frequency?