Teensy-LC Beta Testing

OK. I've been talking to him, and he says you and he can collaborate on a fix after 1.21. No urgency.
He gave several suggestions then decided to wait for a baseline. At that point, I asked no more questions, know it's all on hold. That was days ago.

On this forum, I simply responded to Koromix's suggestion, and didn't expect you to need to take note.
 
Last edited:
Currently wondering decent way in library to detect which hardware serial ports are valid for the hardware.

I have some good news for you. Arduino has some #defines to help.

Here's the ons for Teensy 3.x:

https://github.com/PaulStoffregen/cores/blob/master/teensy3/pins_arduino.h#L154

Here's Arduino Mega:

https://github.com/arduino/Arduino/...arduino/avr/variants/mega/pins_arduino.h#L365

Here's Arduino Uno:

https://github.com/arduino/Arduino/...ino/avr/variants/standard/pins_arduino.h#L220

Here's Arduino Due:

https://github.com/arduino/Arduino/...ino/sam/variants/arduino_due_x/variant.h#L252
 
I've posted the "beta12", which should be the very last beta test before final 1.21 release, sometime this weekend. Links are on the original post of this thread, and also here.

At this point, only pretty significant bugs should be reported. There'll be plenty of opportunity to add more features and port the remaining libraries in 1.22.
 
Here's my testing list for Teensy-LC. As more testing is done, and as anyone suggests more things in need of testing, this message will be edited to update the list.

Code:
random
usbMIDI.sendNoteOn
Adafruit_SSD1306 SPI 128x64

Some updates:
Code:
random                       ok
usbMIDI.sendNoteOn           ok
Adafruit_SSD1306 SPI 128x64  ok

random test was from Arduino reference page
Code:
// http://arduino.cc/en/Reference/Random
long randNumber;

void setup(){
  Serial.begin(9600);

  // if analog input pin 0 is unconnected, random analog
  // noise will cause the call to randomSeed() to generate
  // different seed numbers each time the sketch runs.
  // randomSeed() will then shuffle the random function.
  randomSeed(analogRead(0));
}

void loop() {
  // print a random number from 0 to 299
  randNumber = random(300);
  Serial.println(randNumber);  

  // print a random number from 10 to 19
  randNumber = random(10, 20);
  Serial.println(randNumber);

  delay(50);
}

ssd1306 test (Adafruit example but edited to use hardware SPI)
Code:
/*********************************************************************
This is an example for our Monochrome OLEDs based on SSD1306 drivers

  Pick one up today in the adafruit shop!
  ------> http://www.adafruit.com/category/63_98

This example is for a 128x64 size display using SPI to communicate
4 or 5 pins are required to interface

Adafruit invests time and resources providing this open source code, 
please support Adafruit and open-source hardware by purchasing 
products from Adafruit!

Written by Limor Fried/Ladyada  for Adafruit Industries.  
BSD license, check license.txt for more information
All text above, and the splash screen must be included in any redistribution
*********************************************************************/

#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

/* data = DOUT = 11; Clk = SCK  = 13; */
#define OLED_DC     6
#define OLED_CS     10
#define OLED_RESET  8
Adafruit_SSD1306 display(OLED_DC, OLED_RESET, OLED_CS);
/* */

#define NUMFLAKES 10
#define XPOS 0
#define YPOS 1
#define DELTAY 2

#define LOGO16_GLCD_HEIGHT 16 
#define LOGO16_GLCD_WIDTH  16 
static const unsigned char PROGMEM logo16_glcd_bmp[] =
{ B00000000, B11000000,
  B00000001, B11000000,
  B00000001, B11000000,
  B00000011, B11100000,
  B11110011, B11100000,
  B11111110, B11111000,
  B01111110, B11111111,
  B00110011, B10011111,
  B00011111, B11111100,
  B00001101, B01110000,
  B00011011, B10100000,
  B00111111, B11100000,
  B00111111, B11110000,
  B01111100, B11110000,
  B01110000, B01110000,
  B00000000, B00110000 };

