Teensy 3.6 Question

Status
Not open for further replies.

willyman

Member
Hello,

I just purchased a teensy 3.6. I haven't used a teensy before, I've been strictly using arduino boards. I have a couple questions about the suitability of the 3.6 for the completion of my project.

I have a 24 bit ADC circuit I put together, and is working well. So far I've been reading it (over spi) using arduino code I've written. The adc is read only at about 10 Hz. The micro controller reads the ADC, and updates a 3.5" tft (over spi as well). Previously I used an adafruit feather microcontroller with the feather 3.5" tft display (HX8357 driver): https://www.adafruit.com/product/3651

I found the update rate to the display to be painfully slow using the feather. Hence my decision to purchase a teensy 3.6. I also purchased the feather adapter so the teensy can hopefully pop into place on the back of the 3.5" tft I already have. I'm not familiar with the particulars of the teensy, does this sound reasonable?

Is there an HX8357 library for the teensy? Or will the existing adafruit libraries work on teensy? Apologies if these are ridiculous questions. I searched and couldnt find much on HX8357 for teensy.

Lastly, I see the arduino ide is compatible with teensy, so I can work in an environment I am familiar with. Assuming I did not use the arduino environment on the teensy, what else would one use? Is there an embedded linux or something people use? And then you write code that executes on top of the OS? How is code uploaded to the board in this case? Sorry, I'm not experienced as everyone else here, but trying to learn.
Thanks!!
 
Unsure on the display library, but the Adafruit one should work - key thing is that the SPI bus speed is probably what controls the refresh rate, and that may be limited by the display rather than the Arduino. Basically at the cheap end of the market they make the controller as cheap as they can while still being able to update all the pixels. Rendering the image will certainly be faster and there may be tricks to use the display smarter. The Teensy 3.6 is overkill for this performance wise, but will certainly have the head room for anything you want to do.

One the IDE side Teensyduino is a patch that goes on top of Arduino to intergrate the new functions and support the Teensyloader via USB. So you can program in anything that can then feed arduino and trigger an upload (notepad++ etc) plus there are several IDE plug-ings that either control the teensyloader program (needing an Arduino+Teensyduino install) or use the code provided by PJRC. I'm aware of Eclipse Microsoft visual studio.

In terms of what is actually on the Teensy, that is pure machine code, compiled by your IDE of choice. Micro controllers like Teensyies are really not suited for running an OS for a whole bunch of reasons. It does not stop people trying but generally if you want to work in Linux you get an actual computer like a Pi, and pair it with a micro controller to do the low level stuff that they are designed for.
 
Awesome thanks GremlinWrangler,
Exactly the info I was looking for. Hopefully the Adafruit display library will work, but won't know until it gets here! I did some searching here and it looks like some people have been able to use the ILI9341_t3 library on the HX8357, with a couple changes. That sure sounds odd but I'm going to try it! I'll certainly report back her with results so others can have reference.

Thankyou for the info on what code is loaded to the teensy. I have no intention of running an OS on the teensy, I was just curious what people use if not using the arduino environment. Would you just be compiling c files into a binary and then copying the binary to the teensy? I imagine theres maybe specific libraries you need to use for the chip. What sort of appliication is used to load the compiled code onto the actual board?

Also, what do people use to add wifi to the teensy?
 
I was just curious what people use if not using the arduino environment.

Visual Micro, Sloeber (Eclipse), Embedded Xcode, and makefiles with command line are the popular alternatives. All of these use the core library code from Teensyduino, so they're pretty similar to using Arduino, but you get a different GUI or user interface than the Arduino IDE.

Also popular is using the Arduino IDE in "external editor" mode. I personally use this, with vim as my text editor.

There is some limited support in mbed. That is a completely separate code base. I know very little about it.
 
Awesome thanks GremlinWrangler,
I was just curious what people use if not using the arduino environment. Would you just be compiling c files into a binary and then copying the binary to the teensy? I imagine theres maybe specific libraries you need to use for the chip. What sort of appliication is used to load the compiled code onto the actual board?

Personally, I like using Microsoft Visual Studio (free "Community edition") + "Visual Micro" extension. Visual Micro needs an existing (working) Arduino IDE + Teensyduino installation and adds to Visual Studio the ability to build for Teensy (and Arduino).
The task of actually compiling and linking stuff is left to the GCC toolchain which comes with the Arduino IDE (but you don't need knowing: it's "under the hood", you just select Teensy3.6 and hit Build).
The needed libraries (and headers, typedefs, macros etc.) for Teensy are supplied by the Teensyduino package; again, it's under the hood and you don't need knowing, it's all automatically sorted. EDIT: same goes for uploading the code to the flash (Visual Micro automatically calls an appropriate tool from the Teensyduino package).

Also, what do people use to add wifi to the teensy?

That's a good question actually. Personally I'd love a Teensy 3.6 with integrated WiFi.
Most people seem to use ESP8266, hooked via UART.
Personally I'm not a big fan of ESP8266 and would prefer Atmel ATWINC1500, because it uses less power and all my projects run off batteries/solar.
Anyway there's no such thing as a TCP stack for Teensy + ESP8266, as far as I know.

Fernando
 
“teensquitto” is where the the wifi stack gets transparency to teensies from esp8266. try running an winc1500 in failure mode, watch teensy loop deadlock :)

the winc1500 lockups were the whole reason i ditched the winc1500 in the first place
 
Well, to me low power it's more important than deadlocks after failures (since everything stops with a depleted battery...), but of course YMMV.
 
yup, which is why the library supports ESP methods for software sleeping the ESP, so teensy could tell the ESP to goto sleep
if you really want low power u can just use esp direct, but due to lack of gpios and performance compared to teensy, and you want both, theres nothing lower power wise than making your second microcontroller goto sleep if you have no use for it, or, even have both goto sleep together
 
That's not my point. My point is ESP8266, on average, uses more power when operating (not while sleeping). Anyway I'm not interested in arguing about that: I just use and prefer Winc1500.
 
The needed libraries (and headers, typedefs, macros etc.) for Teensy are supplied by the Teensyduino package; again, it's under the hood and you don't need knowing, it's all automatically sorted. EDIT: same goes for uploading the code to the flash (Visual Micro automatically calls an appropriate tool from the Teensyduino package).
This is was a question in my mind- how the code gets uploaded to flash if you're not using the arduino IDE. If you're not using Visual Studio, are there still ways of uploading to flash? I run Linux at home, so no Visual Studio. I use either Vim or CLion. What would be some methods to upload to flash in that case?

That's a good question actually. Personally I'd love a Teensy 3.6 with integrated WiFi.
Most people seem to use ESP8266, hooked via UART.
Personally I'm not a big fan of ESP8266 and would prefer Atmel ATWINC1500, because it uses less power and all my projects run off batteries/solar.
Anyway there's no such thing as a TCP stack for Teensy + ESP8266, as far as I know.
Fernando
There are some comments about the ATWINC1500 deadlocking- I'd never heard about this before, what does it consist of? What is the "failure mode" referenced? I have a feather M0 with the ATWINC1500, is the deadlocking a frequent occurrence?

Thank you all for your detailed answers so far, the info is very helpful!!
 
run the library with the module disconnected, it should lock up the micro, this is no good for a critical project i find, especially if it fails for whatever reason
i tried several of them ordered from adafruit and other places, now theyre collecting dust in my drawer
i moved to the esp route, theyre cheaper and more functional with the proper handling
 
Status
Not open for further replies.
Back
Top