Hi all,
Im sort of new to PBP, previously I have been playing with picaxes..
I am trying to design a project that will multiply pulses, but the input pulses are at a variable frequency. Therefore it would need to time the pulse lengths in the background, and send 8 pulses in the "low" section of the input pulse,
for example the input would be:
_____|ˉˉ|_________________________________________ __|ˉˉ|__
and the output i require would be
_____|ˉˉ|__|ˉˉ|__|ˉˉ|__|ˉˉ|__|ˉˉ|__|ˉˉ|__|ˉˉ|__|ˉˉ |__
ie 8 pulses on the output in the time between each pulse on the input.
I have played around with pulsin and rc time, but it doesnt do what i want it to do due to the variable frequency of the input pulses.. The pic will sometimes skip the next input cycle just after it finishes sending out the pulse s.
The basic code I was using and got reasonable results but still not right was adding rctime for low and high, dividing by 16, and pulseout the value on two pins alternatively (one dummy pin to time the low cycle) however the next cycle would be incorrect because it skips one input cycle, and measures the pulse on the next.
Does anyone have any hints / suggestions etc on of / how it would be possible to output the 8 pulses evenly in the low cycle between the input at 50% duty cycle, but at teh same time, measure the low cycle of the input pulses?
Bookmarks