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

Thread: Teensy 3.2 i2c LCD

  1. #1
    Junior Member
    Join Date
    Dec 2015
    Posts
    17

    Teensy 3.2 i2c LCD

    Hi
    Need help , is a bit confused..

    My earlier project run on a teensy ++2, have now switched to a 3.2
    Uses 2 - 20x4 lcd with a I2c pigyback.

    the command -.... LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
    and the #include <LiquidCrystal_I2C.h> is not supported on the 3.2.

    What is the substitute for this I2c lib ? only I Can find is the LicuidCrystal Fast

    A bit stuck her..

    Best wishes

    Tore

  2. #2
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    6,154
    Hi..

    what means "not supported" ?

    Ok, i didn't find that lib in Teensyduino, but did you try to import that library ?

    Does it work ?

    Don't know if it helps or not, but a copy (or original?) is here: https://github.com/fdebrabander/Ardu...al-I2C-library

    Maybe you need levelshifters (Teensy is 3 Volt, these displays are 5 Volt)
    Last edited by Frank B; 02-17-2016 at 04:51 PM.

  3. #3
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,480
    Back in 2014 or so, I imported LiquidCrystal_I2c into my Teensy environment and it worked on a 16x2 LCD display I originally got from Digistump. I was also able to modify it to use i2c_t3.h instead of Wire.h to use the alternate i2c library. I haven't used it much since then (when I use a display, I've been using the Dig-ole OLED displays instead of the 16x2 display I previously used).

    The display I was using only ran on 5v, so I did need to level shift A4/A5 from 3.3v to 5v. You also need to add the default pull-up resistors (I was using 4.7K resistors back then) for Teensy to use I2C.

  4. #4
    Junior Member
    Join Date
    Dec 2015
    Posts
    17

    Apply also to 3.2 ??

    Quote Originally Posted by MichaelMeissner View Post
    Back in 2014 or so, I imported LiquidCrystal_I2c into my Teensy environment and it worked on a 16x2 LCD display I originally got from Digistump. I was also able to modify it to use i2c_t3.h instead of Wire.h to use the alternate i2c library. I haven't used it much since then (when I use a display, I've been using the Dig-ole OLED displays instead of the 16x2 display I previously used).

    The display I was using only ran on 5v, so I did need to level shift A4/A5 from 3.3v to 5v. You also need to add the default pull-up resistors (I was using 4.7K resistors back then) for Teensy to use I2C.
    HI.
    Was this you are refering to on a 3.2 or another 3.x ment i read somevere that you dont need pull up's om a 3.2 ??

    tore

  5. #5
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,480
    Given the time period, it was likely Teensy 3.0.

  6. #6
    Junior Member
    Join Date
    Apr 2017
    Posts
    1
    I got problems using LiquidCrystal_I2C.h and i2c_t3.h
    Solution: change in the LiquidCrystal_I2C.cpp the call for wire.h:
    //#include "Wire.h"
    #include <i2c_t3.h>
    and the defines of the beginning left only uncomented:
    inline size_t LiquidCrystal_I2C::write(uint8_t value) {
    send(value, Rs);
    return 1;
    }


    Also change the Wire.begin() by the i2c_t3 begin:

    void LiquidCrystal_I2C::init_priv()
    {

    Wire.begin(I2C_MASTER, 0x01, I2C_PINS_18_19, I2C_PULLUP_EXT, 100000);
    Wire.setDefaultTimeout(200000);
    delay(100);


    //Wire.begin();

    _displayfunction = LCD_4BITMODE | LCD_1LINE | LCD_5x8DOTS;
    begin(_cols, _rows);
    }

    Also in LiquidCrystal_I2C.h do the same:

    //#include <Wire.h>
    #include <i2c_t3.h>

    Finaly if the error code is 4 check the logical levels, t3.2 must work with pullup to 3v3 and the devices that works with 5v pullups mus work on this voltages. A level shifter mus be included if its nesesary like this:

    http://image.dfrobot.com/image/data/..._Schematic.pdf
    (bottom left)

    i hope somebody be usefull. Saludos!
    Last edited by lautaroleon; 04-06-2017 at 08:19 PM.

Posting Permissions

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