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

Thread: Teensy 3.6 and TLC5973 library

  1. #1
    Junior Member
    Join Date
    Feb 2020
    Posts
    3

    Teensy 3.6 and TLC5973 library

    Hi All, newbie here!!

    I have been trying for the last week to make a DMX to TLC5973 driver.

    I am having success with the TeensyDMX library, on a teensy 3.6 however cant get the 3.6 to talk to the TLC chip.

    TeensyDMX only works on 3.1/3.2/ 3.6 (whichI realise are 3.3v chips). TLC chip (in its configuration needs 5v logic). I added a high frequency bus transceiver chip to level shift, this does its job fine however still doesn't send the correct data to the TLC chips

    A teensy 2.0 (which is 5v, doesnt run dmx library) at 16MHz clock I can get talking to the TLC no problem. If i run the simplest code, for example

    ///////////////////////////////////////////////
    N=1; //only one TLC controller chip
    Pin=12; //SDI connected to this pin

    TLC5973 strip=TLC5973(N, Pin);

    strip.begin();
    strip.setPixelColor(0, 4, 20, 400); // first chip (0) to these output levels
    strip.show();

    this lights up the chips 3 outputs correctly. When i probe the SDI line with a scope i see:

    a pulse train that clearly is of the form 18/12/12/12, total duration about 180us, pulse widths are 730ns and tcycle (the period of the first two pulses which determine the clocking speed of the entire message ) is about 3.2us (datasheet spec is between 0.3us and 10us). So the teensy 2 at 16MHz seems to be talking correctly to the display chip at a Fclk rate of about 300khz. All good.

    Now to probe the 3.6. same code, i am running slightly faster here however at 24MHz.

    The TLC does not respond to the 5v translated bitstream which makes sense in terms of periods and clocks however the data format is clearly different. I see a format that is 18/15/14/13 bits (there are small gaps between these.

    Any idea whats going on here? The data sheet (needs some reading) indicates 12bit words per led, therefore 36bits. How can same code/ different processor put out different code yet with almost similar structure??

    I have tried changing the output pin on the 3.6 thinking there may be some conflict - not tried all but same problem so far.

    Any pointers?? Going a bit mad here!

    (and really wish i hadnt zapped my 3.2 i had the other day)
    Jon

  2. #2
    Junior Member
    Join Date
    Feb 2020
    Posts
    3
    My mistake on last post, actually format was same between teensies, the last three words appear with pulses according to data.

    I have just set the 3.6 to "Fast" in the arduino IDE (rather than the default "fastest", no idea what these mean just yet) and it Works! The resulting clock does seem slower and not sure why it works.

    T3.6@24MHz
    with "Fastest" this code gives a pulse width of ~520ns, t_cycle of 1.26us (Fcycle=800KHz), T (packet width)=77us
    wit "Fast" pulse width of ~520ns, t_cycle of 2.1us (Fcycle=475kHz), T (packet width) = 118us

    T2.0@16MHz
    pulse width =720us, t_cycle of 3.2us (~300KHz) T(packet width)=182us

    No idea what on earth is going on

  3. #3
    Senior Member
    Join Date
    Mar 2017
    Location
    Oakland, CA, USA
    Posts
    173
    TeensyDMX works on Teensy 4.0 too. Are you referring to this one? https://github.com/ssilverman/TeensyDMX

Posting Permissions

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