#if (SSD1306_LCDHEIGHT != 64)
#error("Height incorrect, please fix Adafruit_SSD1306.h!");
#endif

void setup()   {                
  Serial.begin(9600);
  
  // by default, we'll generate the high voltage from the 3.3v line internally! (neat!)
  display.begin(SSD1306_SWITCHCAPVCC);
  // init done
  
  // Show image buffer on the display hardware.
  // Since the buffer is intialized with an Adafruit splashscreen
  // internally, this will display the splashscreen.
  display.display();
  delay(2000);

  // Clear the buffer.
  display.clearDisplay();

  // draw a single pixel
  display.drawPixel(10, 10, WHITE);
  // Show the display buffer on the hardware.
  // NOTE: You _must_ call display after making any drawing commands
  // to make them visible on the display hardware!
  display.display();
  delay(2000);
  display.clearDisplay();

  // draw many lines
  testdrawline();
  display.display();
  delay(2000);
  display.clearDisplay();

  // draw rectangles
  testdrawrect();
  display.display();
  delay(2000);
  display.clearDisplay();

  // draw multiple rectangles
  testfillrect();
  display.display();
  delay(2000);
  display.clearDisplay();

  // draw mulitple circles
  testdrawcircle();
  display.display();
  delay(2000);
  display.clearDisplay();

  // draw a white circle, 10 pixel radius
  display.fillCircle(display.width()/2, display.height()/2, 10, WHITE);
  display.display();
  delay(2000);
  display.clearDisplay();

  testdrawroundrect();
  delay(2000);
  display.clearDisplay();

  testfillroundrect();
  delay(2000);
  display.clearDisplay();

  testdrawtriangle();
  delay(2000);
  display.clearDisplay();
   
  testfilltriangle();
  delay(2000);
  display.clearDisplay();

  // draw the first ~12 characters in the font
  testdrawchar();
  display.display();
  delay(2000);
  display.clearDisplay();

  // draw scrolling text
  testscrolltext();
  delay(2000);
  display.clearDisplay();
  
  // text display tests
  display.setTextSize(1);
  display.setTextColor(WHITE);
  display.setCursor(0,0);
  display.println("Hello, world!");
  display.setTextColor(BLACK, WHITE); // 'inverted' text
  display.println(3.141592);
  display.setTextSize(2);
  display.setTextColor(WHITE);
  display.print("0x"); display.println(0xDEADBEEF, HEX);
  display.display();
  delay(2000);

  // miniature bitmap display
  display.clearDisplay();
  display.drawBitmap(30, 16,  logo16_glcd_bmp, 16, 16, 1);
  display.display();

  // invert the display
  display.invertDisplay(true);
  delay(1000); 
  display.invertDisplay(false);
  delay(1000); 

  // draw a bitmap icon and 'animate' movement
  testdrawbitmap(logo16_glcd_bmp, LOGO16_GLCD_HEIGHT, LOGO16_GLCD_WIDTH);
}


void loop() {
  
}


void testdrawbitmap(const uint8_t *bitmap, uint8_t w, uint8_t h) {
  uint8_t icons[NUMFLAKES][3];
 
  // initialize
  for (uint8_t f=0; f< NUMFLAKES; f++) {
    icons[f][XPOS] = random(display.width());
    icons[f][YPOS] = 0;
    icons[f][DELTAY] = random(5) + 1;
    
    Serial.print("x: ");
    Serial.print(icons[f][XPOS], DEC);
    Serial.print(" y: ");
    Serial.print(icons[f][YPOS], DEC);
    Serial.print(" dy: ");
    Serial.println(icons[f][DELTAY], DEC);
  }

  while (1) {
    // draw each icon
    for (uint8_t f=0; f< NUMFLAKES; f++) {
      display.drawBitmap(icons[f][XPOS], icons[f][YPOS], logo16_glcd_bmp, w, h, WHITE);
    }
    display.display();
    delay(200);
    
    // then erase it + move it
    for (uint8_t f=0; f< NUMFLAKES; f++) {
      display.drawBitmap(icons[f][XPOS], icons[f][YPOS],  logo16_glcd_bmp, w, h, BLACK);
      // move it
      icons[f][YPOS] += icons[f][DELTAY];
      // if its gone, reinit
      if (icons[f][YPOS] > display.height()) {
	icons[f][XPOS] = random(display.width());
	icons[f][YPOS] = 0;
	icons[f][DELTAY] = random(5) + 1;
      }
    }
   }
}


