You are not logged in.

#1 2016-02-26 13:17:19

neurofun
Member
Registered: 2016-02-23
Posts: 4

i2c 2x16 lcd support

Hi,

Am I right to assume that nanodlp will only work with "arduino compatible" i2c 2x16 lcd displays based on the PCF8574  8 bit i/o expander for 12c bus?
And that other displays will not work?

Thanks

Offline

#2 2016-02-26 16:46:16

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,546

Re: i2c 2x16 lcd support

neurofun,

I have tested it only on 16x2 display as you said. But it probably works on 20x4 too. Also fixed on 5x8 dots.

Offline

#3 2016-02-26 17:11:24

neurofun
Member
Registered: 2016-02-23
Posts: 4

Re: i2c 2x16 lcd support

Ok, thanks for the fast reply.

I tried to get the adafruit raspberry pi i2c lcd to work with nanodlp but since it uses the mcp23017 16 bit io expander it didn't work.

I'll just order another display.

Offline

#4 2016-03-21 20:27:24

CADPRINT Scherer
Member
Registered: 2016-02-21
Posts: 16

Re: i2c 2x16 lcd support

Does someone have a tip how to get the I2C Display running. I alway get the message "Could not access LCD write /dev/i2c-1: input/output error". chmod 777 on the file does not make any changes.
I do using this "http://www.sainsmart.com/new-sainsmart- … ga-r3.html" LCD witch is running on Port 27.

With the Python test Prog at commandline i'll get the correct display on the LCD.

Offline

#5 2016-03-21 21:55:38

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,546

Re: i2c 2x16 lcd support

Could you post your /boot/config.txt and /etc/modprobe.d/raspi-blacklist.conf files?
Which python test program is working correctly?

Offline

#6 2016-03-22 21:45:05

CADPRINT Scherer
Member
Registered: 2016-02-21
Posts: 16

Re: i2c 2x16 lcd support

The Test Python Prog i use is: "wget https://bitbucket.org/MattHawkinsUK/rpispy-misc/raw/master/python/lcd_i2c.py"

The only enabled Setting in config.txt are:
dtparam=audio=on
start_x=1
gpu_mem=128
dtparam=i2c_arm=on
disable_camera_led=1
hdmi_pixel_encoding=2
dtparam=i2c1=on

and the Blacklist is empty

Offline

#7 2016-03-22 22:34:23

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,546

Re: i2c 2x16 lcd support

Initialization bytes are quite different. Usually majority of these matrix LCDs are based on Hitachi HD44780 controller.
On their website it says address is 0x32 and not 0x27
http://www.sainsmart.com/new-sainsmart- … ga-r3.html

Again I have downloaded zip file on the website and init code is same as ours as it written for Hitachi HD44780.

Offline

#8 2016-03-23 06:09:10

CADPRINT Scherer
Member
Registered: 2016-02-21
Posts: 16

Re: i2c 2x16 lcd support

Adress 32 does also not work and the command "i2cdetect -y 1" gives the following result:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- 27 -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

Offline

#9 2016-03-23 12:21:48

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,546

Re: i2c 2x16 lcd support

Do the sample on their website worked on your unit? http://www.selloutsoon.com/albums/docum … IC1602.zip
Do you know if it use HD44780 or its a different controller? I am not familiar with these controllers but maybe different initialization codes are acceptable in different conditions.

nanoDLP returned error just after initialization code, so most probably it is due to rejection of initialization code.

Offline

#10 2016-03-23 17:21:43

CADPRINT Scherer
Member
Registered: 2016-02-21
Posts: 16

Re: i2c 2x16 lcd support

it is a "pcf8574t" i2c controller

Offline

#11 2016-03-23 17:47:47

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,546

Re: i2c 2x16 lcd support

It is i2c controller. See if you could find LCD's controller.

Offline

#12 2016-03-23 20:13:09

CADPRINT Scherer
Member
Registered: 2016-02-21
Posts: 16

Re: i2c 2x16 lcd support

The only printed Label i cold find is 1602A on the backside.
Teh display looks exaclty like on this one "http://www.aliexpress.com/item/1602A-LC … 52414.html" diferent is just the i2c module.

Offline

#13 2016-03-31 11:27:13

neurofun
Member
Registered: 2016-02-23
Posts: 4

Re: i2c 2x16 lcd support

CADPRINT Scherer wrote:

Adress 32 does also not work and the command "i2cdetect -y 1" gives the following result:

  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- 27 -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

