Jump to content

Recommended Posts

  • 3 weeks later...

Have an arduino lib that I have started converting for Launchpad, but thought I maybe expending effort as it had been done already.

Seems not, so will spend a bit more time and do the conversion.

 Have you had any luck? I am a new to MPS430 and micro controllers in general. I am trying to get a YwRobot 16X2 to work with my launch pad. I get the same error mentioned in a earlier post "conflicting return type specified for 'virtual void LiquidCrystal_I2C::write(uint8_t)'" I understand this because the libary is for and older Arduino IDE.  any help would be nice Thanks

Link to post
Share on other sites


Am using a I2C to LCD port convertor (uses a PCF8574 chip) that is soldered to the 16 pins on a 1602 LCD. 

Am sure others have used this setup as one can buy the two components.





All I need is a Energia library to drive this system.



Most of those screens and attached controllers are designed for Arduino, with 5V.


The LaunchPads operate at 3.3V. 


You need to insert a logic level converter to ensure signals are high enough for the screen and low enough for the MCU

Link to post
Share on other sites

Fixed my problem by adding a Wire,write() 
   Wire.write(1);  ///////////////////////////////////// sketch works ok when this line added
   error = Wire.endTransmission();



Have a look at my other post for details



And as Rio suggested I used two 2N7000 fets and a few resistor for the 3v3 to 5V interface.


Link to post
Share on other sites
  • 2 months later...

Hi abecedarian,


can you upload your source code of library??


I have the same error:


C:\Users\...\Energia\libraries\LiquidCrystal_I2C_Prueba/LiquidCrystal_I2C.h:80:16: error: conflicting return type specified for 'virtual void LiquidCrystal_I2C::write(uint8_t)'
C:\energia-0101E0012\hardware\msp430\cores\msp430/Print.h:55:20: error:   overriding 'virtual size_t Print::write(uint8_t)'



Link to post
Share on other sites
  • 10 months later...

I recently bought a 20x4 LCD with I2C backpack and got it working. I've posted a working library (taken from DFRobot.com) and an example. While I've only used it with the 20x4 LCD it should also work with a 16x2. It has been tested on the MSP430F5529, MSP432P401R, and CC3200. These LCDs need 5V to work and you will need bi-directional logic level conversion. I've posted two circuits that work - one using two BS170 MOSFETs and another with a converter module I bought from Addicore. You can find it here on github.


EDIT: I recently tried this library with a 16 x 2 LCD and it works with that also. You will need to change the variables that hold screen size where indicated in the example.

Link to post
Share on other sites
  • 1 year later...

I succeed  interfacing a 16x2 LCD with a 430G2553 trough a PCF8574A port expansor as I2C/parallel  converter using the DFRobot.com library posted by Fmilburn, after solving the Energia 18 known issue with the 2553 I2C pin association described here

To do this, it iwas necessary to copy the files twi.c and twi_sw.c  in the folder hardware/msp430/cores/msp430 in the Energia installation and, in addition to that, to edit the .cpp file in the library to add the line "Wire.setModule(0);" just before "Wire.begin(0);".

Two additional comments that could be usefull for those that could want to use the same configuration:

1) Pay attention to the chip used in the I2C backpack: Most of the code examples use the address 0x20, that is the default for the to PCF8574 (unless you had been playing with the A0, A1 and A2 pins) but today it is pretty usual to find the version PCF8574A where the default address is 0x38.

2) Most LCDs work with 5V, but the PCF8574 works fine with any voltage in the range 2.5 - 6 V. So, you have two alternatives to wire the LCD to the 2553 without using the space-consuming level converters:

- Connect the backpack to 3.3 V using an additional wire to feed the LCD with 5V, or

- Connect the LCD and the backpack to 5V, but removing the pull up resistors from the SCA and SCL lines on the backpack board and placing them on the pins 14 and 15 of the G2553 (to 3.3V, obviously).

BTW, you should also consider this last solution if you plan to connect more than one display (or other devices) to the I2C bus, to avoid the parallel of the individual pull up resistors.


Link to post
Share on other sites
  • 3 years later...
On 12/26/2012 at 12:22 PM, abecedarian said:

Made some progress using this library: http://www.xs4all.nl/~hmario/arduino/LiquidCrystal_I2C/V1.0/LiquidCrystal_I2C_V1.0.zip


Used +5V and ground from near the USB port to an adjustable voltage regulator. I had 4.84V on the input to the regulator and 3.74V out.

As for IIC/I2C connections, SCL to P1.6, SDA to P1.7.




#include <Wire.h> 
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x20,20,4);  // set the LCD address to 0x20 for a 20 chars and 4 line display

void setup()
  lcd.init();                      // initialize the lcd 
  // Print a message to the LCD.
  lcd.print("43oh.com rocks!     ");
  lcd.print("Now for some RFID...");

void loop()





When iam executing the code it is showing error for 



Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...