Hello
With i2cset it replies incorrect mode i can use mode b or w ... But i think it's normal ... i've seen this option several times but not very often .
i'm using this process to initialize LCD crystal 2x16 using a pcf8594 I2C 8bit expander port : Tech Docs
So i've tried orther method using python without smbus import...
Peripheri.i2c do that.
I can only turn on/off backlight ...
Thanks for helping .... Oméga it's cool !!¡
a bit of incomplete code ...
#!/usr/bin/python
import i2c
import pyOmega
pyOmega.mSec(100)
#Open i2c-0 controller
chip = i2c.I2C("/dev/i2c-0")
##LCD PROC
def lcd_reset():
chip.transfer(0x27, [i2c.I2C.Message([0xFF])])
pyOmega.mSec(20)
chip.transfer(0x27, [i2c.I2C.Message([0x83])])
chip.transfer(0x27, [i2c.I2C.Message([0x03])])
pyOmega.mSec(15)
chip.transfer(0x27, [i2c.I2C.Message([0x83])])
chip.transfer(0x27, [i2c.I2C.Message([0x03])])
pyOmega.mSec(5)
chip.transfer(0x27, [i2c.I2C.Message([0x83])])
chip.transfer(0x27, [i2c.I2C.Message([0x03])])
pyOmega.mSec(5)
chip.transfer(0x27, [i2c.I2C.Message([0x82])])
chip.transfer(0x27, [i2c.I2C.Message([0x02])])
pyOmega.mSec(5)
def lcd_init():
lcd_reset()
lcd_cmd(0x28)
lcd_cmd(0x0C)
lcd_cmd(0x06)
lcd_cmd(0x80)
lcd_cmd(0x80)
def lcd_cmd(xcmd):
print xcmd
lcd_cmd(0x28)