void testdrawchar(void) {
  display.setTextSize(1);
  display.setTextColor(WHITE);
  display.setCursor(0,0);

  for (uint8_t i=0; i < 168; i++) {
    if (i == '\n') continue;
    display.write(i);
    if ((i > 0) && (i % 21 == 0))
      display.println();
  }    
  display.display();
}

void testdrawcircle(void) {
  for (int16_t i=0; i<display.height(); i+=2) {
    display.drawCircle(display.width()/2, display.height()/2, i, WHITE);
    display.display();
  }
}

void testfillrect(void) {
  uint8_t color = 1;
  for (int16_t i=0; i<display.height()/2; i+=3) {
    // alternate colors
    display.fillRect(i, i, display.width()-i*2, display.height()-i*2, color%2);
    display.display();
    color++;
  }
}

void testdrawtriangle(void) {
  for (int16_t i=0; i<min(display.width(),display.height())/2; i+=5) {
    display.drawTriangle(display.width()/2, display.height()/2-i,
                     display.width()/2-i, display.height()/2+i,
                     display.width()/2+i, display.height()/2+i, WHITE);
    display.display();
  }
}

void testfilltriangle(void) {
  uint8_t color = WHITE;
  for (int16_t i=min(display.width(),display.height())/2; i>0; i-=5) {
    display.fillTriangle(display.width()/2, display.height()/2-i,
                     display.width()/2-i, display.height()/2+i,
                     display.width()/2+i, display.height()/2+i, WHITE);
    if (color == WHITE) color = BLACK;
    else color = WHITE;
    display.display();
  }
}

void testdrawroundrect(void) {
  for (int16_t i=0; i<display.height()/2-2; i+=2) {
    display.drawRoundRect(i, i, display.width()-2*i, display.height()-2*i, display.height()/4, WHITE);
    display.display();
  }
}

void testfillroundrect(void) {
  uint8_t color = WHITE;
  for (int16_t i=0; i<display.height()/2-2; i+=2) {
    display.fillRoundRect(i, i, display.width()-2*i, display.height()-2*i, display.height()/4, color);
    if (color == WHITE) color = BLACK;
    else color = WHITE;
    display.display();
  }
}
   
void testdrawrect(void) {
  for (int16_t i=0; i<display.height()/2; i+=2) {
    display.drawRect(i, i, display.width()-2*i, display.height()-2*i, WHITE);
    display.display();
  }
}

void testdrawline() {  
  for (int16_t i=0; i<display.width(); i+=4) {
    display.drawLine(0, 0, i, display.height()-1, WHITE);
    display.display();
  }
  for (int16_t i=0; i<display.height(); i+=4) {
    display.drawLine(0, 0, display.width()-1, i, WHITE);
    display.display();
  }
  delay(250);
  
  display.clearDisplay();
  for (int16_t i=0; i<display.width(); i+=4) {
    display.drawLine(0, display.height()-1, i, 0, WHITE);
    display.display();
  }
  for (int16_t i=display.height()-1; i>=0; i-=4) {
    display.drawLine(0, display.height()-1, display.width()-1, i, WHITE);
    display.display();
  }
  delay(250);
  
  display.clearDisplay();
  for (int16_t i=display.width()-1; i>=0; i-=4) {
    display.drawLine(display.width()-1, display.height()-1, i, 0, WHITE);
    display.display();
  }
  for (int16_t i=display.height()-1; i>=0; i-=4) {
    display.drawLine(display.width()-1, display.height()-1, 0, i, WHITE);
    display.display();
  }
  delay(250);

  display.clearDisplay();
  for (int16_t i=0; i<display.height(); i+=4) {
    display.drawLine(display.width()-1, 0, 0, i, WHITE);
    display.display();
  }
  for (int16_t i=0; i<display.width(); i+=4) {
    display.drawLine(display.width()-1, 0, i, display.height()-1, WHITE); 
    display.display();
  }
  delay(250);
}

