element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum LCD i2c
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 10 replies
  • Subscribers 394 subscribers
  • Views 959 views
  • Users 0 members are here
Related

LCD i2c

Former Member
Former Member over 9 years ago

Hello

 

i'm trying to use a Midas MC22005A6W-SPTLYI  (order 2425728 ) with an arduino uno

... but full newby

 

all example i found on the web as about paralell LCD with an i2c card as addon, an so the libraries and sketch

 

but this LCD is "native i2c" and as i'm not familiar with i2c nothing works ,

i need an example of how to initialize, then write "hello world 1" on line 1 , then on line 2

 

can anybody past something ?

thanks

  • Sign in to reply
  • Cancel
Parents
  • mcb1
    mcb1 over 9 years ago

    perrault

    The first port of call for all these things is the original vendor you purchased it from.

    Anyone that doesn't provide support for hardware is not a good source to buy from.

     

    element14 doesn't sell I2C versions (sadly) but I've always used Terry King at YourDuino

     

    He has all the info you need.

    https://arduino-info.wikispaces.com/LCD-Blue-I2C

     

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 9 years ago in reply to mcb1

    the arduino is a genuine one, it works well on other use

     

    the lcd comes from Farnell / element 14 , so i thought this was a not so bad place to ask about it

    i try to check your link ... hard to connect

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mcb1
    mcb1 over 9 years ago in reply to Former Member

    the lcd comes from Farnell / element 14

    I haven't seen one offered before on element14 but if it's provided as an i2c then there should be some info.

     

    You need to identify the I2C address of the device in order to talk to it.

    LiquidCrystal_I2C lcd(0x27,16,2);  // set the LCD address to 0x27 for a 16 chars and 2 line display

     

    If you can post a link to the device, then we may be able to identify the address they use.

    otherwise this sketch may help.

    https://brainy-bits.com/tutorials/connect-a-character-lcd-using-the-i2c-bus/

     

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • kulky64
    kulky64 over 9 years ago in reply to mcb1

    Four possible device addresses are listed on page 17 of the datasheet:

    http://www.farnell.com/datasheets/2051102.pdf

     

    The default is 0x78. There is even initialization code example on page 19.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 9 years ago in reply to kulky64

    yes ... but i didn't change the address and when i do an i2c scanner, the answer is 0x3C (sometimes both 0x3C and 0xBC) (no other device than the lcd)

    strange

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • kulky64
    kulky64 over 9 years ago in reply to Former Member

    Don't know where 0xBC comes from, but 0x3C is correct. If you remove least significant bit (R/W bit) from 0x78, you will get 0x3C.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • gihu
    gihu over 9 years ago in reply to Former Member

    Hi perrault

     

    Can you share the code you are using?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 9 years ago in reply to gihu

    about scanner ? here it is , runs on arduino uno rev3

     

    /*=================================================================

    Ce sketch est un scanner I2C: il essaye de communiquer avec toutes

    les adresses I2C possibles et affiche celle(s) qui réponde(nt).

     

                          BRANCHEMENT

    * Pin SCD du module à scanner  ----------->  SCD de l’Arduino

    * Pin SDA du module à scanner  ----------->  SDA de l’Arduino

    ================================================================ */

     

    #include <Wire.h>

    void setup()

    {

      Wire.begin();

      Serial.begin(9600);

      Serial.println("\nI2C Scanner");

    }

     

    void loop()

    {

      byte error, address;

      int nDevices;

      Serial.println("Recherche en cours...");     //search is runing

      nDevices = 0;

      for(address = 1; address < 255; address++ )    // first 255 was 127 , but pb to detect ultrasonic sensor

      {

        Wire.beginTransmission(address);

        error = Wire.endTransmission();

     

        if (error == 0)

        {

          Serial.print("Equiment I2C trouve a l'addresse 0x");   // i2c device found at

          if (address<16)

            Serial.print("0");

          Serial.print(address,HEX);

          Serial.println("  !");

          nDevices++;

        }

        else if (error==4)

        {

          Serial.print("Erreur inconnue a l'address 0x");   // unknown error at

          if (address<16)

            Serial.print("0");

          Serial.println(address,HEX);

        } 

      }

      if (nDevices == 0)

        Serial.println("Aucun Equipement I2C trouve\n");   //no device found

      else

        Serial.println("Fini\n");   // end

     

      delay(5000);        

    }

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mcb1
    mcb1 over 9 years ago in reply to kulky64

    It helps if you look back at the original posting ....duuuh.

    Guess this shows the benefit of reading the whole thing ...

     

    Sorry, very handy they are stocked now, as the I2C version is much more useful.

     

     

    I have some code at home for doing the various lines, along with scrolling parts of the display.

    You'll need to give me time to extract it as I'm away for a day.

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • gihu
    gihu over 9 years ago in reply to Former Member

    Hi,

     

    -The for loop try to do it from 1 to 127 (for(address = 1; address < 128; address++ ) ), 7-bit address.

    -kulky64 is right, the default address is 0x3C.

     

    Once you are sure it is working you can start to code the writing of the display.

    Check also https://arduino-info.wikispaces.com/LCD-Blue-I2C

     

    Regards

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • gihu
    gihu over 9 years ago in reply to Former Member

    Hi,

     

    -The for loop try to do it from 1 to 127 (for(address = 1; address < 128; address++ ) ), 7-bit address.

    -kulky64 is right, the default address is 0x3C.

     

    Once you are sure it is working you can start to code the writing of the display.

    Check also https://arduino-info.wikispaces.com/LCD-Blue-I2C

     

    Regards

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube