Teensy 3.2 i2c LCD

Status
Not open for further replies.

toreil

Member
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
 
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.
 
Apply also to 3.2 ??

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
 
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/DFR0063/DFR0063_v1.2_Schematic.pdf
(bottom left)

i hope somebody be usefull. Saludos!
 
Last edited:
Status
Not open for further replies.
Back
Top