your lcd adress = 27 hexadecimal
in nanodlp you enter the adress in decimal which equates to 39

Offline

#14 2016-03-31 14:01:34

CADPRINT Scherer
Member
Registered: 2016-02-21
Posts: 16

Re: i2c 2x16 lcd support

Yes, with the Dec. Address of 39 it works.

Offline

#15 2016-04-22 22:29:34

remir07
Member
Registered: 2016-04-22
Posts: 1

Re: i2c 2x16 lcd support

Sorry guys is the first time for me with nanodlp.
I've bought a LCD 16x2 but i have not idea how i can connect it at the rasp. What are the pin of the GPIO(there is a wiring diagram for the connection?) ? tanks a lot

Offline

#16 2016-04-22 22:45:37

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,546

Re: i2c 2x16 lcd support

You should use SDA (Physical 3) and SCL (Physical 5) pins.

Offline

#17 2017-09-12 10:04:05

jhpadjustable
Member
Registered: 2017-08-20
Posts: 11

Re: i2c 2x16 lcd support

Is there a way to specify which I2C bus number is used?  In Armbian, on the Orange Pi PC, I2C bus numbers appear to be packed, and the highest numbered I2C bus seems to be unavailable.  I've tested that my 16x2 LCD works fine on /dev/i2c-0 using i2cset.

Offline

#18 2017-09-13 04:43:35

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,546

Re: i2c 2x16 lcd support

Please, share bus number and i2c address.
I guess by packed number you mean hexadecimal which must be converted to decimal before entering into nanodlp.

Offline

#19 2017-09-13 04:50:19

jhpadjustable
Member
Registered: 2017-08-20
Posts: 11

Re: i2c 2x16 lcd support

Sorry to be unclear.  The Orange Pi PC under Armbian has /dev/i2c-0 enabled, which goes to some unidentified device with address 0x65.  When I enable the overlay for i2c0, the I2C bus on physical pins 5 and 7 shows up as /dev/i2c-0 and the strange bus becomes /dev/i2c-1.  This strange bus shows up as highest bus used + 1 rather than its actual hardware unit number.  So the algorithm of just using the highest bus number doesn't work for this machine.

Offline

#20 2017-09-13 10:55:01

jhpadjustable
Member
Registered: 2017-08-20
Posts: 11

Re: i2c 2x16 lcd support

More info:
With i2c0 enabled in the boot config, my I2C LCD board shows up:

root@print0r:/# i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- 27 -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
root@print0r:/# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- UU -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         

Without i2c0 enabled in the boot config, no LCD:

root@print0r:/# i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- UU -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
root@print0r:/# i2cdetect -y 1
Error: Could not open file `/dev/i2c-1' or `/dev/i2c/1': No such file or directory

Offline

#21 2017-09-13 19:22:53

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,546

Re: i2c 2x16 lcd support

Have you tried set i2c address 39

Offline

#22 2017-09-13 23:00:37

jhpadjustable
Member
Registered: 2017-08-20
Posts: 11

Re: i2c 2x16 lcd support

Shahin wrote:

Have you tried set i2c address 39

Yes, that's the default.  I've also tried address 38 (0x26), but no change.  nanoDLP is using the wrong bus, apparently skipping i2c0 entirely:

crw-rw---- 1 root i2c 89, 0 Sep 13 12:55 /dev/i2c-0  # the bus where the PCF8574 LCD is, works via i2cset
crw-rw---- 1 root i2c 89, 1 Sep 13 12:55 /dev/i2c-1  # a phantom bus, not pinned out on this board, doesn't respond
{"Layer":"0","module":"Gcode","level":"Error","msg":"Could not access LCD write /dev/i2c-1: no such device or address"}

Can the I2C bus be made a configuration option?  Build 1609.

Offline

#23 2017-09-14 04:52:52

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,546

Re: i2c 2x16 lcd support

Sure it is possible, but we will have yet another field on the setup page.

Offline

#24 2017-09-14 05:03:43

jhpadjustable
Member
Registered: 2017-08-20
Posts: 11

Re: i2c 2x16 lcd support

Shahin wrote:

Sure it is possible, but we will have yet another field on the setup page.

Would it be better to just try them all in turn, and stick with the first one where a device responds to the address given?

Offline

#25 2017-09-14 16:03:27

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,546

Re: i2c 2x16 lcd support

Checkout the beta version.

Offline

Board footer

Powered by FluxBB