20x4 I2C LCD Display setup
i bought 20x4 i2c lcd display , tried make work has not worked correctly. there has experience these can me make work?
i used "newliquidcrystal" library i2c address 0x3f upon advisement seller, , tried examples webpage: https://arduino-info.wikispaces.com/lcd-blue-i2c. appears board fits description of "i2c lcd display version 3" tried example. lcd.backlight() , lcd.nobacklight() commands work no characters display. have adjusted contrast extensively while sketch running , there no legible characters displayed. believe problem lcd declaration statement:
i have tried many variations of statement per other forum posts including other pin numbers, declaration formats, , i2c addresses have seen non-text characters.
if there has been able 1 working please advise correct setup? attached photos of lcd.
i used "newliquidcrystal" library i2c address 0x3f upon advisement seller, , tried examples webpage: https://arduino-info.wikispaces.com/lcd-blue-i2c. appears board fits description of "i2c lcd display version 3" tried example. lcd.backlight() , lcd.nobacklight() commands work no characters display. have adjusted contrast extensively while sketch running , there no legible characters displayed. believe problem lcd declaration statement:
code: [select]
// set pins on i2c chip used lcd connections:
// addr, en,rw,rs,d4,d5,d6,d7,bl,blpol
liquidcrystal_i2c lcd(0x3f, 2, 1, 0, 4, 5, 6, 7, 3, positive); // set lcd i2c address
i have tried many variations of statement per other forum posts including other pin numbers, declaration formats, , i2c addresses have seen non-text characters.
if there has been able 1 working please advise correct setup? attached photos of lcd.
i recommend hd44780 library package.
it includes diagnostic sketch can test i2c signals , h/w possible issues.
it available in ide library manager can , installed ide gui using library manager.
with other i2c lcd libraries must specify address. libraries hard coded work backpacks use specific pin mapping between pcf8574 chip , hd44780 lcd display , if backpack doesn't use pin mapping, won't work.
a few libraries, fm's newliquidcrystal library allow sketch configure pcf8574 pin mappings , backlight control.
if pin mappings not specified correctly, not work.
the hd44780 library can auto detect everything, i2c address, pin mappings, , backlight control.
you can read more here: https://github.com/duinowitchery/hd44780
the hd44780 github page contains information library including installation instructions.
use ide library manager install easier , faster trying manually or using zip install.
also, using ide library manager ensures library installed not mention latest tested version of library.
the library package includes support several different h/w i/o interfaces used communicate lcd module.
each i/o interface has own i/o class , own set of examples.
the examples each i/o class grouped in directory name of i/o class.
while examples available regardless of h/w have, using example i/o class different h/w not work.
it compile not work.
the i/o class want use backpack contains i2c i/o expander chip hd44780_i2cexp
that i/o class includes diagnostic sketch (i2cexpdiag) test i2c signals , internal ram of lcd module verify the library communicating lcd module.
it useful first run sketch verify library talking backpack , lcd module.
read instructions in sketch how run , expect on serial monitor.
after running diagnostic sketch, can run , @ other sketches hd44780_i2cexp i/o class helloworld sketch see header files need included , how declare lcd object.
the hd44780 library contains additional capabilities not available in other libraries like
- return status tell if api functions not working correctly (usually i2c communication issues)
- ability enable automatic line wrapping
- ability read display ram or lcd status
- faster other libraries arduino can run in parallel lcd commands/instructions
i recommend first running diagnostic skech i2cexpdiag verify working, can run , @ other examples included in hd44780_i2cexp i/o class (like helloworld) see header files need included , how declare lcd object.
--- bill
it includes diagnostic sketch can test i2c signals , h/w possible issues.
it available in ide library manager can , installed ide gui using library manager.
with other i2c lcd libraries must specify address. libraries hard coded work backpacks use specific pin mapping between pcf8574 chip , hd44780 lcd display , if backpack doesn't use pin mapping, won't work.
a few libraries, fm's newliquidcrystal library allow sketch configure pcf8574 pin mappings , backlight control.
if pin mappings not specified correctly, not work.
the hd44780 library can auto detect everything, i2c address, pin mappings, , backlight control.
you can read more here: https://github.com/duinowitchery/hd44780
the hd44780 github page contains information library including installation instructions.
use ide library manager install easier , faster trying manually or using zip install.
also, using ide library manager ensures library installed not mention latest tested version of library.
the library package includes support several different h/w i/o interfaces used communicate lcd module.
each i/o interface has own i/o class , own set of examples.
the examples each i/o class grouped in directory name of i/o class.
while examples available regardless of h/w have, using example i/o class different h/w not work.
it compile not work.
the i/o class want use backpack contains i2c i/o expander chip hd44780_i2cexp
that i/o class includes diagnostic sketch (i2cexpdiag) test i2c signals , internal ram of lcd module verify the library communicating lcd module.
it useful first run sketch verify library talking backpack , lcd module.
read instructions in sketch how run , expect on serial monitor.
after running diagnostic sketch, can run , @ other sketches hd44780_i2cexp i/o class helloworld sketch see header files need included , how declare lcd object.
the hd44780 library contains additional capabilities not available in other libraries like
- return status tell if api functions not working correctly (usually i2c communication issues)
- ability enable automatic line wrapping
- ability read display ram or lcd status
- faster other libraries arduino can run in parallel lcd commands/instructions
i recommend first running diagnostic skech i2cexpdiag verify working, can run , @ other examples included in hd44780_i2cexp i/o class (like helloworld) see header files need included , how declare lcd object.
--- bill
Arduino Forum > Using Arduino > Displays > 20x4 I2C LCD Display setup
arduino
Comments
Post a Comment