CAN TEENSY 4.0 ARDUINO SKETCHES be USED on TEENSY 4.1?

soky157

Active member
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
 
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.
 
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.
 
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
 
Back
Top