Wednesday, November 19, 2014

Arduino and 128x64 GLCD

Arduino and 128x64 Graphic LCD


1.Arduino Board
2.128x64 Graphic LCD Module (controller  KS0108 Chip or Equivalent ) ST7920  SBN6400G , SBN0064G

We use this model from Electronic Source Thailand

Data Sheet

Wiring Diagram

 GLCD Pinout

Add VR10K to adjust Brightness.

Connect to Arduino

For Arduino Mega
Arduino Pin 22   for  D7
Arduino Pin 23   for  D6
Arduino Pin 24   for  D5
Arduino Pin 25   for  D4
Arduino Pin 26   for  D3
Arduino Pin 27   for  D2
Arduino Pin 28   for  D1
Arduino Pin 29   for  D0
Arduino Pin 33   for  CS1
Arduino Pin 34   for  CS2
Arduino Pin 35   for R/W
Arduino Pin 36   for  RS
Arduino Pin 37   for  EN

Arduino Pin 13  for LCD Back Light Control

Software ( Arduino Library )

Arduino GLCD Library Version3 ( or AVR Controller )


GLCD-Arduino has the following features:
  • Support for Arduino 1.x (still works with pre 1.x IDEs)
  • Support for Mega 2560, Sanguino and Teensy boards
  • Easier pin assignment. Any pin can be assigned to any glcd function.
  • Accurate/Consistent font rendering of any font size on any pixel location.
  • User definable text areas
  • Up/Down text scrolling
  • Circle functions
  • Additional example and demo sketches including a diagnostic sketch
  • Fully search-able documentation in HTML format
  • Pins can optionally be assigned by AVR port and bit instead of Arduino pin number.
  • Supports fixed width fonts that provides up to 8 x 21 character display with the supplied system font.
  • CursorTo method to position the cursor to a given font location (fixed width fonts only)
  • DrawBitmap function to display bitmap images stored in Flash memory. A Processing utility is provided in the download to convert a monochrome bitmap file to a header file that stores the image in flash for use by the DrwBitmap method.

Create Font  use GLCD Font Creator 2
Use this program

How to Create Font in other Language

FONT 8 x 8

FONT 14 x 20

Example in Thai language
I've edit GLCD Font Creator 2 for Thai language only. ( Java Code )

My Website
email :   Tel .081-6452400

Monday, November 3, 2014

Arduino and TFT LCD Display Module

Arduino TFT LCD Display Module Test

1.Arduino UNO Board or Compatible
2.TFT LCD 2.2 inch  from Elecfreaks ( Model  TFT01-2.2SP )


TFT LCD module has always been one of the hot products in DIY industry and LCD is basically the necessary products during all projects, at the same time, serial port modules are also the popular ones, because it takes few IO and the usage is simple. This section of the 2.2S-inch TFT LCD serial SPI integrated features of compact, SPI interface, fully compatible with popular LCD5110 interface cable sequence, and will replace the increasingly reducing LCD5110.


TFT01_2.2 SP is a 2.2 "SPI TFT LCD Screen Module, 10pins interface, compatible LCD5110 interface. Not just a LCD break but include SD card (2GB),
The LCD in the TFT01 is ILI9341. It's a 240 * 320 (resolution), 2.2S inch TFT LCD screen.The LCD has a wide viewing angle, the contrast is also very suitable.

The display interface is serial, it just needs 5 wires (CS, RS, SCL, SDA, RST) for controlling.
Replace LCD5110, Support direct plug in ElecFreaks Joystick shield, EFCom, Key Pad Shield etc
SDcard use hardware SPI interface (CS / MOSI / MISO / SCK), Not solder pins.

SDO: Serial clock output
LED: 3.3V IO and Power Supply pin
SCL: Serial clock input
SDA / SDI: Serial data input
DC: Data / Command selection
RST: Reset, Low level active
CS: Chip Selection, Low level active
GND: Ground
VDD33: 3.3V Power Supply pin
UTFT Support

Wiring Diagram

TFT Pin SDO<MISO>     Not Used

TFT Pin LED                   To  VCC 3.3V

TFT Pin SDI<MOSI>      To Arduino PIN D9

TFT Pin SCK                   To Arduino PIN D8

TFT Pin D/C                    To Arduino PIN D10

TFT Pin RESET              To Arduino PIN D11

TFT Pin CS                      To Arduino PIN D12

TFT Pin GND                  To Arduino PIN GND

TFT Pin VCC                  To Arduino PIN 3V3


Driver UTFT Library  by Henning Karlsen

his library is the continuation of my ITDB02_Graph, ITDB02_Graph16 and RGB_GLCD libraries for Arduino and chipKit. As the number of supported display modules and controllers started to increase I felt it was time to make a single, universal library as it will be much easier to maintain in the future.

Download Source code

My Website
email :   Tel .081-6452400