Feasibility for fractional duty cycle 2MHz PWM

I require very short on times (1 to 10 NANO-seconds) as a minimum range.
1-2 MHz max speeds, so that equates to .1-.2% duty cycles. Just inquiring
if the mighty Arduino can handle these speeds and duty cycles. TI has no
definite answers for me, but the Arduino folks seem to be more flexible
and the devices easier to program.
TOTAL NOOB in the MCU arena, but long time electrical tinkerer.

Robert

PS: This is for an un-patented, unprotected device so please do not expect full disclosure.
I am quite sure of the speeds and duty cycle, I just need to know IF and HOW. TIA!

Nope. The clock frequency is 16 MHz (20 MHz max on some models) which means the fastest anything can happen is 1/16 MHz = 62.5 nanoseconds.

A 1ns resolution implies that the processor has a clock frequency of 1 GHz. You're looking at custom hardware or something a lot "bigger" than an Arduino.

--
The QuadRAM shield: add 512 kilobytes of external RAM to your Arduino Mega/Mega2560

not sure I understand the requirement
do you just want a HIGH (or maybe LOW) for 1 to 10 nS
with a max prf of 2 MHz?

if so would a programmable monostable do the trick
you could control that from a 'duino

Wow! FAST Reply!

So suppose that I can live with a 62.5 nSec ON time, is it still possible
to have a fractional duty cycle of less than 1% and how would I figure
out what I can manipulate the Arduino to produce?

You can have practically any duty cycle you want as long as the on-time is no shorter than 62.5ns, and the period is an integer multiple of the on-time.

For example, you can configure the 16-bit Timer 1 for a period of 10000 counts at maximum frequency (16 MHz). Then, you can set the output compare register OCR1A to any value between 0 to 10000 to set the duty cycle. Each increment of OCR1A represents 1/10000 of the total period, or 0.01% duty cycle resolution. The frequency will be 16MHz/10000 = 1.6 kHz.

So if you can live with 1.6 kHz frequencies, you can have 0.01% duty cycle resolution and 62.5ns minimum-length pulses. If you want 16 kHz frequencies (OCR1A is 1000) you will have 0.1% duty cycle resolution and 62.5ns minimum-length pulses, etc. The definitive reference is the ATmega328P datasheet. I believe there is also a “Timer 1 library” out there for Arduino that attempts to make it easier to work with this stuff.


The Ruggeduino: compatible with Arduino UNO, 24V operation, all I/O’s fused and protected

mmcp42:
not sure I understand the requirement
do you just want a HIGH (or maybe LOW) for 1 to 10 nS
with a max prf of 2 MHz?

if so would a programmable monostable do the trick
you could control that from a 'duino

I need the really short ON times (high?) and adjustable OFF (low?) times.
2MHz works for the off times but I need fractional ON times so I guess I
really need the 1GHz PWM for the ultimate flexibility.

aha just build a very fast monostable
trigger it from the 'duino
do you need to alter the ON signal or just the time bewteen successive ON signals?

Is there a faster PWM that can be controlled by the Arduino?

Thanks so far guys, it really helps.

mmcp42:
aha just build a very fast monostable
trigger it from the 'duino
do you need to alter the ON signal or just the time bewteen successive ON signals?

for my R&D and proof-of-concept I need to have like 1, 2, or 3 nanosecond pulses
but once I establish circuit characteristics the only reason I need minimum ON pulse
is so I can maximize overall frequency of the circuit to enhance output. Initially one
could just imagine I am strictly wanting to produce a 'scope trace of short ON time
followed by very long OFF times. Physical sizing constraints set the OFF times and
hence the frequency but the ON times determine the maximum resolution. Guess
I am saying I need a 2MHz frequency on a 1GHz PWM :stuck_out_tongue:

I will tell you good people much more once I get my project Open Source protected.

Also note that a 1ns "pulse" implies the edges are themselves faster than the overall pulse. A good rule of thumb is no worse than 1/3+1/3+1/3, so 1/3 of the 1ns pulse is a rising edge, 1/3 of the pulse is steady high, 1/3 is a falling edge. This implies your rising/falling edges take no more than 300ps.

This is not easy.

You need to work with someone here who really knows what they're doing. This extends to the other parts of your circuit. Whatever you're doing with that 1ns pulse, you can't just assume it's going to be a perfect pretty little thing. Signal integrity throughout your proof-of-concept is going to be very important.

