New to Teensy, got a few questions for those with knowledge

Status
Not open for further replies.

neroroxxx

Well-known member
Hi, after using my first teensy 3.6 i will never be able to use any other board, these things are monsters! I'm now a big fan!

Back to topic, I have a few questions about the 3.6 and 3.2, any help would be greatly appreciated.

#1 Is there a variable that holds the Teensy's model number? I would like my library to tell if it's a Teensy 3.2 or 3.6, something like #ifdef TEENSY_36 etc, is there a way to do this?

#2 How long would the RTC 3v battery last on either the 3.2 / 3.6? I'm assuming this will only keep the clock running and will only use the battery when there is no other power source?

#3 is the Usb Host library still being developed? currently i'm using a USB host shield for my projects which works fine but iw ould much prefer using the built in usb host to save space.

#4 is it possible to hardwire a cable like this one https://www.adafruit.com/product/3258 (that is cutting the male end) i basically want to have the female end mounted in the enclosure but when you plug it in the plug takes up more room and i figured if i can hardwire it that would same me more room.

#5 what happens if you run the Time library on a 3.2 without the crystal? will it just not keep time? I already soldered the crystal on mine so i can't test it but i want to include it in my library for all my future projects.

Thank you and Great work to the teensy developers! I can't go back to bulky slower boards anymore!!
 
Hi, after using my first teensy 3.6 i will never be able to use any other board, these things are monsters! I'm now a big fan!

Back to topic, I have a few questions about the 3.6 and 3.2, any help would be greatly appreciated.

#1 Is there a variable that holds the Teensy's model number? I would like my library to tell if it's a Teensy 3.2 or 3.6, something like #ifdef TEENSY_36 etc, is there a way to do this?

There isn't a variable per se, but there are preprocessor definitions you can use. For example, I have this in my general configuration file:

Code:
#if defined(__arm__) && defined(CORE_TEENSY)
#define PROCESSOR_TEENSY_3_X	1		// run on Paul Stoffregen's ARM Cortex M4 based teensy 3.0/teensy 3.1

#if defined(__MK20DX128__)
#define PROCESSOR_TEENSY_3_0	1

#elif defined(__MK20DX256__)
#define PROCESSOR_TEENSY_3_1	1
#define PROCESSOR_TEENSY_3_2	1

#elif defined(__MKL26Z64__)
#define PROCESSOR_TEENSY_LC	1

#elif defined(__MK64FX512__)
#define PROCESSOR_TEENSY_3_5	1

#elif defined(__MK66FX1M0__)
#define PROCESSOR_TEENSY_3_6	1

#else
#error "Unknown Teensy, fix Meissner_Config.h"
#endif

#2 How long would the RTC 3v battery last on either the 3.2 / 3.6? I'm assuming this will only keep the clock running and will only use the battery when there is no other power source?

No idea, but non-rechargeable batteries on external DS3132 are said to last for years. I did try rechargeable batteries, and they tended to last a month or so if I didn't keep the machine powered on.

#3 is the Usb Host library still being developed? currently i'm using a USB host shield for my projects which works fine but iw ould much prefer using the built in usb host to save space.

It is probably on Paul's large list of things to do. We need more Paul clones :cool:

#4 is it possible to hardwire a cable like this one https://www.adafruit.com/product/3258 (that is cutting the male end) i basically want to have the female end mounted in the enclosure but when you plug it in the plug takes up more room and i figured if i can hardwire it that would same me more room.

See:

I don't know if the 3.6/3.5 have the D+/D- pins in the same location.

#5 what happens if you run the Time library on a 3.2 without the crystal? will it just not keep time? I already soldered the crystal on mine so i can't test it but i want to include it in my library for all my future projects.

Thank you and Great work to the teensy developers! I can't go back to bulky slower boards anymore!!
No idea.
 
Welcome to Teensy. I too am a new to Teensy, I have a few years with Arduino and I'm not looking back. What excites me most are speed and ram. I've very often run out of memory on Arduino as i tend to use lots of fancy fonts with LCD's. But I agree these things are monsters and this community is very helpful.

Welcome home.
 
#2 How long would the RTC 3v battery last on either the 3.2 / 3.6?

This was recently measured at 2.4 uA, on a Teensy 3.6 at room temperature.

So if you have a CR2032 rated at 220 mAH, it should last for 91,667 hours.

However, batteries also self-discharge. Good quality non-rechargable lithium ones are rated at about 1% per year. That will reduce the life somewhat.

I'm assuming this will only keep the clock running and will only use the battery when there is no other power source?

Yes, it only keep the clock running. There's also a very small memory area it keeps. The Teensyduino startup code uses the last 4 bytes of that area to detect whether the clock was previously set. The rest you can use, if you want to keep some data around.


#5 what happens if you run the Time library on a 3.2 without the crystal?

The Time lib uses the main system clock to keep time. It is designed to sync to a RTC (or other time sources, like GPS, internet, etc).
 
Status
Not open for further replies.
Back
Top