Teensy Technical Specifications
Feature | Teensy 2.0 |
Teensy++ 2.0 |
Teensy LC |
Teensy 3.2 |
Teensy 3.5 |
Teensy 3.6 |
Teensy 4.0 |
Teensy 4.1 |
Units |
---|---|---|---|---|---|---|---|---|---|
Processor Core FPU Rated Speed Overclockable |
ATMEGA32U4 AVR - 16 - |
AT90USB1286 AVR - 16 - |
MKL26Z64VFT4 Cortex-M0+ - 48 - |
MK20DX256VLH7 Cortex-M4 - 72 96 |
MK64FX512VMD12 Cortex-M4F 32 120 - |
MK66FX1M0VMD18 Cortex-M4F 32 180 240 |
IMXRT1062DVL6 Cortex-M7 32 & 64 600 912 |
IMXRT1062DVJ6 Cortex-M7 32 & 64 600 912 |
bits MHz MHz |
Flash Memory Bandwidth Cache |
31.5 32 - |
127 32 - |
62 96 64 |
256 192 256 |
512 192 256 |
1024 411 8192 |
1984 66 65536 |
7936 66 65536 |
kbytes Mbytes/sec Bytes |
RAM | 2.5 | 8 | 8 | 64 | 256 | 256 | 1024 | 1024 | kbytes |
EEPROM | 1024 | 4096 | 128 (emu) | 2048 | 4096 | 4096 | 1080 (emu) | 4284 (emu) | bytes |
Direct Memory Access | - | - | 4 | 16 | 16 | 32 | 32 | 32 | Channels |
Digital I/O Breadboard I/O Voltage Output Current Output Voltage Input Interrupts |
25 22 5V 20mA 5V 4 |
46 36 5V 20mA 5V 8 |
27 24 3.3V / 5V 5mA / 20mA 3.3V Only 18 |
34 24 3.3V 10mA 5V Tolerant 34 |
58 40+2 3.3V 10mA 5V Tolerant 58 |
58 40+2 3.3V 10mA 3.3V Only 58 |
40 24 3.3V 10mA 3.3V Only 40 |
55 42 3.3V 10mA 3.3V Only 55 |
Pins Pins Volts milliAmps Volts Pins |
Analog Input Converters Usable Resolution Prog Gain Amp Touch Sensing Comparators |
12 1 10 1 - 1 |
8 1 10 1 - 1 |
13 1 12 - 11 1 |
21 2 13 2 12 3 |
27 2 13 - - 3 |
25 2 13 - 11 4 |
14 2 10 - - 4 |
18 2 10 - - 4 |
Pins Bits Pins |
Analog Output DAC Resolution |
- - |
- - |
1 12 |
1 12 |
2 12 |
2 12 |
- - |
- - |
Pins Bits |
Timers PWM, 32 bit PWM, 16 bit PWM, 8-10 bit Total PWM Outputs PDB Type CMT Type Quadrature Enc LPTMR Type PIT/Interval IEEE1588 Systick RTC |
4 Total - 2 2 7 - - - - - - - - |
4 Total - 2 2 9 - - - - - - - - |
7 Total - 3 - 10 - - - 1 2 - 1 0 ** |
12 Total - 3 - 12 1 1 - 1 4 - 1 1 ** |
17 Total - 4 - 20 1 1 - 1 4 4 1 1 |
19 Total - 6 - 22 1 1 - 1 4 4 1 1 |
49 Total 3 32 - 27 - - 4 - 4 4 1 1 |
49 Total 3 32 - 31 - - 4 - 4 4 1 1 |
Pins |
Communication USB Serial With FIFOs High Res Baud SPI With FIFOs I2C CAN Bus With CAN-FD Digital Audio In Digital Audio Out S/PDIF Input S/PDIF Output MQS Output SD Card Ethernet |
1 1 - - 1 - 1 - - - - - - - - - |
1 1 - - 1 - 1 - - - - - - - - - |
1 3 - - 2 1 2 - - 1 1 - - - - - |
1 3 2 3 1 1 2 1 - 2 2 - 0* - - - |
1 6 2 6 3 1 3 1 - 2 2 - 0* - 1 1* |
2 6 2 5 3 1 4 2 - 2 2 - 0* - 1 1* |
2 7 7 - 2 2 3 3 1 5* 5* 1 1 1 1* - |
2 8 8 - 2 2 3 3 1 5* 5* 1 1 1 1 1 |
stereo pins stereo pins uu |
Originally, Arduino only supported AVR chips. Today nearly all programs and libraries work with 32 bit Cortex-M processors, but a few very old programs may only work with AVR.
However, Cortex-M0+ supports fewer instructions than the more powerful ARM processors. When the compiler builds your program, certain complex operations which require only 1 instruction on Cortex-M4 may require 2 or 3. The reduced instruction set works remarkably well for simpler programs, but costs performance for numerically intensive ones.
Cortex-M0+ uses a single 32 bit bus to access all memory. This too works very well for simpler programs, but can decrease performance when processing large amounts of data.
Special Digital Signal Processing (DSP) instructions are provided. The Teensy Audio Library and arm_math.h utilize these instructions to accelerate sound and signal processing.
Cortex-M4 (without "F") does not include a floating point unit. All math done with floating point numbers uses software.
Cortex-M4F (with "F") includes a floating point processor for 32 bit (single precision) float variables. The FPU is approximately 30 times faster than software-based float math. 64 bit (double precision) floating point math is still done with software.
Special Digital Signal Processing (DSP) instructions are provided. The Teensy Audio Library and arm_math.h utilize these instructions to accelerate sound and signal processing.
The full set of ARM Thumb & Thumb2 instructions are supported, including hardware divide and multiplies producing 64 bit results.
Cortex-M7 includes a floating point processor for 32 bit (single precision) float and 64 bit (double precision) variables.
Special Digital Signal Processing (DSP) instructions are provided. The Teensy Audio Library and arm_math.h utilize these instructions to accelerate sound and signal processing.
Unlike a traditional computer or single-board computer (eg: Raspberry Pi) where programs are loaded from storage media as the computer "boots", your program in flash memory is immediately available and begins running as soon as the processor starts executing.
Most programs written with Arduino and using 2 or 3 Arduino libraries need between 20K to 50K. Of course, as more libraries are used, or you write more code, program size grows. Embedding fonts, sound clips or graphics into your program can quickly increase its size.
To support faster software execution from Flash memory, a "row" of flash memory bits is accessed simultaneously to increase the total bandwidth.
Older & slower chips lock the processor and flash memory clocks in sync. Newer & faster chips allow them to be configured separately. Even when the processor runs faster (overclocked), the flash memory bandwidth remains fixed.
Larger cache memory allows more complex code with many branches to run faster, but additional cache memory can also increase power consumption.
Programs which generate graphics, process sound effects, or control large numbers of addressable LEDs often need larger RAM.
Some types of data processing are possible to write without much RAM, but much easier if a large array can be used. A board with more RAM may cost a few dollars extra, but save a tremendous amount of time and effort designing your code.
On ARM processors, RAM may also be used for speed critical functions with the FASTRUN keyword.
Usually EEPROM is used for storing settings or calibration data.
The emulation provides 128 bytes of usable EEPROM space.
While writing, your entire program stops, because the Flash memory can not be read. These times are usually well under 1 millisecond. If your program must remain responsive while writing to EEPROM, an external chip or a board with proper EEPROM memory should be used.
Each DMA channel can be programmed to respond to different events. More channels allows more hardware to simultaneously leverage DMA.
USB ports, Ethernet and SD Card have their own specialized DMA engines which do not consume the general purpose DMA channels.
These are the number of I/O pins which can actually be used with a breadboard. Other pins in the center, left side, or as only pads on the bottom side are not compatible with breadboard usage.
Output voltage is important because it affects compatibility with other electronics you connect. Most modern electronic devices use 3.3V signals. Many older devices use 5V signals. Some can accept 3.3V signals, but others require a full 5V signal at their inputs.
Current limits are specified different ways. These numbers are the recommended maximum, which are design guidelines. Some other sites publish much higher "absolute maximum" ratings, which are based on possible damange to the chip. Usually you should design your project to use no more than the recommended maximum under normal usage, and stay below the absolute maximum in temporary & abnormal conditions.
These maximums allow 0.5V drop within the chip. For example, when running from 3.3V power and delivering the full 10 mA maximum, a pin may output as little as 2.7V.
Limits also exist for the total current of all pins. Just because each pin is capable of a certain current does not mean you can expect to safely use all pins simultaneously delivering their maximum.
The special 5V buffer chip, which provides a copy of the signal at pin 17 amplified to 5V, is rated for 8 mA output.
The other 23 digital pins are rated for 5 mA current.
3.3V Only means signals higher than 3.3V may damage your Teensy.
5V Tolerant means the pins expects a 3.3V signal, but is designed to allow up to 5 volts.
5V means the pin is designed to accept a 5V signal. Usually 3.3V signals can also be properly received by these pins.
With more than 1 converter present, you can (with the right software) measure more than 1 analog signal simultaneously. This can improve speed. It also allows measuring related signals at the same moment, such as a voltage and a signal representing current, which can be useful if you wish to compute power.
These numbers are the "usable" resolution, or "effective number of bits" in cases where the conversion provides more bits. PJRC believe specification of the total bits gives a misleading impression, because any extra bits provided by the hardware are not usable. They are usually just noise.
Fully utilizing the analog resolution depends on good circuit design, particularly use of low impedance signals and careful attention to ground current paths.
The voltages at 2 pins are subtracted and that difference is amplified. Thermocouples, strain gauges and other small signals which could normally make a slight change can be mapped onto some or all of the analog to digitial conversion resolution.
Touch can also be detected using ordinary digital pins with the CapacitiveSensor library. But the special hardware built into these pins makes the measurement much faster, and usually with better long-term stability.
This can be useful for comparing voltages to thresholds, such as a battery discharging below a safe level. While the analog to digital converter is more flexible and usually easier to use, these comparators can be useful for some special applications.
The Teensy Audio Library supports playing sounds to these DAC pins. Two pins allows stereo output.
with Pulse Width Modulation
When used for another purpose, the PWM pins associated with a timer may be limited or may not function at all as PWM. More of these timers allows you to dedicate some to specific uses, and still have more for PWM outputs.
When used as PWM, all the pins for a specific timer pulse at the same frequency, controlled by analogWriteFrequency(). More timers allows you to use more individual PWM frequencies.
Timers with 16 bits are very flexible for alternate uses, like the FreqMeasure library. The 8 & 10 bit timers are still quite useful, but can not perform some tasks the 16 bit timers can.
Remember some PWM pins may become unusable if their timer is reprogrammed for a different purpose.
Use of this special timer allows the general purpose timers to be used for PWM other tasks.
The Teensy Audio library uses this timer if the ADC or DAC objects are used. The Servo library also defaults to use of this timer, but can also use the LPTMR.
Use of this special timer allows the general purpose timers to be used for PWM other tasks.
The IRremote library makes use of this timer. The FrequencyTimer2 library can be used to allow this timer to generate another frequency independent of the PWM timers.
The Snooze library uses this timer for low power wakeup.
The Entropy, FreqCount, and Servo libraries can also make use of this timer.
Many libraries make use of IntervalTimer, rather than requiring the general purpose PWM timers. See the IntervalTimer page for a list of libraries known to use IntervalTimer. Because 2 or 4 of these timers are present, up to 2 or 4 libraries which need IntervalTimer can be used simultaneously without conflict, and without interfering with any other timers.
Use of this dedicated timer allows reliable time keeping, even if the general purpose timers are changed to different frequencies with analogWriteFrequency() or used for other tasks.
See the Time Library for details.
The FIFOs are used automatically by the serial objects in Teensyduino.
Teensyduino implements interrupt-based software buffers for both transmit and receive on all serial ports. These FIFOs do not increase the length of time software may spend without reading incoming data becoming lost, or without writing to obtain full no-gap transmission. The FIFOs are only about reducing the software overhead and tolerating longer interrupt disable times without data loss.
For example, if you use the 3 configurable pins as output, you can transmit 5 stereo streams (10 audio channels) and receive 2 stereo streams (4 audio channels). Or you could choose to receive 4 stereo inputs (8 audio channels) by using 2 of the configurable pins, leaving 1 configurable pin and 2 output-only pins to be able to transmit 3 stereo streams (6 audio channels).
If only 14 simultaneous audio channels is too limiting, you can also use TDM protocol which supports up to 16 channels of audio per pin! Currently the Teensy Audio Library only supports TDM on the 2 input-only and 2 output-only pins, for a maximum of 32 audio channels input and 32 audio channels output.