coffeeCupPepsi
Junior Member level 2
PWM sync
Hi!
I'm using a 16f88.
How can I sync to the PWM? i.e. can I know in software when the PWM cycle starts/ends?
I need to 'switch' the path of the PWM on alternate pulses, I'll use another digital output to control the path of the PWM via NAND gates.
I know there are other PICs with two or more PWM output pins, but I want to use my 16f88, and besides i need the pulses to alternate, so even if i had two PWMs i still need to know in software the start/end of cycle in order to sync them...
it could be as easy as just cheking a flag in some register, but i can't find it in the data sheet.
could i set an interrupt when tmr2 reaches 0 ? would this affect the opperation of PWM?
Thanks in advance this is my first post.
Hi!
I'm using a 16f88.
How can I sync to the PWM? i.e. can I know in software when the PWM cycle starts/ends?
I need to 'switch' the path of the PWM on alternate pulses, I'll use another digital output to control the path of the PWM via NAND gates.
I know there are other PICs with two or more PWM output pins, but I want to use my 16f88, and besides i need the pulses to alternate, so even if i had two PWMs i still need to know in software the start/end of cycle in order to sync them...
it could be as easy as just cheking a flag in some register, but i can't find it in the data sheet.
could i set an interrupt when tmr2 reaches 0 ? would this affect the opperation of PWM?
Thanks in advance this is my first post.