void testscrolltext(void) {
  display.setTextSize(2);
  display.setTextColor(WHITE);
  display.setCursor(10,0);
  display.clearDisplay();
  display.println("scroll");
  display.display();
 
  display.startscrollright(0x00, 0x0F);
  delay(2000);
  display.stopscroll();
  delay(1000);
  display.startscrollleft(0x00, 0x0F);
  delay(2000);
  display.stopscroll();
  delay(1000);    
  display.startscrolldiagright(0x00, 0x07);
  delay(2000);
  display.startscrolldiagleft(0x00, 0x07);
  delay(2000);
  display.stopscroll();
}

noteOn test: Examples/Teensy/USB_MIDI/Buttons without any changes
 
Last edited:
I've fixed Wire slave mode receiveEvent() and Serial1, Serial2 and Serial3 RS-485 transmitterEnable().

These will be in the final 1.21 release. :)
 
Last edited:

Hi Paul,

This has to do with the How to detect if you have some hardware Serial ports. if a library compiled for some platform supports lets say Serial3 or not. If it does not, the program will not compile if I use it.
The problem I am having with these defines is if I compile for an AVR processor like Arduino Mega or Due, I can check:
Code:
#define SERIAL_PORT_HARDWARE3       Serial3
But if I compile this for a Teensy 3.1, we have :
Code:
#define SERIAL_PORT_HARDWARE2		Serial3

So Wondering if maybe Teensy defines here should be updated to match the Mega and/or Due?
Or are there better defines?
 
Sorry for delay, but everything seems to be good (Upload/Serial Monitor) so far with this setup:
Ubuntu 14.04.2 LTS/Arduino 1.6.1/Teensyduino 1.21/Teensy LC
 
Programming with LC and a 3.1 both on USB?

Update in Msg #367
My LC's showed today, been using the 3.1 and still have one plugged in. [ IDE 1.6.1 and TeensyD 1.21 release on Win7 ]

I'm seeing TeensyD get confused over what the sketch was compiled for. I was pushing LC button and getting "Incompatible file, showing warning dialog". [ Also seeing 'grayed' Tools/Ports so perhaps it is Win7 USB assignment confusion - but on replugging I only see the two correct ports as TeensyD halts the affected board. ]

Problem with "Incompatible file" is not being able to get out of it without unplugging a device. When I click the button nothing happens as TeensyD disabled AUTO, when I enable AUTO it wrongly assumes an upload to LC, In the IDE when I switched to '3.1' in this case I also switched Port to the 3.1 port, and once I unplug LC the 3.1 Auto-Programs and clicking Serial goes right out to selected port. If this were two 3.1's the TeensyD would say 'push button' and I'll program that one.

I thought I found a work around changing Port before Board - when I went back to LC this worked - then I repeated to go back to 3.1 and TeensyD is still focused on the LC and in this case 'InterruptBlink' I made for 3.1 is being sent to the LC, and execution on the LC is stopped and left stopped.

TeensyD seems to have a preference for the LC: I had interrupt blink running on both - both usb 'Ports' active. Last uploaded to the 3.1 after pulling the LC. I then tell the IDE 'Upload' with no changes - and it stops the LC and gives error ' ...blink... not compiled for this board', and leaves the LC not active: No USB and No Sketch, repowering LC comes back to former blink Sketch.

