- This topic has 2 replies, 2 voices, and was last updated 9 years ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
|
Microcontroller › AVR › frequency variated 24-2 pulse genration
hello
i am giving a frequency variated pulse train on particular pin as input and i want a 22 pulse then 2 missing pulses as output at another pin.if i vary the frequncy of input pulse signal then frequency of output should be variy.please give your ideas and views asap.
thanks
Hey lovely,
As my thinking you can count the incoming high or low pulse and mesure the duration of high or low pulse.Based on duration you can generate another pulse at output pin. Use the external interrupt for counting pulse and time. Suppose if high pulse coming in external interrupt pin then jump in ISR and count the pulse and start timer to calculate duration of high pulse and return back.Do same for measure low pulse duration.After counting and Same time based on duration of incoming pulse generate outgoing pulse.
I hope it should be work and as my understanding you want to generate 22 pulse at output pin and want to skip next two pulse and again repeated.Clear about this point so i can help you.
thanks vara ashishkumar.
now its frequency is varying with external Frequency signal, but i cant stop the counter, i.e i am facing problem in making missing 2 pulses after counting 22.