SparkFun Electronics
Intelligent Robotics
SoftwareArduino IDE + Teensyduino Arduino's IDE software with the Teensyduino add-on is the primary programming environment for...
About Us
SparkFun Electronics

Company introduction
SoftwareArduino IDE + Teensyduino Arduino's IDE software with the Teensyduino add-on is the primary programming environment for Teensy. On Windows, Linux and old Macs, Arduino is installed first and then the Teensyduino installer adds Teensy support to the Arduino IDE. On newer Macs, an all-in-one download is provided. Teensyduino includes a large collection of libraries which are tested and optimized for Teensy. Other libraries may be installed manually or by Arduino's library manager. Visual Micro Visual Micro allows use of Microsoft Visual Studio to program Arduino compatible boards, including Teensy. Only Windows is supported. Visual Micro is commercial paid software. PlatformIO PlatformIO IDE is a cross platform development environment with many advanced features. Windows, Linux and Macintosh are supported. CircuitPython CircuitPython provides a .HEX file which you program onto Teensy 4.1 using Teensy Loader. Then Teensy appears to your computer as a USB disk, where copy or save your Python code. CircuitPython does not fully support all of Teensy 4.1's hardware. Command Line with Makefile Makefiles for non-graphical use are provided with the Teensyduino installer. Teensy 4.x: {Arduino}/hardware/teensy/avr/cores/teensy4/Makefile Teensy LC & 3.x: {Arduino}/hardware/teensy/avr/cores/teensy3/MakefileProcessorPerformance ARM Cortex-M7 brings many powerful CPU features to a true real-time microcontroller platform. CPU performance is many times faster than typical 32 bit microcontrollers. Dual Issue Superscaler Architecture Cortex-M7 is a dual-issue superscaler processor, meaning M7 can execute 2 instructions per clock cycle, at 600 MHz! Of course, executing 2 simultaneously depends upon the compiler ordering instructions and registers. Initial benchmarks have shown C++ code compiled by Arduino tends to achieve 2 instructions about 40% to 50% of the time while performing numerically intensive work using integers and pointers. Floating Point Unit The FPU performs 32 bit float and 64 bit double precision math in hardware. 32 bit float speed is approximately the same speed as integer math. 64 bit double precision runs at half the speed of 32 bit float. Tightly Coupled Memory Tightly Coupled Memory is a special feature which allows Cortex-M7 fast single cycle access to memory using a pair of 64 bit wide buses. The ITCM bus provides a 64 bit path to fetch instructions. The DTCM bus is actually a pair of 32 bit paths, allowing M7 to perform up to 2 separate memory accesses in the same cycle. These extremely high speed buses are separate from M7's main AXI bus, which accesses other memory and peripherals. Cache Two 32K caches, one for instructions and one for data, are used to speed up repetitive access to non-TCM memory. Branch Prediction Cortex-M7 is the first ARM microcontroller to use branch prediction. On Cortex-M4 & earlier, loops and other code which much branch take 3 clock cycles. With M7, after a loop has executed a few times, the branch prediction removes that overhead, allowing the branch instruction to run in only a single clock cycle. Digital Signal Processing DSP extension instructions accelerate signal processing, filters and Fourier transform. The Audio library automatically makes uses of these DSP instructions.Digital pins may be used to receive signals. Teensy 4.1 pins default to INPUT most with a "keeper" resistor. Teensy 4.1 pins accept 0 to 3.3V signals. The pins are not 5V tolerant. Do not drive any digital pin higher than 3.3V.All digital pins have optional pullup, pulldown, or keeper resistors. These are used to keep the pin at logic HIGH or logic LOW or the same logic level when it is not being actively driven by external circuity. Normally these resistors are used with pushbuttons & switches. The pinMode function with INPUT_PULLUP or INPUT_PULLDOWN must be used to configure these pins to input mode with the built-in resistor.All digital pins can detect changes. Use attachInterrupt to cause a function to be run automatically. Interrupts should only be used for clean signals. The Bounce library is recommended for detecting changes on pushbuttons, switches, and signals with noise or mechanical chatter.All digital pins can act at output. The pinMode function with OUTPUT or OUTPUT_OPENDRAIN must be used to configure these pins to output mode. The digitalWrite and digitalToggle functions are used to control the pin while in output mode. Output HIGH is 3.3V. The recommended maximum output current is 4mA.35 of the digital pins support Pulse Width Modulation (PWM), which can be used to control motor speed, dim lights & LEDs, or other uses where rapid pulsing can control average power. PWM is controlled by the analogWrite function. 22 groups of PWM can have distinct frequencies, controlled by the analogWriteFrequency function.This optional feature greatly reduces high frequency noise when long wires are connected to digital output pins. The rate of voltage change on the pin is slowed. The extra time is only nanoseconds, which is enough to lower undesirable high frequency effects which can cause trouble with long wires.Pin 13 has an orange LED connected. The LED can be very convenient to show status info. When pin 13 is used as an input, the external signal must be able to drive the LED when logic HIGH. pinMode INPUT_PULLUP should not be used with pin 13.Analog PinsAnalog Inputs 18 pins can be used an analog inputs, for reading sensors or other analog signals. Basic analog input is done with the analogRead function. The default resolution is 10 bits (input range 0 to 1023), but can be adjusted with analogReadResolution. The hardware allows up to 12 bits of resolution, but in practice only up to 10 bits are normally usable due to noise. More advanced use is possible with the ADC library. Analog Range The analog input range is fixed at 0 to 3.3V. On Teensy 4.1, the analogReference() function has no effect. The analog pins are not 5V tolerant. Do not drive any analog pin higher than 3.3 volts. Analog Comparators These comparators allow an analog signal to be converted to digital, with a precisely defined voltage threshold for logic low versus high.Serial - Seen by your computer as a COM port (Windows) or serial device (Mac, Linux), Serial is the default and most commonly used communication type. Bytes are transfered in both directions at maximum USB speed (baud rate settings are ignored). Teensyduino has highly optimized code to allow fast USB serial data transfer. While normally used with the Arduino Serial Monitor, Teensy's USB Serial mode is compatible with software designed for serial ports, like CoolTerm. On Teensy, the seraild devices is accessed as "Serial". In the Dual & Triple Serial modes, the additional serial devices are "SerialUSB1" and "SerialUSB2".Emulated Serial - The USB Type settings lacking Serial use a HID interface to emulate serial. In these modes, your PC or Mac will not detect a COM port or serial device, but you can still use Serial.print() to send text to the Arduino Serial Monitor.
Products & Solutions
Explore our products
Products & capabilities
Explore company productsCompany Channels
Explore more
About
View channelCatalog
View channelProducts
View channelNews
View channelCertifications
View channelContact
View channelBrands
View channelVideos
View channelPartners
View channelStart a Conversation
Have a project in mind?
Contact SparkFun Electronics to discuss your requirements.