My next thought for workaround was 'Verify' to compile without upload since you can't stop IDE from Auto - this generally works as long as the sketch name doesn't change - the same TMP filename gets used. But if the sketch name changes it doesn't work because the IDE doesn't tell TeensyD on 'Verify' - even with a valid HEX produced.

Also odd - when TeensyD tried to put my 3.1 FFT code on the LC, it popped up 'wrong board', but the text on 'TeensyD window' is "FFT.cpp.hex (too large) - which it is at 97+Kb is correct, but not the primary problem. And with a long sketch name you can't see the error at all. TeensyD won't resize, but has a size border. A hover ToolTip showing the message would be handy.

Here is my verbose TeensyD log during the first part of this: View attachment Teensy121_LCvs31.txt
 
Last edited:
The audio library only works on Teensy 3.1 at this time. Someday, a small subset of it might get ported to Teensy-LC, but no substantial work has begun.

The "smuad" instruction is one of many special DSP extension instructions on Cortex-M4. The audio library makes extensive use of those instructions, and the regular non-DSP math instructions that aren't available on Cortex-M0+.
 
The DMA channels also lack the half interrupt feature, so 2 of the 4 channels are needed to do the work of 1 of the more capable 16 DMA channels on Teensy 3.1. It won't be possible to use more than 2 inputs/output simultaneously, due to the DMA limit, even if memory and CPU issues are overcome.

I do eventually intend to get a limited subset of the library working Teensy-LC. I might make the sample rate default to only 22 kHz on Teensy-LC.

The FFT code is unlikely to ever run will on Teensy-LC. Not only does is use the DSP instructions, but large lookup tables are also needed, which can't fit into Teensy-LC's limited flash memory.
 
Indeed I see and understand AUDIO'S: RAM,DMA,DSP - but other than that linked forum post on page one I didn't see a note about it not working- so the LC page might set expectations on Audio - or perhaps the compiler could with "#ifdef LC FAIL: LC can't do this".
 
Last edited:
Update in Msg #367
Using two LC's:
On Win7 but I plugged 2nd LC where the 3.1 was, watched driver install - Good! 2nd Port doesn't show in IDE - even re-plugging it. I uploaded an LC blink and it went to LC#1 without asking. LC#2 still running PJRC blink and TeensyD doesn't see it arrive, even after unplugging LC#1. That did it pull LC#1 and press LC#2 button it got the program. Until this it seemed to also ignore LC#2 on first use - so factory blink doesn't have serial out?

However: LC#1 always gets programmed by IDE with no notice of LC#2. I can only program LC#2 with the sketch already sent to LC#1 by then using LC#2 button (or unplugging LC#1). IDE Serial Monitor stops LS#2 output - but programs LC#1 - then restarts Serial with LC#2 still running. Using two 3.1's the IDE and TeensyD would see that and program the selected serial port, or ask me to push a button.

'Auto Mode Disabled': I closed TeensyD and replugged LC#2 - neither would button program as 'Auto' comes up disabled. Then when I enabled it 'programmed too fast' and got scared because of queued push on both buttons?

<edit> I physically swapped LC#1,2 on USB cable ends - both came up running. I went to the LC#2 on port #34 watching Serial Mon active. New upload had edited text out and higher blink count and it went to LC#1 on port #33 without asking. Seems TeensyD likes my LC#1 more than LC#2 or my 3.1's.

<edit> Two LC's and a 3.1 - each running with outside serial mon (TyQt) so the IDE paused and waited for a button and it worked. This allows me to choose proper device of the 3 - once it consumes the USB port for its built monitor. Closing the TyQt (awesome tool by Koromix) takes it back to TeensyD always trying to program the one LC.
 
Last edited:
The LC is Good talking USB OTG to my Android phones - just like the 3.1! Just tested my old LG and my new Note 4 to OTG plug in my LC to work on both! Using this previously noted: 'USB serial Terminal Pro' (by hosun lim) from Play store.
 
