12864B Parallel/Serial Graphic LCD Module (HCMODU0032)

LCD, TFT, OLED, LED modules
admin
Site Admin
Posts: 865
Joined: Sun Aug 05, 2012 4:02 pm

12864B Parallel/Serial Graphic LCD Module (HCMODU0032)

Post by admin » Fri Jul 19, 2013 12:54 pm

Image
Image

Description:

The 12864B Graphic LCD module is a 128 x 64 pixel LCD display with a blue backlight and white foreground. The display is fully programmable and can display a combination of both graphics and text. It can operate in both parallel and serial (SPI) modes which can be configured by the external pin PSB (please see note below). In SPI mode only 3 data pins are required to drive this display. No potentiometer is required to set the contrast as this is pre set by the factory to optimum level.

This item can be purchased here.

1)Encapsulation:COB(Chip-on-Board)
2)Display Format:128x64 dots
3)Display Type:STN, Transflective, Positive, Blue
4)Controller: ST7920
5)Interface:8-bit parallel interface or serial SPI modes
6)Backlight:Blue/Bottom light
7)Viewing Direction:6 O’clock
8)Driving Scheme:1/64 Duty Cycle, 1/9 Bias
9)Power Supply Voltage:5.0 V
10)VLCD Adjustable For Best Contrast:9.0 V (VOP.)
11)Operation temperature:-20°C to +70°C
12)Storage temperature :-30°C to +80°C


Dimensions:

Image


NOTE:

Image

Some versions of this LCD are shipped with the PSB (parallel/serial select) pin shorted to VDD by a 0 ohm resistor fitted to R9 on the back of the LCD (see image above). This fixes the LCD in parallel mode. If this resistor is fitted and you wish to use the LCD in serial mode you will either need to move the resistor to R10 or completely remove it and ground the PSD pin.

Arduino Connections In Serial (SPI) Mode:

For Arduino Uno

MODULE..........................UNO
K (backlight cathode).........GND
A (backlight anode)..........+5V
PSD (SPI Mode).................GND (SEE NOTE)
E (SCK)..........................D13
R/W (MOSI)....................D11
RS (CS)..........................D10*
VDD.............................+5V
VSS..............................GND

For Arduino Mega

MODULE..........................MEGA
K (backlight cathode).........GND
A (backlight anode)..........+5V
PSD (SPI Mode).................GND (SEE NOTE)
E (SCK)..........................D52
R/W (MOSI)....................D51
RS (CS)..........................D53*
VDD.............................+5V
VSS..............................GND

*This pin is configured in software, see '#define CS_PIN 10' line in example sketch below.



Arduino Library:

This display is supported by our HCDisplay library. You can download the library from the software section of our support forum here:

viewtopic.php?f=58&t=2827



