Pulse Train Output

I'm trying to program a my arduino MCU to push out a train of pulses based on what I want. For example I want to program it so that I can through the webserver send the arduino 10 values, and then the arduino will push out ten pulses each pulse corresponding to one of the ten values, with a fixed dead time. The problem I'm getting is that these pulses need to be capable of at least 1us high time. My arduino I find can not work that fast, it can go as fast as 5us only. Is there a timing chip that I can buy and use with the arduino to get this working?

Thanks

jawwadms:
s need to be capable of at least 1us high time.

I suspect you mean "at most"

What is the purpose of the pulse train? Maybe one of the specialized parts of the Atmega 328 can produce it?

Operating at 1µsec is running very close to the limit for a 16MHz chip.

...R

yes I meant at most 1us. 2us will work as well, I am trying to make a train of pulses to go 5us on 10us off 20us on 10us off … and go upto maybe 200us on and 10us off. This I want to use to drive leds. so that way my leds start dim then turn off then turn on a little brighter each time.

Do not make it that difficult.

Just use the PWM function of your Arduino.

The human eye can only follow changes up to 26 Hz. So switching your LEDs in microseconds does not make sense.

1 microsecond is very short for a 16MHz processor. You would need to use the internal hardware timers and you would need to reprogram them within microseconds. This will not work out.

If all you want to do is to dimm your LEDs you better think in milliseconds.

If you want your LEDS to transmit data, it might be a different story.

Well the LED's are gonna be used given that pulse train but I'm going to capture them using cameras with exposures using the same pulse train, it's just an experiment I wanted to try it. Is there an external timing chip that I can use since this will be too difficult for the arduino itself to accomplish?

Thanks

You can certainly generate a pulse train with low level pin commands writing a a pin HIGH or LOW with and using NOP’s or __builtin_avr_delay_cycles to control the timing.

Are there multiple led’s going to get the same pulse train? How do you want to communicate the pulse train to the camera?

Please explain more about what you are trying to do, and what the Arduino has to do other than generate the pulses.

jawwadms:
Well the LED's are gonna be used given that pulse train but I'm going to capture them using cameras with exposures using the same pulse train,

I wonder are you getting your units of measurement confused?

What camera can react at 1 million times per second - i.e. every 1µsec ?
Even a 1000 times per second seems like a big ask. The usual movie speed is 25 fps and 100fps would be very fast.

Tell us exactly what the whole project is about.

...R

Hi all,

Thanks for the responses. I have a camera that has input capabilities for exposure timing, with timing going as low as 2us. I want to have a pulse train of 15 pulses at certain microsecond values to send to the camera. The smallest pulse will probably be 2us, most likely 5us. So I need the arduino to output 15 pulses of variable on and off times, or if the arduino is not capable of doing this I would like to have a separate chip where I can send that chip the values from my arduino and then that chip can create my pulse train and output it in a loop. I was told that the arduino is not reliable enough to output a steady pulse sequence at that low of a time interval and so I was trying to see if anyone knew another chip I could use with the arduino to accomplish this

Thanks

Yes, you could do this with an Arduino. It’s possible to use the USART in MSPIM mode @ 4MHz clockrate, 250ns resolution for the pattern (pulse train) output. The 15 pulses could all have various widths … this would be created by the data that’s transferred. This can be sent without any delay added between bytes.