Currently using a 16F886 with any internal or external OSC setting. I am flexible there. I need to read in a square wave that is 300Hz. Based on the incoming duty cycle I need to output a frequency that varies from 0-1500hz and keeping the duty cycle at 50%. What I am doing is trying to fool an electric motor controller into thinking there is a motor connected to it. The controller outputs a PWM for the speed and uses feedback based on a 1500ppr encoder to control the speed. So I want to make a feedback simulator in essence. On the board I have rigged up a couple flip flops so I can divide the frequency out of the PortC.2 by 2,4,8,16 if needed.
Using the Mister E Pic calculator is looks like if I go the CCP route I am going to have to change pre-scalers and the duty cycle on the fly. Will using HPWM be ok for this? I am going to give that route a go first but looking for some input.
Thanks in advance.
Bookmarks