7
\$\begingroup\$

I bought a Winstar 144x32 LCD (WG14432D) because it was cheap and it would be nice to do some experiments with it. The main problem with this LCD is that it has no (working) library for it.

I already searched the whole Internet with Google, but my results were unimpressive:

https://forum.crystalfontz.com/showthread.php/7410-Tutorial-ST7920-Seeeduino-v4-2-Arduino-Sample-Sketch-Driving-a-144x32-Graphic-LCD (A huge example code which doesn't work. I set SCK, MISO and CS correctly and nothing happens.)

Knowing it has the ST7920 chip, I found a library for screens that use this same chip: https://github.com/olikraus/u8glib/wiki/device#st7920-192x32 (The library supports only other resolutions, such as 128x64, but I think as it's the same chip, it should work too. I also tried other screen variants of this same chip.)

On some portuguese site I found how to initialize and use the library properly: http://www.arduinoecia.com.br/2013/09/display-grafico-lcd-128x64-st7920.html (No problem for me, as I speak portuguese too)

They use: U8GLIB_ST7920_128X64_1X u8g(6, 5, 4 ,7); to set the software SPI pins for the LCD. On mine (Arduino Mega) it would be:

U8GLIB_ST7920_128X64_1X u8g(52, 51, 53); //Enable, RW, RS [,RESET] (known also as) SCK, MOSI, CS

The result: The display stayed blank. Then I tried to use the hardware SPI initialization, which according to this site is: U8GLIB_ST7920_128X64_1X u8g(53); // RS (known also as) CS pin needed only

Even so, the display won't do anything. It stayed light gray (Contrast adjusted) and that's it. No blinking, no switching on/off, nothing...

Finally, I was reading on this datasheet that the PSB pin must be set to 0 (ground) in order to enable SPI mode.

PSB Pin must be set to zero

Other variants of those screen had jumpers or pins on the back, which you can jump to ground, but this one has none.

A high resolution image of the back of the LCD I captured (or atleast tried) and attached below (the front has nothing but the LCD), because I could find nothing about anything of this board. No schematic, nothing.

Back of the WG14432D

I couldn't find any PSB pin (which is identified as it), jumper ("JP") or similar on this board.

The pins to interface the LCD had no unusual pins which are identified as "PSB" or similar too:

Pins on the WG14432D

Any suggestion or answer is much appreciated.

\$\endgroup\$
  • 4
    \$\begingroup\$ The moral of the story is never buy any electronic component or dev kit that doesn't come with proper documentation. The usual result of buying the cheapest bit of knock-off electronics you can find is you spend ages trying to figure out how it works, and then eventually give up and buy a properly documented one. \$\endgroup\$ – Tom Carpenter Sep 11 '17 at 11:40
  • \$\begingroup\$ I don't think "Winstar" is a knockoff, as it's the only that has a 144x32 lcd. \$\endgroup\$ – Fusseldieb Sep 11 '17 at 12:20
  • \$\begingroup\$ Have a look at this AliExpress page: Most likely SCKL should be connected to pin 6 (E), MOSI to pin 5 (R/W), SS to pin 4 (RS) and MISO is probably not used. \$\endgroup\$ – Codo Sep 11 '17 at 13:18
  • 1
    \$\begingroup\$ @Fusseldieb To be honest I didn't look up Winstar to find out. But you'd be surprised how many companies sell the exact same part. For example there is a company seemingly without a website called aMtec who sell the same display. There are lots of such companies hidden away behind well presented front companies. They all sell the same products and the reason the documentation is so bad is that they are just repackaging the rubbish docs they were given. The thing that is a dead give away is the lack of any company name printed on the PCB. \$\endgroup\$ – Tom Carpenter Sep 11 '17 at 13:18
  • \$\begingroup\$ @Codo I know the pinout from this site: github.com/olikraus/u8glib/wiki/device#additional-information , but thanks. \$\endgroup\$ – Fusseldieb Sep 11 '17 at 16:12
16
\$\begingroup\$

Many LCD controllers (including the ST7920) can support a variety of interface types, of which you can use one at a time. Sometimes the interface type is fixed on a given LCD display module; sometimes the interface can be selected. The exact PCB markings for selecting between interfaces (when possible) does not always match the signal names you are expecting.

Since the interface is not always able to be selected, then the answer from Finbarr is sometimes correct - you might find that the interface is absolutely fixed (e.g. parallel-only, SPI-only etc.) on a given LCD module.

However in your case, I think you might be lucky. I noticed a similarity between your LCD module, and the one used in the first tutorial which you linked.

Notice how your LCD module has the part number 14432D on the back, and we see 2 component locations - R11 and R12. R11 is missing and R12 is fitted:

Back of original LCD display - R11 missing, R12 fitted

