Internet Of Things

Sunday, 8 June 2014

Graphical LCD Interface with KS108 controller for AVR

Graphical LCD Interface with KS108 controller for AVR

Graphical LCD picture Graphical LCD schematic Graphical LCD PCB

Description

A Graphical LCD (GLCD) is an LCD that can show pictures and text, The come in different sizes. The GLCD used here is a 128x64 pixels.The GLCD is controlled  with the ATMega16, the GLCD HG1286418C-VA with a S6B0107/S6B0108 controller is used. See below for the pinout of the display. The display has 8 data bits and 5 control bits. The databits are hooked to PORTB and the control bits are hooked to PORTD of the Mega16. A small PCB board is made for easy connection to the microcontroller. The programs are made with the BASCOM-AVR compiler which has various functions to control the GLCD. The program shows text and a picture on the display. A library file needs to be included in the BASCOM program file, the library contains commands to control the display like:
  • Setfont - Sets the current font which can be used on the graphical displays.
  • Lcdat - shows text on the display
  • $BGF - Includes a BASCOM Graphic File in the program.
  • Showpic - shows a graphic file on the display
  • Line - draws a line on the display
  • Circle - draws a circle on the display
  • Pset - Sets a single pixel on the display

Control

If you want to show text on the display you need to include a font file in the BASCOM program. There are several fonts available like a 8x8 font and a 16x16 font, but the font file consume memory, the larger the font file the larger the program becomes. You can also create your own font, there are applications on the web to create your own fonts.
To show a picture on the display you need to include a picture file, they also consume a lot of space in the microcontroller memory.
Graphical LCD picture Left you see a picture with the characterset that uses the smaller font set 8x8. It has 255 different characters. The program glcdks108_txt.txt can downloaded below.






Graphical LCD picture And a picture with big text that uses the bigger 16x16 font, displayed on the GLCD, progams made in BASCOM-AVR. The program glcdks108_txt.bas can downloaded below.






Graphical LCD picture This pictures shows text and a sine and cosin, displayed on the GLCD, progams made in BASCOM-AVR.






Graphical LCD picture This is a blue GLCD from Crystalfonts, it has the same pinout, only the connection of the white background LED is reversed.

 

1 comment:

  1. A touchscreen is a display that also serves as an input device. Some touchscreens require a proprietary pen for input, though most modern touchscreens detect human touch. Since touchscreen devices accept input directly through the screen, they do not require external input devices, such as mice and keyboards. This makes touchscreens ideal for computer kiosks, as well as portable devices, such as tablets and smartphones. www.stoneitech.com/about/news/sharing/what-is-lcd-capacitive-touch-screen.html

    ReplyDelete