Arduino Example Sketch:
  1. /* FILE:    HCDisplay_Hello_World
  2.    DATE:    20/12/18
  3.    VERSION: 0.1
  4.    AUTHOR:  Andrew Davies
  5.    
  6. 20/12/18 version 0.1: Original version
  7.  
  8. This is a simple sketch to demonstrates how to print text at specified locations
  9. on the display. The sketch also shows how to change font style and
  10. foreground/background colour. This sketch has been written to work with the
  11. following module:
  12.  
  13. https://hobbycomponents.com/displays/285-12864b-parallel-serial-graphic-lcd-module
  14.  
  15. The library support both hardware as software serial interfaces for this display.
  16. To use the hardware (SPI) interface connect the display to your UNO/NANO as follows:
  17.  
  18. MODULE..........................UNO
  19. K (backlight cathode)...........GND
  20. A (backlight anode).............+5V
  21. PSD (SPI Mode)..................GND (SEE NOTE)
  22. E (SCK).........................D13
  23. R/W (MOSI)......................D11
  24. RS (CS).........................D10*
  25. VDD.............................+5V
  26. VSS.............................GND
  27.  
  28. And initialise the library with the following function: HCDisplay.Init(10);
  29.  
  30. For software serial you can use any digital pin for E (SLK), R/W (MOSI), & RS (CS).
  31. Initialise the library for software serial module with the following function:
  32. HCDisplay.Init(RS PIN, E PIN, R/W PIN);
  33.  
  34. *Some versions of this LCD are shipped with the PSB (parallel/serial select) pin
  35.  shorted to VDD by a 0 ohm resistor on the back of the display.
  36.  
  37. NOTE: TO USE THIS SKETCH YOU MUST FIRST SELECT THE VERSION OF DISPLAY YOU HAVE BY
  38. UNCOMMENTING THE APPROPRIATE LINE IN THE OPTIONS.H FILE WHICH CAN BE FOUND IN THE
  39. HCDISPLAY LIBRARY FOLDER. For windows users avoid using the Windows Notepad editor
  40. as it doesn't format things properly.  
  41.  
  42. More information about this library can be found in the software section of our support
  43. forum here:
  44.  
  45. http://forum.hobbycomponents.com/software
  46.  
  47.  
  48. You may copy, alter and reuse this code in any way you like, but please leave
  49. reference to HobbyComponents.com in your comments if you redistribute this code.
  50. This software may not be used directly for the purpose of selling products that
  51. directly compete with Hobby Components Ltd's own range of products.
  52. THIS SOFTWARE IS PROVIDED "AS IS". HOBBY COMPONENTS MAKES NO WARRANTIES, WHETHER
  53. EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
  54. MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR LACK OF NEGLIGENCE.
  55. HOBBY COMPONENTS SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR ANY DAMAGES,
  56. INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY
  57. REASON WHATSOEVER.
  58. */
  59.  
  60. #include "HCDisplay.h"
  61.  
  62. HCDisplay HCDisplay;    //Creates an instance of the HCDisplay library
  63.  
  64.  
  65. /*******************************************************************************************************/
  66. /**************************************** USER SETTINGS ************************************************/
  67. /*******************************************************************************************************/
  68.  
  69. /* Arduino pins used to connect to the display and displays touch sensor */
  70. #define RS      10        //Displays Chip Select pin
  71. #define E       13        //Displays clock pin
  72. #define RW      11        //Displays data pin
  73.  
  74. /*******************************************************************************************************/
  75.  
  76. unsigned int MaxX, MaxY;
  77. boolean FGColour = 1;
  78.  
  79. void setup()
  80. {
  81.   HCDisplay.Init(RS);         //Initialise the display (hardware serial mode - faster but must use hardware SPI pins)
  82.   //HCDisplay.Init(RS, E, RW); //Initialise the display (software serial mode - slower but can use any digital pins)
  83.  
  84.   /* Get the screens X & Y resolution */
  85.   MaxX = HCDisplay.ResX() - 1;
  86.   MaxY = HCDisplay.ResY() - 1;
  87.  
  88.   /* Draw a boarder */
  89.   HCDisplay.Rect(0 , 0, MaxX, MaxY, OUTLINE, 1);
  90.   HCDisplay.Rect(0 + 3 , 0 + 3, MaxX - 3, MaxY - 3, OUTLINE, 1);
  91.  
  92.   /* Print some text */
  93.   HCDisplay.Pos(44,8);
  94.   HCDisplay.Print("Hobby");
  95.   HCDisplay.Pos(24,18);
  96.   HCDisplay.Print("Components");
  97.  
  98.   HCDisplay.Pos(16,30);
  99.   HCDisplay.Print("128 x 64 LCD");
  100.  
  101.   /* Change the font */
  102.   HCDisplay.SetFont(MedProp_12ptFont);
  103. }
  104.  
  105.  
  106. void loop()
  107. {
  108.   /* Make some text flash by swapping the text foreground and background colours */
  109.   HCDisplay.SetFG(FGColour);
  110.   HCDisplay.SetBG(!FGColour);
  111.   HCDisplay.Pos(10,42);
  112.   HCDisplay.Print("HCMODU0032");
  113.  
  114.   FGColour = !FGColour;
  115.  
  116.   delay(200);
  117. }

Datasheet:
st7920.pdf
You do not have the required permissions to view the files attached to this post.

sadCustomer

