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

Thread: Teensie 4.x Measuring pulse width

  1. #1
    Member
    Join Date
    Sep 2020
    Location
    New Hampshire
    Posts
    23

    Teensie 4.x Measuring pulse width

    I am migrating code from a different ARM processor to the Teensie 4.1. My old code monitored two RC PWM signals using the counter/timer peripheral of that chip. The rising edge would start the timer, the falling stop it, and then an interrupt was generated to indicate a new measurement was available.

    Looking that the datasheet, I can see that a very similar thing would be possible with the RT1060. The complication being the "Serious Level" of mux-ing on all pins. I could see that being a significant learning experience in of itself.

    Might someone point me to examples of:
    1) Use of pin muxing
    2) Use of the counter/timer to measure a pulse width (in the 0 to 2 msec range).
    3) Possibly a library that does this already?

    TIA

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    26,380
    Maybe look at the PulsePosition library.

  3. #3
    Member
    Join Date
    Sep 2020
    Location
    New Hampshire
    Posts
    23
    Perfect thank you.
    One one the problems with the current ecosystem is the vast number of libraries.

Posting Permissions

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