--
BeatVox: inexpensive sound shield for Arduino, 3.5mm stereo output, 512Kbyte FLASH

RuggedCircuits:
You can have practically any duty cycle you want as long as the on-time is no shorter than 62.5ns, and the period is an integer multiple of the on-time.

For example, you can configure the 16-bit Timer 1 for a period of 10000 counts at maximum frequency (16 MHz). Then, you can set the output compare register OCR1A to any value between 0 to 10000 to set the duty cycle. Each increment of OCR1A represents 1/10000 of the total period, or 0.01% duty cycle resolution. The frequency will be 16MHz/10000 = 1.6 kHz.

So if you can live with 1.6 kHz frequencies, you can have 0.01% duty cycle resolution and 62.5ns minimum-length pulses. If you want 16 kHz frequencies (OCR1A is 1000) you will have 0.1% duty cycle resolution and 62.5ns minimum-length pulses, etc. The definitive reference is the ATmega328P datasheet. I believe there is also a "Timer 1 library" out there for Arduino that attempts to make it easier to work with this stuff.

--
The Ruggeduino: compatible with Arduino UNO, 24V operation, all I/O's fused and protected

I can do exactly this, Thx RUGGED!
I however will not be able to test the limits of the theory. No Biggy.
It would only be the difference of a factor of 2x the minimum dtc.
1 nS or 2nS... I can jockey the physical circuit variables to determine these, actually.

I think I am sold on the Arduino. U guys know yer stuff better than the TI peeps LOL!!!
The TI hardware would be cheaper for production than the Arduino, but by then I can
hire a programmer for that :wink:

just trawled rs
seems a monostable that fast isn't in their list :frowning:

The TI hardware would be cheaper for production than the Arduino

I would be surprised by that!

RuggedCircuits:
Also note that a 1ns “pulse” implies the edges are themselves faster than the overall pulse. A good rule of thumb is no worse than 1/3+1/3+1/3, so 1/3 of the 1ns pulse is a rising edge, 1/3 of the pulse is steady high, 1/3 is a falling edge. This implies your rising/falling edges take no more than 300ps.

This is not easy.

You need to work with someone here who really knows what they’re doing. This extends to the other parts of your circuit. Whatever you’re doing with that 1ns pulse, you can’t just assume it’s going to be a perfect pretty little thing. Signal integrity throughout your proof-of-concept is going to be very important.


BeatVox: inexpensive sound shield for Arduino, 3.5mm stereo output, 512Kbyte FLASH

Great point but my triggered device has a 20-60 pSec trigger window. should be 5 times higher than that @ 300 pSec.

undeRGRound:

RuggedCircuits:
Also note that a 1ns "pulse" implies the edges are themselves faster than the overall pulse. A good rule of thumb is no worse than 1/3+1/3+1/3, so 1/3 of the 1ns pulse is a rising edge, 1/3 of the pulse is steady high, 1/3 is a falling edge. This implies your rising/falling edges take no more than 300ps.

This is not easy.

You need to work with someone here who really knows what they're doing. This extends to the other parts of your circuit. Whatever you're doing with that 1ns pulse, you can't just assume it's going to be a perfect pretty little thing. Signal integrity throughout your proof-of-concept is going to be very important.

--
BeatVox: inexpensive sound shield for Arduino, 3.5mm stereo output, 512Kbyte FLASH

Great point but my triggered device has a 20-60 pSec trigger window. should be 5 times higher than that @ 300 nSec.

It may be that my 2nd level output may be shortened below 1 nSec and may necessitate longer PWM pulse to compensate?

Does this bbs have PM's, Rugged?

Yup, just click on the user's name on the left side.

--
Beat707: MIDI drum machine / sequencer / groove-box for Arduino

PM sent

Like your ruggeduino :wink:

once I get my project Open Source protected.

I thought open source gave you no protection!
With open source you agree that anyone can do anything with your circuit / software. That includes make it, make money with it, sell it, just anything.
If you want some protection then open source is not the way.

Protection is only as strong as the bank roll you give to lawyers to protect it. It's like a game of poker, if a big boy comes along you will have to fold because you can't afford to put up. That applies to patents as well.

Grumpy_Mike:

once I get my project Open Source protected.

I thought open source gave you no protection!

Sorry, I left out copyright protected then OS.
Lawyers are still a necessary evil ]:slight_smile: unfortunately.

OK Guys, which Arduino model has the 16MHz PWM???
I thought it was the UNO but in radio shack I froze...
Which one to buy?

TIA!
Robert