Garbled characters on EasyWeb-II at cold start

Hi,

I integrated the LCD code with the web server code and made some nice test applications.

Works 99% of time fine when started from the debugger - I am currently using Quadravox -.

However, when I start it up after a reset, I get a lot of garbage on the display, seems to be a startup problem. Also if I put in a 2s delay, the problem remains. Apparently Marcello has the same problem.

Anybody any clue?

Is the source of the Olimex test application available for reference, as it puts something on the display after a cold start w/o problems.

Thanks,

Eric

it seems initialization problem in your code

http://www.olimex.com/dev/soft/msp430/easyweb_test.zip contain the test source code which EasyWeb2 comes pre-loaded with

Best regards

Tsvetan

:smiley: Appears to work nicely!

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

}

The one in the previous mail does not work, due to the period at the end.

This one is right:

http://www.verlind.com/msp430

Regards,

Eric