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

Thread: Teensy 3.6 and LiquidCrystalFast library

  1. #1

    Teensy 3.6 and LiquidCrystalFast library

    Hello!

    This is my first post on this forum so forgive me if i didn't post this in the right category

    Anyway i have been using teensys for quite a few hobby projects. Now i bought the Teensy 3.6 and i was trying to controll a LCD (2x16) with the Fast library...
    The ordinary library works perfectly l, but the fast version is giving me problems (characters are placed random on the screen and quite a few are missing)

    The connections are 100% ok (rw pin connected).

    If i try to write only one character and then delay befor writing another one, it works. But i need speed.
    Does anyone else have these problems? I think the LCD is too slow for the 180MHz CPU i think that i measured settinh position and writing one character was 11us while the original lib is 180us (can't remember exactly)

    Thank you!
    Last edited by Tady; 11-28-2016 at 04:16 PM.

  2. #2
    Senior Member
    Join Date
    Apr 2013
    Posts
    1,915
    Suspect you are right on the speed issue, if you go into the library folder and open up the .cpp file. Have a look at whichever function is actually twiddling pins and see if sliding a delay in there improves matters while still giving you the best performance the LCD can sustain.

  3. #3
    I tried a different way:

    lcd.setCursor(0,0);
    delay(5);
    lcd.print("a");
    delay(5);
    lcd.print("b");
    delay(5);
    lcd.print("c");
    delay(5);

    This methow works and shows "abc" on the screen
    But if i write the code like this:

    lcd.setCursor(0,0);
    lcd.print("a");
    lcd.print("b");
    lcd.print("c");

    Or....

    lcd.setCursor(0,0);
    lcd.print("abc");

    I can see only "c" on the first position. If i waii a little the whole screen gets fillec with "c". So this is defenetly a speed issue.
    I think the library for the lcd needs to be rewritten so that there are some nonblocking delays in writing to the LCD. But that is alot of work.
    I will try with the original lib and see if i still have enough speed left to process other things

  4. #4
    Senior Member
    Join Date
    Apr 2013
    Posts
    1,915
    Does the delay really need to be 5 milliseconds, suspect delaymicroseconds would be all that is required
    https://www.arduino.cc/en/Reference/DelayMicroseconds

    Though using the original library will probably get you where you need to be with less excitement.

Posting Permissions

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