OzGrant 22 Posted May 9, 2014 Share Posted May 9, 2014 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. Quote Link to post Share on other sites
Roger 1 Posted May 29, 2014 Share Posted May 29, 2014 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 Quote Link to post Share on other sites
Rei Vilo 695 Posted May 29, 2014 Share Posted May 29, 2014 Yosh, 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. http://www.aliexpress.com/item/5pcs-lot-1602-2004-LCD-Adapter-Plate-IIC-I2C-Interface-Free-Shipping-Dropshipping/1122976396.html and http://www.aliexpress.com/item/IIC-I2C-1602-Serial-Blue-Backlight-LCD-Display-For-Arduino-2560-UNO-AVR-A004-Free-Shipping/690912591.html All I need is a Energia library to drive this system. Grant 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 Quote Link to post Share on other sites
OzGrant 22 Posted May 30, 2014 Share Posted May 30, 2014 Roger,Fixed my problem by adding a Wire,write() e.g. ....... Wire.beginTransmission(address); Wire.write(1); ///////////////////////////////////// sketch works ok when this line added error = Wire.endTransmission(); ......... Have a look at my other post for details http://forum.43oh.com/topic/5473-i2c-scanner-for-2553-5529/ And as Rio suggested I used two 2N7000 fets and a few resistor for the 3v3 to 5V interface. Grant Quote Link to post Share on other sites
Julio 0 Posted August 6, 2014 Share Posted August 6, 2014 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)' Thanks!! Quote Link to post Share on other sites
Fmilburn 446 Posted June 14, 2015 Share Posted June 14, 2015 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. Quote Link to post Share on other sites
JLV 3 Posted January 23, 2017 Share Posted January 23, 2017 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. JLV chicken, dubnet and Fmilburn 3 Quote Link to post Share on other sites
Cheetah 0 Posted September 2, 2020 Share Posted September 2, 2020 I had error for lcd.init(); so what to do Quote Link to post Share on other sites
Cheetah 0 Posted September 2, 2020 Share Posted September 2, 2020 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. Sketch: #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.backlight(); lcd.print("43oh.com rocks! "); lcd.print("Now for some RFID..."); } void loop() { } Result: When iam executing the code it is showing error for lcd.init(); Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.