Enhanced LiquidCrystal

// WH4004A Test Program: WinStar 40x4 LCD 
// using Enhanced LiquidCrystal440.h
// Since the pinouts are different from Forum example 40x4 LCDs
// Available nkcelectronics.  Data sheet WH4004A-YYH-JT.pdf
// To adjust contract, 10K pot between GND and +5V, wiper W to lcd 12
// LCD Func Arduino Desc pins          Dan Magorian 10/19/2010
// 1    DB7  12      Data bus line
// 2    DB6  11      Data bus line
// 3    DB5  10      Data bus line
// 4    DB4   9      Data bus line
// 5    DB3     Data bus line
// 6    DB2     Data bus line
// 7    DB1     Data bus line
// 8    DB0     Data bus line
// 9    E1   4  Chip enable signal, lcd lines 1 & 3
// 10   RW   3      H: Read(MPU?Module) L: Write(MPU?Module)
// 11   RS   2  H: DATA, L: Instruction code
// 12   V0   W  Contrast, gnd = full
// 13   VSS GND Ground for logic
// 14   VDD +5V Supply Voltage for logic
// 15   E2   5      Chip enable signal, lcd lines 2 & 4
// 16      NC
// 17      LED+      Ext +5V Supply for fluor LED+ optional turn fluor on
// 18      LED-      Ext GND Supply for fluor LED- optional turn fluor on
//
// If char blocks show black but nothing prints, adjust contrast pot,
// and check lcd pins 13 and 14: display may not be initialized.  
// If alternate blocks and blank lines show, check E1 or E2. 

#include <LiquidCrystal440.h>
// LiquidCrystal lcd(rs,rw,enable1,enable2,d4,d5,d6,d7);
// Note: some Forum examples using LiquidCrystal440.h have wrong DB pins,
// eg DB0-DB3, or in wrong order.  The top 4 work, in this order.

LiquidCrystal lcd(2, 3, 4, 5, 9, 10, 11, 12);
void setup(){
  lcd.begin (40, 4);
  lcd.clear();
    for (int j=18; j<129; j++) {
      lcd.write(j);
  } // print English chars in rom lower 4 bits, upper 4 bits Japanese
}
void loop() {}