G0XAR 19 Posted December 22, 2013 Share Posted December 22, 2013 Hi Guys, Sorry to bother you but I have hit a fundamental problem which I cannot get any further with unless someone else takes a look. I have an MSP430 Launchpad EXP430G2 board with the '553 processor installed in the DIL socket. No clock crystal installed. I have a working RT162-7 display, data sheet here := http://www.ladyada.net/media/lcd/RT162.pdf powered by a separate 5 volt supply. The contrast pot meter works and I can adjust the contrast. I can see the little oblong boxes where the characters display. I know this works because I pulled it from my Arduino system, I loaded up the sketch, which is in the examples folder, below :- /* LiquidCrystal Library - Hello World Demonstrates the use a 16x2 LCD display. The LiquidCrystal library works with all LCD displays that are compatible with the Hitachi HD44780 driver. There are many of them out there, and you can usually tell them by the 16-pin interface. This sketch prints "Hello World!" to the LCD and shows the time. The circuit: ================================= LCD pin Connect to --------------------------------- 01 - GND GND, pot 02 - VCC +5V, pot 03 - Contrast Pot wiper 04 - RS Pin8 (P2.0) 05 - R/W GND 06 - EN Pin9 (P2.1) 07 - DB0 GND 08 - DB1 GND 09 - DB2 GND 10 - DB3 GND 11 - DB4 Pin10 (P2.2) 12 - DB5 Pin11 (P2.3) 13 - DB6 Pin12 (P2.4) 14 - DB7 Pin13 (P2.5) 15 - BL+ +5V 16 - BL- GND ================================= Library originally added 18 Apr 2008 by David A. Mellis library modified 5 Jul 2009 by Limor Fried (http://www.ladyada.net) example added 9 Jul 2009 by Tom Igoe modified 22 Nov 2010 by Tom Igoe This example code is in the public domain. http://www.arduino.cc/en/Tutorial/LiquidCrystal */ // include the library code: #include <LiquidCrystal.h> // initialize the library with the numbers of the interface pins LiquidCrystal lcd(P2_0, P2_1, P2_2, P2_3, P2_4, P2_5); void setup() { // set up the LCD's number of columns and rows: lcd.begin(16, 2); // Print a message to the LCD. lcd.print("hello, world!"); } void loop() { // set the cursor to column 0, line 1 // (note: line 1 is the second row, since counting begins with 0): lcd.setCursor(0, 1); // print the number of seconds since reset: lcd.print(millis()/1000); } And I have triple checked the wiring. The code compiles cleanly and uploads to the board. However, unlike the Arduino which is running the sketch with the same name from it's programming environment, I see nothing displayed. I am aware that the display is a 5 volt part but I believe that it should work with the Launchpad as according to the data sheet input high on the data lines can be 2.2 volts plus. I gave not tried level convertors yet... I even put a new processor in the board but still nothing. Does anyone have a clue what I have done wrong.? TIA Steve Quote Link to post Share on other sites
G0XAR 19 Posted December 22, 2013 Author Share Posted December 22, 2013 er....forgot to mention that the backlight works, with this display you don't see anything without the backlight... Quote Link to post Share on other sites
rockets4kids 204 Posted December 22, 2013 Share Posted December 22, 2013 The startup timing on these LCDs is very sensitive. The ones I have seem to be particularly slow (through still in spec) and the timing constants in many libraries cause it to fail like this. Drove me nuts when I was trying to get one working for the first time. I don't know anything about the timing in the Energia libs, but you might want to get confirmation on that. G0XAR 1 Quote Link to post Share on other sites
enl 227 Posted December 22, 2013 Share Posted December 22, 2013 Have you tried forcing a reset of the processor after powerup? I have not used this driver (I don't think, at least), but several displays I have used take a good second after powerup to initialize. I typically put a 1s delay before trying com with the display. Other things to look at: Common ground between LP and LCD (I know, sounds silly, but we all miss it once in a while) fixed tie pins (R/W and DB0-DB3) grounded, not floating Try connecting it on port one. ( Move the connections and change the pin designations in the code) Use an oscilloscope to watch the pins and confirm timings, in particular RS and ENABLE Watch the pins with the display disconnected Not knowing the defaults on energia, I would double check that the LCD init properly sets the output pins up properly. These things can be really annoying to track down, and smetimes mind numbingly simple when you find it..... Quote Link to post Share on other sites
grahamf72 169 Posted December 22, 2013 Share Posted December 22, 2013 You say you have a separate 5v supply for the LCD, have you linked the ground between the Launchpad and the LCD? I've used this library on quite a few variants of LCD and the only time I've had an issue is when I've missed something with my wiring, eg get EN & RS swapped or forget to link the ground. Sent from my iPad using Tapatalk Quote Link to post Share on other sites
G0XAR 19 Posted December 22, 2013 Author Share Posted December 22, 2013 Thanks Guys, That's given me some points to look at. First thing is to look at the start up times. As the Arduino works fine with the display and the MSP430 does not I am wondering if there is some difference between the Arduino and Energia versions of LiquidCrystal.h Steve Quote Link to post Share on other sites
G0XAR 19 Posted December 22, 2013 Author Share Posted December 22, 2013 Hi Graham, The grounds are linked. Steve Quote Link to post Share on other sites
G0XAR 19 Posted December 23, 2013 Author Share Posted December 23, 2013 Hi Guys, I have solved the problem. I started from scratch with a new plugable breadboard and launchpad board and everything works. I have no idea what caused the problem but thats life... Anyway, thanks for the help. Steve bluehash 1 Quote Link to post Share on other sites
rockets4kids 204 Posted December 23, 2013 Share Posted December 23, 2013 It is not at all uncommon for cheap breadboards to start developing loose connections, particularly if you use anything larger than 22 gauge wire. You might want to flag this breadboard as questionable for the next time you have a circuit on it that is not working. 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.