I am trying to create a continuous pwm waveform by setting an output pin high then low for specific time periods. Yes, I know there is a PIC12F683 that would do this for me using onboard hardware pwm. However, my p.c. boards are designed for the 12F629 which is absent this feature.
I want a 5000 hz pwm frequency, and to run for 40 seconds. This should equate to 200,000 cycles. My code is designed to count this many cycles and then stop. However, when testing the actual hardware the run time is about 93 seconds. This is an huge error so something is seriously wrong.
I will post the code when I figure out how to do that (It's very short). In the meantime looking for troubleshooting ideas.
Bookmarks