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

Thread: Teensy 3.2 I/O pins 34 or 39

  1. #1
    Junior Member
    Join Date
    Jul 2019
    Posts
    4

    Teensy 3.2 I/O pins 34 or 39

    Sorry if this is a silly question but I can't find a answer to my question.
    In all documentation of teensy 3.1/3.2 say they have 34 I/O pins but in board have pins 0- 23 (some of this pins are analog pins A0-A9) plus A10,A11,A14 and in the back of board have pads for pin 24-33 (some of this pins are analog pins A15-A20) plus A12,A13.

    If whe have pins 0-33 pins (34 pins) and A10-A14 pins (+5 pins) this is a total of 39 pins.

    Can use all this pins or not? why in specs say only have 34 I/O pins?

    Thanks.

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,077

    Cool

    On the 3.2, pins starting at 34:
    • 34: A10 (inside through hole pin)
    • 35: A11 (inside through hole pin)
    • 36: A12 (underneath solder pad)
    • 37: A13 (underneath solder pad)
    • 38: Not a pin, but if you do analogRead (38) it gives the internal temp sensor
    • 39: Not a pin, but if you do analogRead (39) it returns VREF
    • 40: A14 (back through hole pin)


    can only be used with analogRead. You cannot use them for digitialRead, digitalWrite.

    One of the pins (A14) can also be used for analogWrite. In this case, it modifies the voltage level and can be used with amplification for mono sound.

    The other pins that support analogWrite do so by rapidly flashing on/off, so that the aggregate will be at the voltage level. You can only use those pins for sound by using a small capacitor to smooth over the differences.

    <edit>
    I should mention these analog input only pins are limited to 3.3v. If you put more than 3.3v to the pin, you risk damaging your Teensy 3.2. On the Teensy 3.2, the other 34 pins can get 5v as input. Note if you do analogRead on pins A0..A9 and the voltage is over 3.3v, the analogRead function will return the highest value (typically 1023).
    Last edited by MichaelMeissner; 07-05-2019 at 07:13 PM.

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,323
    Quote Originally Posted by hugovw1976 View Post
    why in specs say only have 34 I/O pins?
    Because we're kinda conservative about over-promising what the hardware can really do. Some pins only support certain features and can't be used as normal digital I/O.

    MichaelMeissner covered the details perfectly. Hopefully you can also see those details on the pinout card that came with your Teensy?

  4. #4
    Junior Member
    Join Date
    Jul 2019
    Posts
    4

    Quote Originally Posted by MichaelMeissner View Post
    On the 3.2, pins starting at 34:
    • 34: A10 (inside through hole pin)
    • 35: A11 (inside through hole pin)
    • 36: A12 (underneath solder pad)
    • 37: A13 (underneath solder pad)
    • 38: Not a pin, but if you do analogRead (38) it gives the internal temp sensor
    • 39: Not a pin, but if you do analogRead (39) it returns VREF
    • 40: A14 (back through hole pin)


    can only be used with analogRead. You cannot use them for digitialRead, digitalWrite.

    One of the pins (A14) can also be used for analogWrite. In this case, it modifies the voltage level and can be used with amplification for mono sound.

    The other pins that support analogWrite do so by rapidly flashing on/off, so that the aggregate will be at the voltage level. You can only use those pins for sound by using a small capacitor to smooth over the differences.

    <edit>
    I should mention these analog input only pins are limited to 3.3v. If you put more than 3.3v to the pin, you risk damaging your Teensy 3.2. On the Teensy 3.2, the other 34 pins can get 5v as input. Note if you do analogRead on pins A0..A9 and the voltage is over 3.3v, the analogRead function will return the highest value (typically 1023).
    Thanks, this explanation could not be more clear.

  5. #5
    Junior Member
    Join Date
    Jul 2019
    Posts
    4
    Quote Originally Posted by PaulStoffregen View Post
    Because we're kinda conservative about over-promising what the hardware can really do. Some pins only support certain features and can't be used as normal digital I/O.

    MichaelMeissner covered the details perfectly. Hopefully you can also see those details on the pinout card that came with your Teensy?

    Thanks.

  6. #6
    Junior Member
    Join Date
    Jul 2019
    Posts
    4
    I work in a project and I need to use almost all pins ( the only pins I don't use are A10, A11, A14) More of the pins I use are digital only, 4 pins for interrupt function for two encoders, one serial port, can bus port, two analog reads, two pwm outputs and one I2C port.
    All pins are mapped correctly, and just have the doubt about why the specs say only 34 pins.

Posting Permissions

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