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

Thread: external intrrupt pins on teensy 3.5

  1. #1
    Junior Member
    Join Date
    Feb 2018
    Posts
    2

    external intrrupt pins on teensy 3.5

    Hello respetec members,

    I would like to know which pins are dedicated to "external interrupt" in teensy 3.5. Thanks

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,431
    Not sure what you mean by dedicated to "external interrupts"

    But if you look at the hardware table: https://www.pjrc.com/teensy/techspecs.html
    You will see there are 58 digital IO pins on the Teensy 3.5 and there are 58 Interrupt pins.

    So the simple answer is you can use any digital pin to generate interrupts. Note: Each pin does not have a Unique interrupt associated with it. So if you have multiple pins that can generate the same Interrupt, you need to deduce which one happened.

    The nice thing is, you can simply use the function: attachInterrupt(pin, <ptr to ftn>, mode), and it will do that work for you.

    Kurt

  3. #3
    Junior Member
    Join Date
    Feb 2018
    Posts
    2
    Thanks, you meant 48 pins. You are right, we can use all digital pins as interrupt pins. The reason I asked was in Arduino (e.g. uno), we cannot use all digital pins as external interrupt pins although we have many digital pins.

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,770
    The linked page says 58 as KurtE noted - that includes digital pins on the underside - some few of the top edge pins are not digital outputs.

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,593
    Quote Originally Posted by ais-systems View Post
    The reason I asked was in Arduino (e.g. uno), we cannot use all digital pins as external interrupt pins although we have many digital pins.
    The older Teensy 2.0 boards are very similar in this way to Arduino's older products like Uno, only a small number of the pins can be used as interrupts.

    The Teensy 3.x boards are powerful 32 bit ARM microcontrollers, similar to the powerful chip on Arduino Due. Turns out, Arduino Due and all the Teensy 3.x have interrupt capability on every pin.

    Teensy LC is a low-end ARM microcontroller (no hardware divide, fewer instructions, etc) basically the same as the processor on Arduino Zero & M0 & MKR1000. There too, things are very similar. Most not quite all of the digital pins are usable as interrupts, on both Teensy LC and Arduino's M0 boards.

    At least regarding interrupts, the capability is actually very close, if you compare boards from the same class of hardware capability.

Posting Permissions

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