Looks like i need some sort of background interrupt on pin change driven service measuring the length of the incomming pulses and updating a variable with the pulse length.
The main program needs to look at this variable and then caluclate the length of the pulse it needs to sends out.
Once that pulse has been sent it then looks again at the length variable and adjusts itself accordingly as the incomming pulse freq changes.
A divide by 2 logic device might do the trick if i opt for a 50% reduction in frequency vbut how to do that with a pic?




Bookmarks