Just one point of attention.
If I use the LCD code right away and try to assume a position on the LCD screen, the positioning goes wrong.
This is a timing problem.
I could circumvent this by changing a delay in the SEND_CMD function.
I have isolated the LCD code in a .c file such that you can use it in a modular fashion in your programs. It contains a few handy functions: to write a string and to write a string on a particular position on the LCD screen. This one goes wrong if the delay is not right.
The LCD files can be found under http://www.verlind.com/msp430.
They are: lcd_driver.c, lcd_driver.h and use types.h.
Check it out!
There are also some other files there.
period.c and period.h for using timers.
udp.c and udp.h for some UDP code that I am using.
Ps. the function I was referring to is the following. In the original code, the first delay statement read Delayx100us(10), whichs is only 1 ms.
void
LCD_SendCmd(unsigned char e)
{
unsigned char temp;
Delayx100us(100); //10ms
temp = e & 0xf0; //get upper nibble
LCD_Data &= 0x0f;
LCD_Data |= temp; //send CMD to LCD
bitclr(P2OUT,RS); //set LCD to CMD mode
_E(); //toggle E for LCD
temp = e & 0x0f;
temp = temp << 4; //get down nibble
LCD_Data &= 0x0f;
LCD_Data |= temp;
bitclr(P2OUT,RS); //set LCD to CMD mode
_E(); //toggle E for LCD
}