Now look at this image from the first tutorial that you linked, showing the back of that LCD module (which is different to your LCD module, and hence there is no guarantee that the first tutorial you linked would apply to your LCD module anyway). See that it has the same component arrangement as your LCD module and also has an R11 and R12. Except on that module, R11 is fitted and R12 is missing:

LCD module PCB from tutorial showing R11 fitted, R12 missing

I cannot guarantee that this next part applies to your LCD module - you need its datasheet with the relevant details to be completely sure. However it is possible that the answer is contained in this document:

LCD interface selection options

Notice how for their model number ending 14432D (similar to your model number), the resistors R11 and R12 are used to select between parallel and SPI interfaces. On the LCD module in your first tutorial link, see how only R11 is fitted, and they are using the SPI interface. On your LCD module, see how only R12 is fitted and you are unable to use the SPI interface pinout as shown in that tutorial.

So perhaps your LCD module is configured for a parallel interface? That would be consistent with the fact that R12 is fitted on your LCD module.

Therefore perhaps by desoldering R12 from your board and resoldering it in the R11 position, you may be able to use the SPI interface and pinout shown in that first tutorial.


Update:

Here is the PCB after Fusseldieb made the modification (the resistor was moved from the R12 position, to the R11 position):

Original LCD after moving resistor from R12 position to R11 position

That modification was confirmed to successfully enable the SPI interface, using the following connector pins:

LCD Pin   SPI signal   (Original)
-------   ----------   ----------
   1        Vdd          (Vdd)
   2        Vss          (Vss)
   3        Vo           (Vo)
   4        CS (SS)      (RS)
   5        MOSI         (R/W)
   6        SCLK         (E)

FYI, looking at the other tutorial:

http://www.arduinoecia.com.br/2013/09/display-grafico-lcd-128x64-st7920.html

That uses an LCD module with a completely different interface pinout, which includes the CS1 and CS2 signals (pins 15 & 16 on its 20-pin connector). This allows the interface to be switched between parallel and SPI without needing to solder/desolder components on the PCB. You don't have that 20-pin connector with those signals on your LCD module. That is why that tutorial does not directly apply to your module (although the ST7920 commands will likely apply, once you can get an SPI interface working on your specific LCD module).

\$\endgroup\$
  • 1
    \$\begingroup\$ Now that's an elaborated answer. Thank you so much for your time. As I can't use the LCD this way anyways, I'll try to solder the resistor as you said. I'll reply later. \$\endgroup\$ – Fusseldieb Sep 11 '17 at 16:07
  • 1
    \$\begingroup\$ Done. Have I soldered it right? prntscr.com/gjvd6o (Sorry for almost killing that tiny resistor :P) \$\endgroup\$ – Fusseldieb Sep 11 '17 at 16:30
  • 1
    \$\begingroup\$ No wayyy... LOOK: prntscr.com/gjvhqk Hug me! NOW! \$\endgroup\$ – Fusseldieb Sep 11 '17 at 16:41
  • 1
    \$\begingroup\$ You sir, deserve two medals. One for being a superhero right now and the other just in case you loose the first one. Wow! Finally those LCD's will be useful for a lot of people. You can't imagine my happyness right now. Seriously. Thank you so much. :-) \$\endgroup\$ – Fusseldieb Sep 11 '17 at 16:43
  • 1
    \$\begingroup\$ @Fusseldieb - I'm speechless, thanks. :-) Isn't it great when some hardware hacking works :-) Thanks also for supplying all the photos and links on the first place! To help future readers, I'll update my answer to include your photo of the PCB after you moved the resistor, so that they know how it should look to enable the SPI interface option. Again, well done & good luck! \$\endgroup\$ – SamGibson Sep 11 '17 at 16:57
3
\$\begingroup\$

Sorry, you're stuck with a parallel interface on that display. The controller IC itself supports the choice between a serial or parallel interface but the pin is hardwired to 1 on the PCB.

The smallest interface you can use would be 7 bits: RS, R/W, E and four data lines.

\$\endgroup\$
  • \$\begingroup\$ But then why are the header pins labeled as if they are supporting SPI? (RS, R/W, E)? Also, the example code has a video to it which shows the (exact?) same LCD in action over SPI, with the same wiring as mine. \$\endgroup\$ – Fusseldieb Sep 11 '17 at 11:34
  • 1
    \$\begingroup\$ SPI would have pins labelled SCLK, MOSI, MISO and possibly SS. \$\endgroup\$ – Finbarr Sep 11 '17 at 11:49
  • \$\begingroup\$ I have used Chinese displays in the past. And even though the pins had strange labels, they supported SPI. You just have to find out which is which... \$\endgroup\$ – Codo Sep 11 '17 at 13:11
  • \$\begingroup\$ @Codo I already triplechecked the pins. I know which one is MISO, CLK, CS... But no matter what, it will not work. \$\endgroup\$ – Fusseldieb Sep 11 '17 at 16:04

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.