funny hacks and findings with 16x1 LCD, getting it working w no external parts

So, I got an old Lumex 16x1 LCD, hitachi 447xx whatever driver on it, but come to find out, this is one of those strange LCDs that actually operate as an 8x2, and needed a little coaxing to get it to work, not to mention, all I had was an ATMega 1280 laying around, so here is how I did it..

#include <LiquidCrystal.h>
LiquidCrystal lcd(48, 44, 34, 32, 30, 28);
char lcdbuffer[]="0123456789ABCDEF";

void setup()
{
  pinMode(46, OUTPUT); //READ/WRITE pin setup
  digitalWrite(46, LOW); // READ/WRITE value
  pinMode(50, OUTPUT); //CONTRAST pin setup
  digitalWrite(50, LOW); //CONTRAST BEING TRIED W PULLUP, and potentiometer
  delay(5); //DO IT! FOR suppressing transients
  pinMode(52, OUTPUT); // vcc
  digitalWrite(52, HIGH); // VCC - actually power on the LCD
// pinMode(48, OUTPUT); //REG SELECT  // digitalWrite(48, LOW); // REG SELECT
// pinMode(44, OUTPUT); // ENABLE H,H/L (FALLING CLOCK ENABLE)  // digitalWrite(44, LOW); // ENABLE  
  delay(10); // allow atmega board to settle
  lcd.begin(16, 2);     // for SOME reason you have to initialize it as a 16x2 here or it wont map
                        // the address space properly, so it will only init 8x1 in the loop after setup
  delay(35);            // allow lumex board to settle
  lcd.setCursor(0, 0);
  Serial.begin(9600);
  lcd.begin(8, 2);
} // END SETUP FUNCTION (ONE TIME INIT)

void loop()
{
  byte i=0;
  char inChar;

  while (Serial.available() > 0)
  {
    i=0;
    delay(5); //allow serial to catch up
    while(i < 17) // One less than the size of the array
    {
      inChar = Serial.read(); // Read a character
      lcdbuffer[i] = inChar; // Store it
      i++; // Increment where to write next
    }
    //lcd.clear();

    for (i=0;i<16;i++)
    {
      if(i<8)
      {
        lcd.setCursor(i, 0);
        lcd.write(lcdbuffer[i]);
      }
      if(i>7)
      {
        lcd.setCursor((i-8), 1);
        lcd.write(lcdbuffer[i]);
      }
      delay(1); // sync time for each letter, draw rate
    }
    i=0;
    delay(1500); //time to keep each 16x on screen
  }
  delay(5000); // refresh rate for messages (once buffer is cleared)

}     //END VOID LOOP

So basically, I took the 14/16 pin connector and set pin 1 at ground (under pin 52) and just plugged it up the left side of digital I/O rail, and pulled the contrast pin low in code, but used a 10K between pin 2, VCC and it, to pull it up variably for contrast. So three parts. Arduino, LCD, singular trimpot.

In the setup it handles pulling things where they need to be, and since there's no backlight, no current concerns. Code basically pulls and parses/displays 16 char at a time. Hope this helps someone.