My LC issues don't seem to be new behavior or a problem for TeensyD to solve. I got feedback from Koromix (thanks) RE: #364 and #358 - going back to my 3.1's I see the same behavior in general - as the IDE doesn't identify what device is to be programmed by TeensyDuino. When I first started with IDE 1.6.0 I got the idea it was working differently - but that may have been from having the serial monitor open and perhaps it acted differently before 1.6.1. It may also have been that I got the one I wanted programmed, and is only a functional issue given the 'device mixing' I'm doing now between LC and 3.1 with HEX incompatibility raising that new message. But having the indicated TyQt open keeps TeensyD from assuming the device as it can't get to it with the USB Consumed in the monitor, and it doesn't shut down the same as the IDE one does - so it requires me to push 'button'. With TyQt I haven't seen any problem, as long as I can reach the button.
 
Tested MIDI library 4.2, both with a simple Tx-RX loopback and also with the PC900 opto and a send-recieve loopback via MIDI cable. Also tested with MIDI-OX to verify correct data is being sent.

Works, but needs a change to the test to make it use Serial1 not SoftSerial.

Code:
#if defined(ARDUINO_SAM_DUE) || defined(USBCON)
    // Print through USB and bench with Hardware serial
    MIDI_CREATE_INSTANCE(HardwareSerial, Serial1, midiBench);
#endif

to

Code:
#if defined(SERIAL_PORT_USBVIRTUAL) || defined(ARDUINO_SAM_DUE) || defined(USBCON)
    // Print through USB and bench with Hardware serial
    MIDI_CREATE_INSTANCE(HardwareSerial, Serial1, midiBench);
#endif

Timing is slower than Teensy 3.1 at equivalent clock speed. Presumably because of serial buffer differences?

Code:
MIDI library 4.2, MIDI_bench

Ardino 1.0.6, TD 1.21
loopback RX1(pin 0) to TX1 (pin 1), no opto

LC, 48MHz
Time to receive NoteOn: 
Average: 13 microsecs
Min:     11 microsecs
Max:     19 microsecs

LC, 24MHz
Time to receive NoteOn: 
Average: 23 microsecs
Min:     18 microsecs
Max:     32 microsecs

3.1, 96Mhz
Time to receive NoteOn: 
Average: 4 microsecs
Min:     4 microsecs
Max:     6 microsecs

3.1, 48Mhz
Time to receive NoteOn: 
Average: 6 microsecs
Min:     6 microsecs
Max:     9 microsecs

Arduino 1.6.1, TD 1.21

3.1, 96MHz opt
Time to receive NoteOn: 
Average: 4 microsecs
Min:     4 microsecs
Max:     7 microsecs

3.1, 24MHz
Time to receive NoteOn: 
Average: 10 microsecs
Min:     10 microsecs
Max:     25 microsecs

LC, 48MHz
Time to receive NoteOn: 
Average: 13 microsecs
Min:     10 microsecs
Max:     19 microsecs

teensy out through DIN, 1m cable, in through DIN -> opto -> teensy

LC, 48MHz
Time to receive NoteOn: 
Average: 13 microsecs
Min:     10 microsecs
Max:     20 microsecs
 
Last edited:
Here's my testing list for Teensy-LC. As more testing is done, and as anyone suggests more things in need of testing, this message will be edited to update the list.

I noticed that a few reported test results had not made it to this list. Here is an updated list up to #368 - Paul, perhaps paste this into the first message where it will be more visible?

