I have a 5 ns pulse width High coming out of a comparator that is asynchronous. I am attempting to count this pulse. My current microcontroller (dsPIC33FJ) has an asynchronous counter on board, with a min spec of at least 10 ns pulse width High.

What are my options to lengthen/elongate this 5 ns pulse so it can be read by the counter? I am open to switching to a different microcontroller or using a more qualified front end counter, but I would prefer to use passive/simple circuitry instead. Is this possible?

What I have researched so far:

  1. I have tried tying a .1uF capacitor to between the output signal and ground in hopes that the discharge would slow it down, but all that did was heavily distort the signal. May I use a way lower value?

  2. I researched sample and hold IC's, but the shortest acquisition time I could find is around 200 ns which is not suitable for my application.

  • \$\begingroup\$ Nyquist says you need at least a 400MHz sampling clock to theoretically catch a 5ns duration event... if I remember / calculated correctly \$\endgroup\$
    – vicatcu
    Commented Oct 31, 2012 at 16:10
  • 7
    \$\begingroup\$ Nyquist has nothing to do with this. There's no question of reproducing an analog signal from discrete time samples here. \$\endgroup\$
    – The Photon
    Commented Oct 31, 2012 at 16:16
  • 3
    \$\begingroup\$ How quickly can the pulse repeat and you'll still have to count it as separate pulses? If it's long enough, you could try SN74LVC1G123 (ti.com/product/sn74lvc1g123). \$\endgroup\$
    – The Photon
    Commented Oct 31, 2012 at 16:23
  • 2
    \$\begingroup\$ Check out this EE Times article: Fast, simple one-shot pulse stretcher detects nanosecond events. There are fast comparators with a latch function, which can be used for pulse stretching. \$\endgroup\$ Commented Oct 31, 2012 at 20:11

5 Answers 5


A retriggerable monostable multivibrator such as 74LV123 would meet your requirements well:

  • Minimum pulse width 3.0 ns for 3 volt operation, 2.5 ns at 5 volts.
  • Output pulse width configured by external R/C, typically 470 microseconds
  • Retrigger time 45 ns (3 volts) to 40 ns (5 volts).

It is a standard logic IC, very little complexity, and there are two monostables in the package in case you need to stretch another pulse source.

The part is available in DIP as well as TSSOP, so breadboard and production options.

Hope this helped.


Here is a simple positive pulse stretcher with some conditions:

The gain of the transistor will make the output rise quickly, but then it will decay back to ground according to the RC time constant, which is 47 ns in this example.

One of the problems is that you may not be able to tolerate the B-E voltage drop. If the PIC input requires 80% of Vdd for a guaranteed high and the processor is running from 3.3 V, then OUT must be above 2.6 V to be interpreted as a high. However, if IN is also a 3.3 V logic signal and assuming 700 mV B-E drop, then OUT only ever gets up to 2.6 V in the first place.

This circuit may still be usable if the PIC minimum logic high threshold is lower or IN is a higher voltage. Some inputs on some 33F parts are 5 V tolerant. If you can arrange IN to be a 5 V logic signal and use a 5 V tolerant input, you will have enough margin for the time constant to keep the line high for longer than the pulse.

If OUT can somehow be guaranteed to go to 3.3 V at the peak of the pulse and the guaranteed logic high input of the PIC is 2.6 V, then this circuit will stretch the pulse by about 1/2 time constant, or about 24 ns in this example.

  • \$\begingroup\$ Why not use an opamp instead of the transistor so the B-E voltage drop won't be an issue? \$\endgroup\$
    – Joel B
    Commented Oct 31, 2012 at 17:01
  • 2
    \$\begingroup\$ An opamp may not be fast enough. They especially dislike step inputs. \$\endgroup\$
    – gbarry
    Commented Oct 31, 2012 at 17:54

How frequently are you getting pulses? Can your counter count both rising and falling edges instead of pulses?

If the pulses are not very frequent then run you pulse into the clock input of a T-Flip-Flop. Every time you get a pulse the TFF output will toggle, creating an edge. The pulses have to be far enough apart so that the MCU has time to register the edge before the next one comes in.

If you MCU can't work off of both rising and falling edges then you might be able to use two counters (one rising edge, one falling edge), or even just accept that you can only count every two pulses.


A programmable delay line should do what you're after. It will stretch your 5 ns pulse anywhere between 5 ns and 500 ns. That one above is out of stock at DigiKey but the datasheet is a good read to show you the theory. Here's one from Linear that is in stock and should do what you hope.

  • \$\begingroup\$ The "Minimum recognized pulse width" for that Linear part is 5 ns typical, with no min or max specified. I wouldn't actually use this for a 5 ns pulse since there is basically no margin for error and probably won't work over PVT. \$\endgroup\$
    – user3624
    Commented Oct 31, 2012 at 18:01
  • \$\begingroup\$ The Dallas Semi part has a minimum pulse width of 5 ns (a minimum minimum, not typ min like Linear Tech), which makes it better than the Linear part but may or may not work depending on what exactly the OP needs. \$\endgroup\$
    – user3624
    Commented Oct 31, 2012 at 18:05
  • \$\begingroup\$ The DS1040 looks good, but like David said the min pulse of 5ns makes me a little uncomfortable. I have seen the pulse range from 4-7 ns. As for the frequency of the pulses, they could be separated by a length as short as 5 ns (although unlikely). I would like to capture as many pulses as possible to ensure a more accurate signal/count. The Linear Tech you linked looks like it has a min of 1000 ns. \$\endgroup\$
    – Cameron
    Commented Oct 31, 2012 at 22:10

Here is a very simple pulse stretcher. Can use the NC7SZ58P6X Universal logic gate to implement the OR gate. Spec sheet shows a 4.3nS max propagation delay at 5v.


simulate this circuit – Schematic created using CircuitLab


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.