- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi guys,
Something which I have wished for a couple of times is a logic function which converts an edge into a pulse.
This block could be very simple, taking one input (the edges) and one clock, which defines the length of the output pulse.
When the block sees an edge (can be configured to detect rising, falling or either), it outputs a pulse which lasts as long as one clock cycle.
Many thanks
Hugo Elias
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think you could do this with a timer. Just set it to single shot, 1 cycle, and start it with your signal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What will happen on the next edge? Wouldn't the timer need resetting?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Hugo Elias,
What should be the duration of the pulse you need on every clock edge?
Regards,
dasg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Hugo,
This requirement can be easily met with the use of a Timer Component available in PSoC3/5.
An example project is created which gives a pulse of 1ms upon falling egde on Trigger.
1) Timer Component is chosen with Resolution of 8-bit which is implemented in UDB. The period is set to 1ms with 1 PWM output.
2) The Run Mode is set to "One Shot with Multi Trigger" and the "Trigger Mode" is set to "Falling Edge". One shot with Multi Trigger will result in a pulse output on every falling edge on the trigger input. This is similar to a Monostable Multivibrator.
3) Pin is connected to the Trigger terminal of the Timer. Clock of 100KHz is used. The PWM output is connected to an output pin.
4) In this case, since the trigger is on Falling Edge, the Trigger_in is set to resistive Pull-Up.
5) The oscilloscope snap-shot is also shown below.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4) The Trigger_in pin is set to Resistive Pull-up mode as the trigger is Falling edge.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The project is attached in the previous post.