The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

Issue: Writing to LCD stopped working with the latest mbed library (14/1/2014) (Closed: Invalid)

Hi there,

It took me a whole day of debugging why my program to write to the ST7920 128x64 GLCD stopped working. I have started swapping files from a program I tried previously and finally found that if I reverted back to the previous version of the mbed library, it worked again. I am developing it on the LPC1768 platform and the ST7920 I have wired in 8bit parallel mode.

It looks like it has something to do with the timing. I am using standard functions wait_us(1); and PinNames p5, p6, p7...etc.

Every time I reset the program, using the latest mbed library, I get a different result. In text mode, I may get a line with letters missing, in graphics mode it's just different garbage.

I suspect that the timings are incorrect at initialization time of the LCD.

Kind regards, Vladimir

3 comments:

15 Jan 2014

Hi Vladimir,

Thanks for the report. Could you please share your code or a subset of your code that can be used to reproduce the problem?

Thanks,
Bogdan

16 Jan 2014

Sure. It's fairly straight forward.

Here is the test program *****

  1. include "mbed.h"
  2. include "st7920.h

ST7920 lcd(p5, p6, p7, p10, p11, p12, p13, p14, p15, p16, p17); rs, rw, e, d0-d7;

int main() { unsigned char message1[] = "This is a test!";

lcd.InitDisplay(); lcd.ReturnHome();

lcd.SetTextMode(); lcd.DisplayString(0,0,message1,16); lcd.DisplayString(1,0,message1,16); lcd.DisplayString(2,0,message1,16); lcd.DisplayString(3,0,message1,16); }

and the ST7920.h and ST7920.cpp /media/uploads/MaliMrav/st7920.h /media/uploads/MaliMrav/st7920.cpp

13 May 2014

Hello Vladimir Lekic,

is this issue still present with the latest mbed library? Let us know or please close this issue. Thanks.

Regards,
0xc0170