Code:
digitalWrite                    ok
digitalRead                     ok
pinMode INPUT                   ok
pinMode INPUT_PULLUP            ok
pinMode OUTPUT                  ok
analogRead(num)                 ok
analogRead(A*)                  ok
analogRead(38) temperature      ok
analogRead(40) bandgap ref      ok
analogRead noise level            - #221
analogReference INTERNAL        ok
analogReference EXTERNAL        ok
analogReadResolution            ok
analogWrite                     ok
analogWriteResolution           ok
analogWriteFrequency            ok
analogWrite DAC                 ok
IntervalTimer                   ok
tone, noTone                    ok
delay                           ok
delayMicroseconds               ok
millis                          ok
micros                          ok
elapsedMillis                   ok
elapsedMicros                   ok
attachInterrupt                 ok
pulseIn                         ok - but requires pinMode - msg #53
shiftIn
shiftOut
Serial1                         ok
Serial2                         ok
Serial3                         ok
Serial1.transmitterEnable(pin)  ok
Serial2.transmitterEnable(pin)  ok
Serial3.transmitterEnable(pin)  ok
touchRead                       ok
DMAChannel                      ? - initial test look good - needs a lot more testing
AVR emu: PORT                   ok
AVR emu: PIN                    ok
AVR emu: DDR                    ok
AVR emu: SPI registers          quick test looks good, see #300
AVR emu: SREG
AVR emu: EIMSK
AVR eeprom_read_byte            ok  (bootloader tries not to erase the EEPROM data)
AVR eeprom_read_word                 possible issue with interrupts, msg 100-102
AVR eeprom_read_dword
AVR eeprom_read_block
AVR eeprom_write_byte           ok
AVR eeprom_write_word
AVR eeprom_write_dword
AVR eeprom_write_block
portOutputRegister
portInputRegister
portModeRegister
pgm_read_byte
pgm_read_word
pgm_read_dword                    -- see #139
random                          ok, #354

(crash during auto-reboot)      -- #206
(pauses during upload)          -- #221

Keyboard.print                  ok
Mouse.move                      ok
usbMIDI.sendNoteOn              ok, #283, #354

Serial.print (USB Serial)       ok
Serial.print (USB HID)          ok

Wire                            ok  (tested with SSD1306 display)
Wire slave mode                 ok, see #355
Wire1
i2c_t3                            -- #195, #204
SPI                             ok
SPI1                               - see #171
SPI.setCLK(14)                  fail - see #258-260
SPI.setMISO()
SPI.setMOSI()
SD                              ok - listfiles tested
Ethernet W5100 chip             ok - Webclient and UdpNtpClient tested
Ethernet W5200 chip             ok - Webclient and UdpNtpClient tested
EEPROM
Firmata                         ok - tested StandardFirmata with firmata_test, quick test only
LiquidCrystal
LiquidCrystalFast
Servo                           ok - msg #53
Encoder                         ok - TwoKnobs tested
Keypad                          ok - HelloKeypad & MultiKey tested
SoftwareSerial                  works only if pins are a hardware serial port
Stepper                         ok
PS2Keyboard                     ok
OneWire                         ok - temperature example tested
IRremote                        ok
TinyGPS                         ok - needed updated to version 13, from Mikal Hart's website
Bounce                          ok
AccelStepper
SoftPWM                         ok
ShiftPWM                        fail - doesn't compile, needs porting
Time                            looks good - still need to test GPS & NTP sync examples
TimeAlarms                      ok
Metro                           ok
TimerOne                        ok
TimerThree                      ok
FreqMeasure                     ok
FreqCount                       ok
NeoPixel                        ok
ILI9341_t3                      fail - depends on Teensy 3.x DSPI registers
OctoWS2811                      fail - requires Teensy 3.x DMA - examples use too much RAM
Audio                           fail - depends on Cortex-M4 instructions
FTOLED
Adafruit_CC3000                 ok - buildtest (with SSID+pass) tested
Adafruit_ILI9340                ok
Adafruit_ILI9341                ok
Adafruit_nRF8001
Adafruit_RA8875                 ok - ran textmode and ts_calibration
Adafruit_SSD1306 I2C 128x32     ok
Adafruit_SSD1306 I2C 128x64
Adafruit_SSD1306 SPI 128x32     ok
Adafruit_SSD1306 SPI 128x64     ok, #354
Adafruit_ST7735                 ok with modifications, see #265, #267
Adafruit_STMPE610
Adafruit_VS1053                 fail - works with 24 MHz, fails with 48 MHz
AltSoftSerial                   fail - needs timer defs
Artnet                          ok - #200
CapacitiveSensor                fail - needs I/O register defs
DmxSimple                       fail - depends on DWT timer, not present on Cortex-M0+
DogLcd                          ok
DS1307RTC                       ok
Entropy                         ok - msg #53
FastLED                           - looking good, lib updated needed in Teensyduino, #220, #212
FlexiTimer2                     ok
FrequencyTimer2                 fail - used CMT timer, not present in this chip
ks0108                          fail - this library needs C++ boolean = bool update
LedControl                      ok
LedDisplay                      fail - most works, but writeCharacters fails (also on Teensy 3.1)
MIDI                            ok - needs #define, MIDI 4.2, #368
MsTimer2                        ok
NewPing
OSC
Ping                            ok
PulsePosition                   ok
PWMServo                        fail - needs timer defs
RadioHead
SPIFlash
ST7565                          ok
Tlc5940                         fail - needs defs for hardware
UTFT                            fail - needs cpu define, maybe other work?
UTouch
VirtualWire
x10
OpenGLCD                        ok
SdFat
ledRings                        ok - msg #53
FastCRC                      ok - msg 370
Snooze                          ok - #321
BioloidSerial                   ok, #253
 
