Arduino Pro 328 + LCD-09351 = gibberish?

Hi,

I bought the Arduino Pro 328(http://www.sparkfun.com/products/9219) and the Serial Graphic LCD 128 X 64(http://www.sparkfun.com/products/9351) and am having trouble outputting text.

here is my setup;

  • a 6V battery connected to the ext pins on the Arduino Pro

    LCD’s Vin => Arduino’s Power Vin

    LCD’s GND => Arduino’s Power GND

    LCD’s Rx => Aruduino’s Digital Pin5


  • The Arduino software is set up to use Arduino duemilanove or Nano w/ ATMega 328 board.

    I am using the latest NewSoftwareSerial library

    I have the following Arduino sketch;

    #include <NewSoftSerial.h>
    
    NewSoftSerial lcdSerialPort = NewSoftSerial(8, 5);
    
    long SERIAL_BAUD = 9600;
    long LCD_BAUD = 115200;
    
    void setup() {
      Serial.begin(SERIAL_BAUD);
      delay(5000);
      lcdSerialPort.begin(115200);
      delay(5000);
        
      lcdSerialPort.print("t");  
    }
    void loop() {}
    

    I power off the LCD by flipping the power switch to BATT while uploading the sketch and turn it to EXT once I get the upload complete message. I see the Sparkfun flame on the LCD, and then I see garbage text.

    I have the Arduino on a breadboard(female headers are on the way and right now I’m using a breadboard to connect to various pins).

    Any help/suggestions would be greatly appreciated!

    Anyone have any tutorial/samples that can run on this?

    I even tried the sketch from NCWP(http://www.sparkfun.com/tutorials/204) - commented out the RFID/GPS/LED stuff and tried to get the welcome text to display and I’m getting gibberish output.

    Strange thing is, if I connect to a different MCU, the LCD works(I can send it commands and text without problems).

    Thanks to Robert of SparkFun, we were able to figure out the problem.

    It turns out my NewSoftwareSerial library was messed up!

    I did the following;

  • - downloaded the latest NewSoftwareSerial library
  • - exited out of ArduinoIDE
  • - deleted old NewSoftwareSerial folder from my Arduino/libraries folder
  • - copied the new NewSoftwareSerial folder to the Arduino/libraries folder
  • Restarted ArduinoIDE, compiled and downloaded my sketch and it works!

    For the record, one of my sample sketches are as follows;

    #include <NewSoftSerial.h>
    
    NewSoftSerial LCD=NewSoftSerial(2,3); //LCD Rx -> Pin 3
    
    long baudRate = 115200;
    void setup()
    {
      Serial.begin(9600);
      LCD.begin(baudRate);
      clearScreen();      
    }
    
    void loop()
    {
      LCD.print("test");
      Serial.print("test");
      delay(2000);
    }
    
    void clearScreen(){
      LCD.print(0x7C,BYTE);
      LCD.print(0x00,BYTE);
    }
    

    Good luck to all