Go Down

Topic: 40x4 Display (FDCC4004A-FLYYBW-51SE, 2x ST7066U) (Read 3578 times) previous topic - next topic

hamiljf

I've got a 40x4 display that has similar pinouts to the usual HD44780, except that it has dual ST7066U controllers (each 40x2 ?) and dual enable lines.  Does anyone know if it is possible to spoof the library by setting one or other of the enable lines myself before writing to the display, thus allowing the use of all four lines ?

Tom Carpenter

#1
Jul 11, 2012, 02:45 pm Last Edit: Jul 11, 2012, 02:52 pm by TCWORLD Reason: 1
I've never tried this (other than it compiles), but can you not just have two instances of display, and give each the same data pins?

Like this:
Code: [Select]

#include <LiquidCrystal.h>

LiquidCrystal lcd[2] = {LiquidCrystal(12, 11, 5, 4, 3, 2),LiquidCrystal(12, 10, 5, 4, 3, 2)}; //Note they have a different  EN pin

void setup() {
 // set up the LCD's number of columns and rows:
 lcd[0].begin(40, 2);
 lcd[1].begin(40, 2);

 //First controller
 lcd[0].setCursor(0, 0);
 lcd[0].print("this is line 0");
 lcd[0].setCursor(0, 1);
 lcd[0].print("this is line 1");
 //second controller
 lcd[1].setCursor(0, 0);
 lcd[1].print("this is line 2");
}

void loop() {
 lcd[1].setCursor(0, 1);
 // print the number of seconds since reset:
 lcd[1].print(millis()/1000);
}

~Tom~

floresta

Quote
I've got a 40x4 display that has similar pinouts to the usual HD44780, except that it has dual ST7066U controllers (each 40x2 ?) and dual enable lines.  Does anyone know if it is possible to spoof the library by setting one or other of the enable lines myself before writing to the display, thus allowing the use of all four lines ?

Why don't you just use a library that is designed for this type of device?  Check out http://code.google.com/p/liquidcrystal440/.

Don

floresta

Quote
I've never tried this (other than it compiles), but can you not just have two instances of display, and give each the same data pins?

That technique works also.  Check this out: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1265969050 (scroll down).

Don

hamiljf

Thanks for the guidance... I've got it running using the two instances method... same pins except for the enables.  Apart from the numerous other bugs in my program, it works fine.
For info, the backlight takes about 1/2 amp.

floresta

Quote
For info, the backlight takes about 1/2 amp.

Did you use a series current limiting resistor?

Don

Tom Carpenter

They do take quite a bit of current. If they are anything like the ones I have previously used in a project, you can get away with a 4.7R resistor and can limit it to about 100mA, but anything more than that, it wont come one.
~Tom~

floresta

Quote
... you can get away with a 4.7R resistor and can limit it to about 100mA, but anything more than that, it wont come one.

That looks about right. 

The datasheet indicates a typical forward current of 480 mA when the forward voltage is 4.2 V which would suggest a 1.67 ohm resistor.  With no resistor the maximum forward voltage rating of 4.6 V would be exceeded and the LED current would be limited only by the supply characteristics.


Don

hamiljf

Yes, the current requirement is HUGE (on the CMOS scale) and will need its own regulation in the final build.  Not enough and it doesn't light, too much and it will fry.  I used a bench power supply with voltage and current limiters to check it out.

JoeN


Quote
I've got a 40x4 display that has similar pinouts to the usual HD44780, except that it has dual ST7066U controllers (each 40x2 ?) and dual enable lines.  Does anyone know if it is possible to spoof the library by setting one or other of the enable lines myself before writing to the display, thus allowing the use of all four lines ?

Why don't you just use a library that is designed for this type of device?  Check out http://code.google.com/p/liquidcrystal440/.

Don


Oh, that is freaking sweet.  I had no idea that existed and I have one of those displays too.  Time to switch over to that library.  Thanks!
I have only come here seeking knowledge. Things they would not teach me of in college.

Go Up