Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Teensy 4.0 pulse output

  1. #1

    Teensy 4.0 pulse output

    I am considering a project in which the processor controls a laser to turn it on for 100 nanoseconds. With the fast speed of this new Teensy 4 I am thinking this could work. Has anyone tried generating pulses this short with it yet? How short a pulse can it output at full speed? Thanks.

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,350
    Various ON and OFF testing yes, this context possibly not

    Check out :: static inline void delayNanoseconds(uint32_t nsec)

    This is available for Teensy 4.0. Supposing a scope is at hand the ON, delayNanoseconds( X ), OFF could be observed to perhaps a usable value of X to get the desired with interrupts disabled.

    For ref here is one post about 150 MHz cycling with scope pictures :: Teensy-4-0-Bitbang-FAST

    Finer control than Nanoseconds is possible - I posted a delayCycles() { i.e. 1/600MHz } that was good starting near 20 cycles - post #8 on same thread - but had variability of 1-4 cycles depending on the value chosen.

  3. #3
    Thanks Paul. Looks like this should work well if it can cycle at 150 MHz (6 nanoseconds). 100 nanoseconds should be easy.
    Why did you say "this context possibly not"?
    I think I will buy one and start experimenting. Where is the best place to get one in the US?

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,350
    Quote Originally Posted by Deane View Post
    Thanks Paul. Looks like this should work well if it can cycle at 150 MHz (6 nanoseconds). 100 nanoseconds should be easy.
    Why did you say "this context possibly not"?
    I think I will buy one and start experimenting. Where is the best place to get one in the US?
    Not Paul - but you are welcome.

    The context was : "processor controls a laser … Has anyone tried generating pulses this short with it yet?"
    For the note with regard to short laser pulses : "this context possibly not"

    As far as Teensy 4.0 purchase they are stocked by : PJRC.com, SparkFun.com, Adafruit.com … and others { digikey, OSHpark, Amazon, there is a thread/page on distributors ... local shops } depending on where you shop and how shipping speed/cost factors in.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •