Go Down

Topic: [ RISOLTO ] Display 16x2 i2c (Read 217 times) previous topic - next topic

iz2fly

Nov 17, 2015, 04:03 pm Last Edit: Nov 17, 2015, 06:28 pm by iz2fly
Buongiorno a tutti, sto tentando di utilizzare questo display, (SDA=A4, SCL=A5)

http://eu.banggood.com/Wholesale-Warehouse-IIC-I2C-1602-Blue-Backlight-LCD-Display-Module-For-Arduino-wp-Uk-950726.html

con interfaccia i2c giĆ  montata e chip PCF8574AT, ma non riesco neppure a compilare lo sketch di base, fino ad ora ho utilizzato un display grafico 64x128 con la libreria u8g senza problemi.

Risolto il problema utilizzando la libreria PCF8574_HD44780_I2C e modificando address di default 0x27 con 0x3F
Info trovate in > http://arduino-info.wikispaces.com/LCD-Blue-I2C

I2C LCD DISPLAY VERSION 1:LCD-A0A1A2.jpg
Example Software Sketch for 2 line 16 character Displays:
(NOTE: for displays with backpack interface labelled "YwRobot Arduino LCM1602 IIC V1")
(NOTE: Also for displays with backpack interface labelled "A0 A1 A2" photo: right).
(NOTE: Most displays use I2C Adress 0x27 but a FEW use 0x3F (Change in code below)

Vedi sketch di prova usato:

#include <Wire.h>
#include <PCF8574_HD44780_I2C.h>


// Address 0x27, 16 chars, 2 line display

//PCF8574_HD44780_I2C lcd(0x27,16,2); // DEFAULT
PCF8574_HD44780_I2C lcd(0x3F,16,2);   // MODIFICATO


void setup()
{
  lcd.init();           // LCD Initialization             
  lcd.backlight();      // Backlight ON
  lcd.clear();          // Clear the display
 
  lcd.setCursor(0,0);   // Set the cursor to col 0, row 0
  lcd.print("Risolto");   // Print the first word
  lcd.setCursor(0,1);   // Set the cursor to col 0, row 1
  lcd.print("Address 0x3F");  // Print the second word
}

void loop()
{
}

Alla prossima.


 

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy