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

Thread: CAN TEENSY 4.0 ARDUINO SKETCHES be USED on TEENSY 4.1?

  1. #1

    CAN TEENSY 4.0 ARDUINO SKETCHES be USED on TEENSY 4.1?

    Hello, I notice that there are a lot more Arduino Sketches on Github written for Teensy 4.0 than Teensy 4.1. Can sketches written for Teensy 4.0 be used on Teensy 4.1?

    Thanks for any help,

    soky157

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    16,015
    Yes.
    The first top edge pins of the T_4.1 inherit from the T_4.0.
    If used, those on the bottom of T_4.0 are mapped to the extended portion of the T_4.1.

    RAM is the same size and configuration, FLASH bumps from 4 to 8 MB

    The T_4.1 maps USB Host to pin holes from bottom pads, and SDIO pins from bottom to the end SD socket: so, none of those function differently.
    T_4.1 Ethernet chip support brought out from new pins not compromising any the T_4.0 presented.

    There might be some subtle alternate pin function for extreme cases, expect not, if so, they are just swapped to another pin.

  3. #3
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    4,188
    Quote Originally Posted by soky157 View Post
    Hello, I notice that there are a lot more Arduino Sketches on Github written for Teensy 4.0 than Teensy 4.1. Can sketches written for Teensy 4.0 be used on Teensy 4.1?

    Thanks for any help,

    soky157
    It depends. Most can be.

    However, if the sketch uses #ifdef ARDUINO_TEENSY40, it will have to be adjusted to #ifdef ARDUINO_TEENSY41 (or maybe use #ifdef __IMXRT1062__, which covers both).

    If the sketch wants to directly access the pins in the micro SD card reader, note that in the Teensy 4.0. the solder pads are 34-39, while in the Teensy 4.1, the pins inside of the micro SD card reader are 42-47.

    If you make a PCB, the two boards have different sizes, and pin layouts for for pins above pin 23.

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    16,015
    Quote Originally Posted by MichaelMeissner View Post
    It depends. Most can be.

    However, if the sketch uses #ifdef ARDUINO_TEENSY40, it will have to be adjusted to #ifdef ARDUINO_TEENSY41 (or maybe use #ifdef __IMXRT1062__, which covers both).

    If the sketch wants to directly access the pins in the micro SD card reader, note that in the Teensy 4.0. the solder pads are 34-39, while in the Teensy 4.1, the pins inside of the micro SD card reader are 42-47.

    ...
    Good note on the #ifdef - both use the 'same' 1062 MCU. Some rare cases distinguish the two as noted.

    If no T_4.0 bottom pins are used, there should be no concerns. The two work interchangeably on the primary edge pins from the sketch view in all general use.

    The SD pins and other bottom pins indeed need to have the pin numbers checked as they mapped to the T_4.1 like the SD.

    Also the QSPI memory pads offer added pins when not used for SDIO soldered chips, though they are new AFAIK and not interfering with the ones on the T_4.0

  5. #5
    Thank you all for your inputs. I greatly appreciate it.

Posting Permissions

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