Pages: [1]   Go Down
Author Topic: 40x4 Display (FDCC4004A-FLYYBW-51SE, 2x ST7066U)  (Read 3205 times)
0 Members and 1 Guest are viewing this topic.
UK
Offline Offline
Newbie
*
Karma: 0
Posts: 42
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ?
Logged

Leeds, UK
Offline Offline
Edison Member
*
Karma: 80
Posts: 1726
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
#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);
}
« Last Edit: July 11, 2012, 07:52:20 am by TCWORLD » Logged

~Tom~

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 37
Posts: 4331
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 37
Posts: 4331
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

UK
Offline Offline
Newbie
*
Karma: 0
Posts: 42
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 37
Posts: 4331
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
For info, the backlight takes about 1/2 amp.
Did you use a series current limiting resistor?

Don
Logged

Leeds, UK
Offline Offline
Edison Member
*
Karma: 80
Posts: 1726
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

~Tom~

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 37
Posts: 4331
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

UK
Offline Offline
Newbie
*
Karma: 0
Posts: 42
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Show Your Work
Offline Offline
Edison Member
*
Karma: 14
Posts: 1100
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

I have only come here seeking knowledge. Things they would not teach me of in college.

Pages: [1]   Go Up
Jump to: