Posted: Sun Jul 13, 2014 8:48 pm Post subject: Pwm on tiny13
Hi
I want to generate 20khz of pwm on the pwm outputs of tiny but with a 10ms gape between the two signals, Is it possible with interrupt or the only option is WAITMS command.
This is my new code with 10 element table as tiny13 has no other timer to interrupt and pick a value from the table this is why I am doing it with waitms command dividing the 10ms time for each half cycle equally in 10 segments. but I am not getting sine wave on my Proteus Oscilloscope I suspect I am missing a suitable filter on the out put but then what should be the values of filter elements to filter out the unwanted harmonics.
hi
you can try with rc filter Res 10K and cap 0.1uF on both pwm output
use channel A and B in proteus
on A channel select A+B then you see if its more like sinus
_________________ / Kim
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum