Pro Mini 328 and Sparkfun SerLCD

Hi all, how's it going? First post here.
I'm having some trouble with my new Pro Mini 328 (3.3v, 8mhz).
I am trying to interface with a Sparkfun Serial LCD (16x2, 3.3v) using the SoftwareSerial library on Pin 10 but for some strange reason every second character on the screen is garbled.
If I print one character at a time followed by a short delay it works fine but this is a little impractical. So I'm guessing it has something to do with timing.
I have tried to change the LCD's baud rate to 4800bps to no avail.
The LCD works fine using my Mega board.
I haven't yet tried to hook it up to the hardware serial port but will do as soon as I get time.

Any suggestions?

I think you are on the right track! Try hooking it up to the serial port and see how that goes. If it works fine on the mega, there's something else going on.

I got it working!
First of all it worked fine on the hardware serial port and the inbuilt Serial.print function.
It still didn't work using any of the prebuilt libraries for the SerLCD.
I found that this is because they all use the standard SoftwareSerial library.
When I changed this to Mikal's NewSoftSerial library it all worked fine on any pin!
So I'm guessing there may be some issues with the Pro Mini 328 3.3V 8mhz and SoftwareSerial.

Thanks for the suggestion!

I'm guessing here, but it might be a stop-bit issue - with a 'scope you could see if the software serial was missing the stop bit or using a shorter one than the hardware serial? I haven't looked at software serial yet, but this is the sort of thing that might be configurable?

More than likely, it's a timing issue... That is -- the SoftwareSerial library uses the following to determine delays for the baud rate:

  _bitPeriod = 1000000 / _baudRate;

....

int bitDelay = _bitPeriod - clockCyclesToMicroseconds(50); // a digitalWrite is about 50 cycles

Some clues are in the NewSoftSerial release notes:

  1. 8 MHz support and flush() and enable_timer0() methods added

Note the difference iun how NewSoftSerial does the timing calculations:

#if F_CPU == 16000000

static const DELAY_TABLE PROGMEM table[] = 
{
  //  baud    rxcenter   rxintra    rxstop    tx
  { 115200,   1,         17,        17,       12,    },
  { 57600,    10,        37,        37,       33,    },
  { 38400,    25,        57,        57,       54,    },
  { 31250,    31,        70,        70,       68,    },
  { 28800,    34,        77,        77,       74,    },
  { 19200,    54,        117,       117,      114,   },
  { 14400,    74,        156,       156,      153,   },
  { 9600,     114,       236,       236,      233,   },
  { 4800,     233,       474,       474,      471,   },
  { 2400,     471,       950,       950,      947,   },
  { 1200,     947,       1902,      1902,     1899,  },
  { 300,      3804,      7617,      7617,     7614,  },
};

const int XMIT_START_ADJUSTMENT = 5;

#elif F_CPU == 8000000

static const DELAY_TABLE table[] PROGMEM = 
{
  //  baud    rxcenter    rxintra    rxstop  tx
  { 115200,   1,          5,         5,      3,      },
  { 57600,    1,          15,        15,     13,     },
  { 38400,    2,          25,        26,     23,     },
  { 31250,    7,          32,        33,     29,     },
  { 28800,    11,         35,        35,     32,     },
  { 19200,    20,         55,        55,     52,     },
  { 14400,    30,         75,        75,     72,     },
  { 9600,     50,         114,       114,    112,    },
  { 4800,     110,        233,       233,    230,    },
  { 2400,     229,        472,       472,    469,    },
  { 1200,     467,        948,       948,    945,    },
  { 300,      1895,       3805,      3805,   3802,   },
};

const int XMIT_START_ADJUSTMENT = 4;

#elif F_CPU == 20000000

// 20MHz support courtesy of the good people at macegr.com.
// Thanks, Garrett!

static const DELAY_TABLE PROGMEM table[] =
{
  //  baud    rxcenter    rxintra    rxstop  tx
  { 115200,   3,          21,        21,     18,     },
  { 57600,    20,         43,        43,     41,     },
  { 38400,    37,         73,        73,     70,     },
  { 31250,    45,         89,        89,     88,     },
  { 28800,    46,         98,        98,     95,     },
  { 19200,    71,         148,       148,    145,    },
  { 14400,    96,         197,       197,    194,    },
  { 9600,     146,        297,       297,    294,    },
  { 4800,     296,        595,       595,    592,    },
  { 2400,     592,        1189,      1189,   1186,   },
  { 1200,     1187,       2379,      2379,   2376,   },
  { 300,      4759,       9523,      9523,   9520,   },
};

const int XMIT_START_ADJUSTMENT = 6;

#else

#error This version of NewSoftSerial supports only 20, 16 and 8MHz processors

#endif

I highly doubt that SoftwareSerial is working properly at "higher" baud rates @ 8MHz. Trying going lower to 2400bps, or stick to NewSoftSerial which has declared support for 8MHz, and the code path is decidedly different than SoftwareSerial.

!c