[resolved] lcd 3 wire using 74HC595

Hi

I try to make this project Arduino Playground - LiquidCrystal Library but i have an error when i try to compile example on that page (HelloWord_SPI). I tested on arduino uno r3

  1. i delete original LiquidCrystal directory from arduino/libraries and put this library from Arduino Playground - HomePage
  2. i try example HelloWord_SPI from this library but i get this error:
In file included from HelloWord_SPI.pde:43:
C:\portable\arduino-1.0.5\libraries\LiquidCrystal/LiquidCrystal.h:86: error: conflicting return type specified for 'virtual void LiquidCrystal::write(uint8_t)'
C:\portable\arduino-1.0.5\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'

On LiquidCrystal.h line 86 i see this code:
virtual void write(uint8_t);

On Print.h line 48 is this code:
virtual size_t write(uint8_t) = 0;

I want to use LCD with 3 wire on 74HC595 and i tested many library from the net (and many electrical configuration) but nothing work. Can anyone guide me to a tutorial and a library that works?

The code you need, depends on the sort of LCD you have.

Many cheap simple LCD's use a particular interface chip? so the same software which correctly deals with that chip
will work. Those are the LCD's which display 2 or 4 lines of text with 16 characters on each line, and they have 16 pins
which need to be set up correctly to work.

You can also buy these same LCD's with a module attached, which converts the interface with the Arduino to an I2C interface.

Other LCD's will have different communication requirements. You need to know what type of LCD you have.

This is the model i used

Is a standard 16x2 char with 16 pins, compatible HD44780 LCD
I used with succes on arduino with 6 wire but now i want to use 3 wire and sift register but i tested 3-4 tutorials (and libraries) and all have some problems.
Any help to rezolve the problem described above with conflict on code?

farsoft:
.
.
Any help to rezolve the problem described above with conflict on code?

Not if you don't post the code you are using!

How are you using the shift reg with SPI?.

Post your circuit diagram.

Mark

i delete original LiquidCrystal directory from arduino/libraries and put this library from Arduino Playground - HomePage

The first part was right. The second part was wrong. LiquidCrystal is now a core library. That is an older version of the library that does not work with 1.0+.

farsoft:
This is the model i used
Basic 16x2 Character LCD - Yellow on Blue 5V - LCD-00790 - SparkFun Electronics
Is a standard 16x2 char with 16 pins, compatible HD44780 LCD
I used with succes on arduino with 6 wire but now i want to use 3 wire and sift register but i tested 3-4 tutorials (and libraries) and all have some problems.
Any help to rezolve the problem described above with conflict on code?

I am not clear what you mean by "3 wire"

This is the tutorial i used Arduino Playground - HomePage
This is the breadboard Arduino Playground - HomePage
This is the library i used (from that tutorial)

This version only works in arduino versions before 1.0
Download here: LiquidCrystal.zip
this version works on arduino 1.0 and the older versions
Download here: LiquidCrystal_1.zip

(i tested both librares but not working)

Next i try to use library from https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!latch-shift-register
and this code

#include <LCD.h>
#include <LiquidCrystal_SR.h>

// constructor prototype parameter:
//  LiquidCrystal_SR lcd(DataPin, ClockPin, EnablePin);
LiquidCrystal_SR lcd(11, 13, 10); 
void setup ( )
{
   lcd.begin ( 16, 2 );

   lcd.print('test');
}

void loop ()
{
   // your code here ...
}

same result, not working.

   lcd.print('test');

Which ONE key did you press to get that character? That is not a string. A string has double quotes. A character has single quotes.

It's unlikely that your LCD can display that character.

ok i change on

lcd.print("test");

nothing changes...

last test:

original schema from https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!latch-shift-register

breadboard connections:

libraries LiquidCrystal_V1.2.1.zip from
https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads

test sketch:

#include <LCD.h>
#include <LiquidCrystal_SR.h>

// constructor prototype parameter:
//  LiquidCrystal_SR lcd(DataPin, ClockPin, EnablePin);
LiquidCrystal_SR lcd(11, 13, 10); 
// 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
}

what is wrong?

Where are the necessary bypass capacitors?

what capacitors? on that wiring diagram from bitbucket.org I see no capacitor.

finaly is working...

i delete arduino install from windows, i download again and reinstal, i put new library, i make again wiring connection on breadboard and finaly is working (only with 74hc595 and 10k rezistor, no need other electronics parts)

problem resolved.
tnks all who try to help me.

Im now having the same problem!! It gives a error while compiling!
Tried reinstalling Arduino.. but in vain! :confused:

It gives a error while compiling!

Would you like an itty-bitty picture of an answer? I don't think so. So, don't EVER post a picture of an error or of code.

Learn to use the Search option. That particular error AND THE SOLUTION has been posted many times over the last two years. I see no reason to post it again.

Im using an Arduino Mega2560.
So, i changed the Pin connection, but Im not getting any output at the lcd display.
Apart from changing the pin connections in the schematic and the sketch, what other changes do I need to do,in order to make it work?