Re: 12864B Parallel/Serial Graphic LCD Module (HCMODU0032)

Post by sadCustomer » Wed Sep 18, 2013 4:04 pm

I have bought this module and can not get it to work in serial mode. it is not the same as in the image above. 12864ZW instead of 12864B. i have owned a 12864B before and have wired this one exactly the same but can not get the 'hello world' from u8glib to work. any help would be appreciated.

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: 12864B Parallel/Serial Graphic LCD Module (HCMODU0032)

Post by andrew » Thu Sep 19, 2013 10:43 am

We have checked our stocks and it would seem we have been supplied this variant without us knowing about it. However we have now connected one up and we can confirm that it works with the above sketch without modification. Could you elaborate on what you mean by when you say it doesn't work ? Do you see anything on the screen? Do you see a backlight? Have you tired using the sketch and library found in the first post of this forum? Please also reference the comments within this sketch for correct connection.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

sadCustomer

Re: 12864B Parallel/Serial Graphic LCD Module (HCMODU0032)

Post by sadCustomer » Fri Sep 20, 2013 5:02 pm

the problem vas on my side. the module i had previously worked even on software SPI ports but this one works just on the hardware one. nice screen, great contrast.

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: 12864B Parallel/Serial Graphic LCD Module (HCMODU0032)

Post by andrew » Sat Sep 21, 2013 9:51 am

Glad you managed to get it working.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

Justblair
Posts: 2
Joined: Sat Nov 02, 2013 3:43 pm

Re: 12864B Parallel/Serial Graphic LCD Module (HCMODU0032)

Post by Justblair » Sat Nov 02, 2013 3:52 pm

Just a quick question before i plug this in.

I can't find a datasheet for the module, but perhaps you will know the answer to this one.

Do I need a current limiting resistor for the backlight if I am using 5v? Looking at the display it already has 34ohm of ,limiting resistor there (R13 and R14 are 68ohm in Parallel), so i am guessing I don't need one?

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: 12864B Parallel/Serial Graphic LCD Module (HCMODU0032)

Post by andrew » Sun Nov 03, 2013 6:35 pm

That's right, you don't need a current limiting resistor when applying 5V to the backlight.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

Justblair
Posts: 2
Joined: Sat Nov 02, 2013 3:43 pm

Re: 12864B Parallel/Serial Graphic LCD Module (HCMODU0032)

Post by Justblair » Sun Nov 03, 2013 7:06 pm

Thanks. I kinda found out for myself.

What persuaded me to make the leap was when I found the solder jumpers that connect Vss and K, Vdd and A and PSB to Vss (or Vdd for parallel operation). Made sense that the Led accepted 5v if the jumpers are there.

I really think you should document the jumpers here, it is a selling point for the display. The contrast and brightness is superb on the display.

alf_sito
Posts: 7
Joined: Thu Dec 12, 2013 7:11 am

Re: 12864B Parallel/Serial Graphic LCD Module (HCMODU0032)

Post by alf_sito » Thu Dec 12, 2013 7:24 am

Hi good morning. I recently purchased a 12864B LCD (128 x 64 Dots Graphic Blue Color Backlight LCD Display Controller module ST7920). I followed this guide, both the Sketch as wiring. After reviewing several times, the screen lights up but shows no text. Besides connecting "PS (SPI Mode) to GNDFund" I short-circuits feeding. In fact I checked with multimeter that there is connection between PSB and VDD. As if to be ready for connection in parallel. Is there any need to remove the bridge? I would appreciate any help.

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: 12864B Parallel/Serial Graphic LCD Module (HCMODU0032)

Post by andrew » Thu Dec 12, 2013 11:13 am

I have just pulled one of our current batch out of stock and it looks like the factory have fitted a zero ohm resistor to R9 which does indeed apply VDD to the PSB pin and therefore configuring the screen to parallel mode. To put the screen into serial mode it looks like you will need to either move the resistor to R10 which grounds the PSD pin, or completely remove the R9 resistor and ground the PSD pin yourself.

We will confirm this and update our information to include this variation of screen.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

Post Reply

Return to “Display”