Replacing Teensy++2.0 with Teensy 4.1?

prelist

New member
Teensy2p0.jpg
Hi all,
I am trying to replace our current Teensy++2.0 with another microcontroller such as Teensy 4.1.

Does Teensy 4.1 provide all the necessary ports as Teensy++2.0?
I uploaded a screenshot of the wiring around the current Teensy++2.0. For example, 5 Analog inputs are connected, which should be well supported by Teensy 4.1.

Also, I wonder if the programming will be much different. As the processor manufacturer is different, I wonder how difficult/easy will be for the replacement.

(We use Arduino IDE to control Teensy++2.0)

If the programming will be very different, then I would consider Arduino Micro instead... even though Arduino Micro is much slower than Teensy 4.1...

Thank you.
 
Last edited:
The pins you have highlighted are I2C, SPI, Analog Input, and Digital I/O. You can likely use T4.0, which has all of those, and is quite a bit smaller than T4.1. I'm guessing Teensy++2.0 is 5V, whereas T4.x is 3.3V, so you would have to change your design to accommodate the lower voltages. I'm not a hardware guy, so I hope others will say more.
 
Hi Joe, Thank you for pointing these out. 3.3V voltage restriction isn't an issue for us. I found our hardware components will work just fine with 3.3V. I also found the four pins (PB0, PB1, PB2 and PB3) for SPI are not necessary any more with Teensy 4.1, since these pins are used for SD card reader with our circuit board now. Since Teensy 4.1 comes with a built-in SD card reader, we can just use it.

According to your description, PC0, PC1, PC2, PC5, PC6 and PB4 are for Digital I/O, is that right?
Also I wonder what PE0 is for exactly..

Thank you!
 
PE0 and PE1 are labeled RD and WR. I think those would be read and write signals for the external memory. Those uses are specific to your application.
 
Also, I wonder if the programming will be much different. As the processor manufacturer is different, I wonder how difficult/easy will be for the replacement.

(We use Arduino IDE to control Teensy++2.0)

As a very first step, open your code in Arduino IDE and click Tools > Board to select Teensy 4.1. Then click Verify to check if your code is able to compile.

If your program uses Arduino functions like digitalWrite() and libraries like Wire and SPI, odds are good it will compile without error. Odds are also pretty good it may work with little or no modification. Teensy 4.1 will run much faster, so if your program depends on the slow speed you might need use Tools > CPU Speed or add delays in various places in the code.

But if your program uses AVR timers or other direct access specifically to the hardware inside Teensy++ 2.0, you'll probably see an overwhelming number of cryptic errors about various names undefined. For some types of simple and common usage, like using a timer for interrupts, replacing portions of code with features like IntervalTimer can sometimes be done. To have any chance of helping you, of course we would need to see the code. But if the code makes direct use of AVR registers in complex ways, unfortunately there are sometimes no easy answers.

It really all depends on how your code is written. The very first step is to just click Teensy 4.1 in Tools > Board and then click Verify to see if it compiles, and if it doesn't, whether the errors are understandable or utterly cryptic.
 
Back
Top