can a teensy lc support 6 potentiometers AND 6 encoders and a display?

skypickle

Active member
as you can tell from my question, i am very new to this.
I am designing a box that willl have 12 dials for a flight sim.
I would also like a screen with labels for the dials
(different vehicles have different dials)
A button would switch out bmp files on the screen. That's all.
The mechanical input of turning the knobs would have nothing to do with the display.

theoretically, the teensy lc has the inputs to do this
27 digital and 13 analog
from this:
https://www.pjrc.com/teensy/td_libs_Encoder.html
I see that each encoder uses 2 digital pins on the teensy. but that document makes the distintinction of interrupt pins and non-interrupt pins.
"
Best Performance: Both signals connect to interrupt pins.
Good Performance: First signal connects to an interrupt pin, second to a non-interrupt pin.
Low Performance: Both signals connect to non-interrupt pins, details below.
"
The teensy documentation does not seem to distinguish between interrupt and non interrupt pins. Can someone enlighten me?

for the display, i imagine i need to store the images somewhere. the teensy lc only has 62 k of flash memory (what a weird amount- why not 64?) and then some of that memory needs to go to storing the arduino sketch. do i need to upgrade to the teensy 4.1 to use its 256 k of flash? or should i have a separate solution to manage the display?

i can only imagine how painful/amusing it is for you all to read this- like patiently waiting for a 3 year old to master walking.
 
Do I need to upgrade to the teensy 4.1 to use its 256 k of flash? or should i have a separate solution to manage the display?
The T4.1 has 4kB of EEPROM which ought to be large enough for your screen dumps.
 
This page lists the interrupts available on each version of Teensy. https://www.pjrc.com/teensy/techspecs.html

Bear in mind that not all interrupts will be available if you use the pins for other functionality, so you have to consider that in your design phase. To help out each Teensy has a product card available on its web page that details the capabilities of each pin.
 
This page lists the interrupts available on each version of Teensy. https://www.pjrc.com/teensy/techspecs.html

Bear in mind that not all interrupts will be available if you use the pins for other functionality, so you have to consider that in your design phase. To help out each Teensy has a product card available on its web page that details the capabilities of each pin.

So the teensy Lc has 18 interrupts and the 4.1 has 55.
So if I understand correctly, the lc could support 12 encoders with a single interrupt pin for each and the teensy 4.1 could support 2 interrupt pins for each encoder.
But how does one tell the teensy that a pin has an interrupt function? Are the ‘interrupt pins’ specific pin locations on the board? I guess I need to study some more code.

And I don’t have a handle on ‘best,good, and low performance. For a dial that controls cockpit illumination or radio tuning, I imagine that good performance is sufficient.
 
So the teensy Lc has 18 interrupts and the 4.1 has 55.
So if I understand correctly, the lc could support 12 encoders with a single interrupt pin for each and the teensy 4.1 could support 2 interrupt pins for each encoder.
But how does one tell the teensy that a pin has an interrupt function? Are the ‘interrupt pins’ specific pin locations on the board? I guess I need to study some more code.

And I don’t have a handle on ‘best,good, and low performance. For a dial that controls cockpit illumination or radio tuning, I imagine that good performance is sufficient.

On the back of the Teensy LC pinout card (https://www.pjrc.com/teensy/pinout.html), it lists which pins can be attached to interrupts. IIRC, on the later Teensys, all pins capable of doing digital input can be an interrupt pin.

Human input is rather slow compared to processor speeds. If the microprocessor is doing other things, including running displays, playing music, operating servos, etc. then you might need more power. One other thing to consider is availability. If you are just buying 1 Teensy, then it doesn't matter as long as you can get the one you are using. But if you will eventually need more, at the moment, the Teensy 3.2, 3.5, and 3.6 are hard to get, so long term it might be better to go with the Teensy 4.0.

I don't know what the long term availability of the Teensy LC is. At the moment, it seems that PJRC, Sparkfun, Digikey, and Mouser have LC's, but Adafruit does not.
 
Last edited:
thank you. Im in Leominster. Ill prob go to the mitflea when they have their first one after a long hiatus in a few weeks. To pick up some pots and encoders. So glad it came back.

If you are in Massachusetts, the Micro Center in Cambridge currently has 2 Teensy LC's and 2 Teensy 4.0's. I don't recall if You-do-it carries Teensys any more (they used to). FWIW, I'm in Ayer.
 
yeah. micro center - the new radio shack. I have to be careful in there. might walk out with a new cpu or something.
 
But how does one tell the teensy that a pin has an interrupt function? Are the ‘interrupt pins’ specific pin locations on the board?

On the Teensy LC pinout card, look for the pins with "INT".

ints.jpg

With the other models where all pins have interrupt capability, look for the footnote which tells you all the pins have interrupts.


the teensy lc only has 62 k of flash memory (what a weird amount- why not 64?)

Internally the chip has 64K, but 2K is reserved for EEPROM emulation. Most tech companies would probably just publish 64K as a spec, since 64K technically is true, but then when you go to use it you find out a portion isn't writable for normal code. PJRC has a practice of publishing more conservative specs (ADC performance in particular comes up often) to give you a honest impression of what you can actually use.
 
On the Teensy LC pinout card, look for the pins with "INT".
....

thank you as well Paul. Your work in this arena is helpful. BTW, can a teensy also communicate with an lcd/epaper screen? it would be nice to have labels for the dials for each vehicle I simulate.
 
For a generic answer, yes, many types of small screens work. Color graphical displays like ILI9341 which have a large number of pixel can also work, but Teensy LC is not nearly as fast as the newer Teensy models. If you redraw a large number of pixels, expect it to be slower.
 
Back
Top