Last edited:
Re: LC DAC and DMA

In teensy 3.1 threads, it was noted that spec for 3.1 DAC has nominal settling time of 15us. Teensy LC datasheet says same thing for its DAC. So a for-loop with analogWrite(12,n); takes about 2.5us per analogWrite. So does DAC DMA have any use?

I tried DAC DMA on LC and I could send 1024 12-bit samples in 63 us! (assuming my DMA was working -- DAC value was changing as measured by an analogRead() at the end of the DMA -- though it hadn' t reached the end value of the samples.)

Edit: I guess one could use the PIT timer to trigger the DMA for the DAC at some reasonable interval that would let the DAC settle.
OK, I need some help. I've been trying to do sort of what Paul's audio library does on teensy 3.1(DAC+DMA+PDB), but using the LC's FTM/TPM to clock out DAC values. Here's the sketch that doesn't work
https://github.com/manitou48/teensy3/blob/master/dacDMA.ino
commenting out this and that, I can confirm the FTM1 is ticking at the desired rate. I don't understand how to setup the timer with the DAC with the DMA ....

Adding to my confusion, there is a DMA bit (0x100) in TPMx_SC that is not in the teensy 3* FTMx_SC, and hence no definition in kinetis.h -- but I don't know what it does or how it relates to the DMA bit in TPMx_CnSC
 
Last edited:
Teensy LC stalling on I2C code that works on Teensy 3.0/3.1

Hi,
The attached code stalls at the line 'writeByte(AMBIENT_PARAMETER, 0x0F);'
This code runs A-OK on Teensy 3.0 and 3.1. Something about the i2c_t3 library most likely.
Thanks for any suggestions.
 

Attachments

  • sketch_jun09a_1.ino
    3.9 KB · Views: 102
Hi,
The attached code stalls at the line 'writeByte(AMBIENT_PARAMETER, 0x0F);'
This code runs A-OK on Teensy 3.0 and 3.1. Something about the i2c_t3 library most likely.
Thanks for any suggestions.

FYI - the internal pullups on LC are super weak:
Code:
  Wire.begin(I2C_MASTER, 0, I2C_PINS_18_19, [COLOR=#ff0000]I2C_PULLUP_INT[/COLOR], I2C_RATE_400);

I doubt they will work at 400kHz. Try using external pullups, something ~2k or so.
 
Back
Top