Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: project guidance - Suitability using the teensy.

  1. #1
    Junior Member
    Join Date
    Aug 2014

    project guidance - Suitability using the teensy.

    Hi folks,

    Being very disappointed with the poor support on the due I just ordered a teensy 3.1 board to play around. Its fantastic the work Paul has done so far.

    I started a project on arduino already and would like to hear your toughts on porting it to the teensy.

    I am developing a project for my final university year, a control system for an Electric Vehicle.

    This particular board I am having trouble with will be the user interface. It should be installed on the vehicle dash, driving a 3.2” TFT display to show information, recording mileage, battery capacity, controlling the electric power steering, cluster gauges, etc.

    The board itself communicates with 3 serial ports –

    • Traction motor controller – It reads an RFID at start-up and sends the data to the motor controller for verification. If accepted the vehicle is de-immobilized and it starts receiving data such as motor speed, load, temperatures, etc.
    • Battery management system – Displays battery capacity, actual current consumption, communication with a charging EVSE.
    • A Third serial port is used to communicate with a GSM modem

    The problems:
    So far I am been unable to use a standard arduino for this purpose. As mentioned above a need a number of serial ports that only the due or the mega can provide.
    I find the support for the due virtually non-existent. Even some built in libraries like the tone function are not supported and unlike the AVR based boards I find it hard to write low level due to the different architecture. I also haven't find any library that can read images from the SD on the due either (tiny FAT for UTFT is not supported and Adafruit libraries don't support my display).

    I've read there are issues while using tinyFat and more than one SPI device on the teensy. can anyone please comment?

    AVR devices on the other hand are quite slow. I’ve been modifying a TFT library for speed, managed to get a few fps out of the display using direct port manipulation, but now the bottleneck is the SPI bus - too slow to read the SD card at any reasonable speed (I got 100KB/s).
    I have a menu system that prints error messages as .bmp’s on the TFT and motor details such as current power should be updated instantly on the screen.

    The questions:

    Below are the libraries I plan to use with this board. Will I have any issue at all while trying to use them?
    I can see that driving the display using 16bit mode will basically render the additional Serial/SPI ports useless. Did anyone managed to drive an 8 bit on the teensy? If so what was the performance like?

    This are the libraries I am currently using on my project:

    • UTFT
    • SDFAT
    • Tone
    • RTC – DS1307, via I2C
    • SPI transfer (to shift register)
    • Text finder library
    • SD card
    • EEPROM, I2C
    • Some frequency measurement (I use your libraries, so I know they work).
    • SPI (for a RC-522 RFID tag, SD card and perhaps a Shift Register to increase outputs)

    Again many thanks in advance, I really appreciate any feedback i can get in regards to the above.

    Last edited by cts_casemod; 08-23-2014 at 11:41 AM.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    I'm not sure about text finder, but the rest of this stuff has all been used successfully.

    I tested UTFT with 8 bit interface. It's very fast.

    ILI9341_t3 is also pretty fast now for the SPI-based displays, but not as fast as UTFT with 8 or 16 bit.

    If using the SD library, reading in 512 byte chunks is significantly faster. There's plenty of RAM, so if speed is important, do yourself a favor and use a 512 byte buffer to grab 512 bytes at a time from the SD card.

  3. #3
    Senior Member
    Join Date
    Aug 2014
    Just a note that with the Teensy 3.1, you don't need an external RTC. Add the appropriate crystal to the Teensy and you are all set. Also, on your display, does it have an SPI or I2C interface you can use instead of the parallel interface? That will save some I/O pins.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts