Pages: 1 [2]   Go Down
Author Topic: new LiquidCrystal library problems  (Read 3026 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 35
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Where did you place the Library? Beacause it is not finding it.

Okay, I figured out what was going on now, when I unzipped it I had an extra folder as in \LiquidCrystal_V1.2.1\LiquidCrystal.  I copied all the files to \LiquidCrystal_V1.2.1 and deleted the LiquidCrystal folder.  Then I rename the \LiquidCrystal_V1.2.1 to just LiquidCrystal and now it compiles okay.  Of course the LCD still does not work for some reason.  I am not sure why, I used the exact circuit from the web page.
Logged

Málaga, Spain
Offline Offline
Edison Member
*
Karma: 38
Posts: 2173
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Contrast for the LCD?
Logged

   

Málaga, Spain
Offline Offline
Edison Member
*
Karma: 38
Posts: 2173
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You need to connect a 10k pot to adjust the contrast. Where are you connecting the contrast pin to?
Logged

   

0
Offline Offline
Newbie
*
Karma: 0
Posts: 35
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Contrast for the LCD?

Yes, I have a 10K pot.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 35
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You need to connect a 10k pot to adjust the contrast. Where are you connecting the contrast pin to?

Gnd---|----+5V
         |
         \/
         Pin 3 of LCD

Attached is a picture of my breadboard.



* Serial LCD.jpg (319.83 KB, 647x737 - viewed 23 times.)
« Last Edit: September 07, 2012, 01:58:15 am by Z.K. » Logged

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 44
Posts: 2810
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Pin 8 of the 74HC595 has no ground it is connected to several other pins but not ground.

Doc
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Málaga, Spain
Offline Offline
Edison Member
*
Karma: 38
Posts: 2173
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The schematics that are published in the library's wiki have been tested and are working with LCD library. They all have their corresponding bench mark. There are several schematics which I haven't published in the wiki for the SR2W and SR3W class but they are well documented in the header files.

Review the connections of to the board and make sure that the initialization of the library is correct by passing the correct pin assignement (data, clk, enable). How are you initializing the library? As you have it wired it should be: LiquidCrystal_SR iLCD(2, 3, 4);

On the published wiring, at first glance, the whole thing looks OK appart from the 74HC595 ground pin (which you have it floadting) looks alright.
Logged

   

0
Offline Offline
Newbie
*
Karma: 0
Posts: 35
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Pin 8 of the 74HC595 has no ground it is connected to several other pins but not ground.

Doc

Ah, I missed that, thanks.  Pin 8 and 13 should have been grounded, they are now. Unfortunately, that did not help, still a blank display. 
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 35
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The schematics that are published in the library's wiki have been tested and are working with LCD library. They all have their corresponding bench mark. There are several schematics which I haven't published in the wiki for the SR2W and SR3W class but they are well documented in the header files.

Review the connections of to the board and make sure that the initialization of the library is correct by passing the correct pin assignement (data, clk, enable). How are you initializing the library? As you have it wired it should be: LiquidCrystal_SR iLCD(2, 3, 4);

On the published wiring, at first glance, the whole thing looks OK appart from the 74HC595 ground pin (which you have it floadting) looks alright.

Ah, good point.  I had been messing around with the code so much, I forgot to check that the example sketch was using the correct pins.  So, after grounding pin 8, changing the pins to what they should be, and turning up the contrast, it works now.  Thanks a lot.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 35
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks everyone for your help. The serial LCD with the 595 shift register is working now so I will mark this conversation as solved.
« Last Edit: September 08, 2012, 12:34:43 pm by Z.K. » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 35
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks everyone for your help. The serial LCD with the 595 shift register is working now so I will mark this conversation as solved.


If I could figure out how to mark it as solved that is. 
Logged

Málaga, Spain
Offline Offline
Edison Member
*
Karma: 38
Posts: 2173
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Great to read you sorted it out. Good stuff.

Just put in the title [SOLVED]
Logged

   

0
Offline Offline
Full Member
***
Karma: 3
Posts: 182
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It seems I am having the same problem as ZK in terms of the library not being found and it is driving me a little crazier.  I downloaded the the zip file from https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads and unzipped it into the following directory C:\Program Files (x86)\arduino-1.0\libraries\LiquidCrystal I renamed the original LiquidCryrstal directory in case I need it again.  When I restarted the IDE the examples are found so I thought great we are cooking with gas.  I loaded the example HelloWorld_SR as I have shift register on the LCD and have had it working under a different library.

Compiled the HelloWorld_SR skecth and got the following error 'class LiquidCrysatl_SR' has no member named 'createChar'  I commented out the line with createChar to see if it was only that function and got the same error except this time it was for 'home'
Code:
#include <Wire.h>
#include <LiquidCrystal_SR.h>


LiquidCrystal_SR lcd(8,7,TWO_WIRE);
//                   | |
//                   | \-- Clock Pin
//                   \---- Data/Enable Pin

// Creat a set of new characters
byte armsUp[8] = {0b00100,0b01010,0b00100,0b10101,0b01110,0b00100,0b00100,0b01010};
byte armsDown[8] = {0b00100,0b01010,0b00100,0b00100,0b01110,0b10101,0b00100,0b01010};

void setup(){

  lcd.begin(16,2);               // initialize the lcd

  lcd.createChar (0, armsUp);    // load character to the LCD
  lcd.createChar (1, armsDown);    // load character to the LCD

  lcd.home ();                   // go home
  lcd.print("LiquidCrystal_SR");
}

void loop(){
  // Do a little animation
  for(int i = 0; i <= 15; i++) showHappyGuy(i);
  for(int i = 15; i >= 0; i--) showHappyGuy(i);
}

void showHappyGuy(int pos){
  lcd.setCursor ( pos, 1 ); // go to position
  lcd.print(char(random(0,2))); // show one of the two custom characters
  delay(150); // wait so it can be seen
  lcd.setCursor ( pos, 1 ); // go to position again
  lcd.print(" "); // delete character
}

I must have done something stupid but I am at a loss to figure out what it is I did wrong.

TIA

wade
Logged

Dallas, TX USA
Offline Offline
Edison Member
*
Karma: 47
Posts: 2337
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm assuming that the error(s) are a bit different or that there are additional errors/warnings
from what you reported as LiquidCrysatl_SR is  misspelled.
There may also be other errors/warnings that preceded this that are important.

My guess would be that it is due to the renaming of the old library vs eliminating it
or relocating it to another location.

If relocating the original LiquidCrystal library doesn't solve the problem,
Compile the code in verbose mode and then cut and past the errors so we
can see the exact errors and warnings.

--- bill
Logged

0
Offline Offline
Full Member
***
Karma: 3
Posts: 182
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

bill,

I deleted the original library and all is good.  Yes you were right that I had a spelling problem.

wade
Logged

Pages: 1 [2]   Go Up
Jump to: