Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:examples:display:lcd_graphic [2010/03/13 11:39] Helenen:examples:display:lcd_graphic [2020/07/20 09:00] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Graphic LCD ====== ====== Graphic LCD ======
  
-//Necessary knowledge: [HW] [[en:hardware:homelab:lcd]], [LIB] [[en:software:homelab:library:module:lcd_graphic]], [LIB] [[en:software:homelab:library:delay]], [PRT] [[en:examples:display:lcd_alphanumeric]]//+//Necessary knowledge: [HW] [[en:hardware:homelab:digi]], [LIB] [[en:software:homelab:library:module:lcd_graphic]], [LIB] [[en:software:homelab:library:delay]], [PRT] [[en:examples:display:lcd_alphanumeric]]//
  
 ===== Theory ===== ===== Theory =====
  
-Graphical LCD //liquid crystal display// is a display which allows displaying pictures and text. Its known as alphanumericLCD. Basic liquid crystal displays are using see-through electrodes placed between liquid crystal, which changes the polarisation of the passing light in an electric field. Electrodes are covered by polarisation filters, which assure that only one way polarised light can pass the display.In case the liquid crystal changes the polarisation due to electric field, the light on the display or part of it cannot pass and it appears dark. +Graphical LCD //liquid crystal display// is a display which allows displaying pictures and text. Its construction is similar to the alphanumerical LCD, with a difference that on the graphic display all pixels are divided as one large matrix. If we are dealing with a monochrome LCD, then a pixel is one square segment. Color displays’ one pixel is formed of three subpixels. Each of the three subpixels lets only one colored light pass (red, green or blue). Since the subpixels are positioned very close to each other, they seem like one pixel.
-Its construction is similar to the alphanumerical LCD, the main difference is that on the graphic display all pixels are divided as one large matrix. If we are dealing with a monochrome LCD, then a pixel is one square segment. Color displays’ one pixel is formed of three subpixels. Each of the three subpixels lets only one colored light pass (red, green or blue). Since the subpixels are positioned very close to each other, they seem like one pixel.+
  
 [{{  :examples:display:lcd_graphic:lcd_graphic_abc.png?200|The text formed of pixels of a graphic LCD.}}] [{{  :examples:display:lcd_graphic:lcd_graphic_abc.png?200|The text formed of pixels of a graphic LCD.}}]
  
-Monochrome graphic displays have usually passive matrix, large color displays including computer screens have active matrix.  All information concerning the color of the background and the pixels of the graphic LCD-s is the same as the alphanumerical LCD-s – there is a lot of variantsAnd similar to the alphanumerical displays, the graphic displays have also separate controller, which takes care of receiving information through the communication interface and generating the electrical field for the segments. If for alphanumerical LCD it is enough to send indexes of the signs in order to display text, then  graphic displays are not capable of generating letters by themselves – all the pictures and text needs to be generated by the user pixel by pixel.     +Monochrome graphic displays have usually passive matrix, large color displays including computer screens have active matrix.  All information concerning the color of the background and the pixels of the graphic LCDs are similar to alphanumerical LCDsSimilar to the alphanumerical displays, graphic displays are also equipped with separate controller, which takes care of receiving information through the communication interface and generates the electrical field for the segments. If for alphanumerical LCD is enough to send indexes of the signs in order to display text, then  graphic displays are not capable of generating letters by themselves – all the pictures and text needs to be generated pixel by pixel by the user.     
  
 ===== Practice ===== ===== Practice =====
  
-In the Home-Lab set is a 84x48 pixels monochrome graphic LCD. It is the same display which is used in Nokia 3310 mobile phones. To the screen is attached a Philips PCD8544 controller which can be communicated through SPI like serial interface. The background lighting of the display module is also separately controlled. Communicating with the screen is not very difficult, but due to the large amount of the functions it is not explained here. There are functions to use it in the library of the Home-Lab +In the Home-Lab set is a 84x48 pixels monochrome graphic LCD. It is the same display as used in Nokia 3310 mobile phones. Philips PCD8544 controller is attached to the display which can be communicated through SPI-like serial interface. The background lighting of the display module is separately controlled. Communicating with the display is not very difficult, but due to the large amount of the functions it is not explained here. Home-Labs library has functions for using it.
  
-The functions of the graphic LCD are similar to the alphanumeric LCD functions. First, the screen must be started with // lcd_gfx_init// function. After startup it is advised to clean the screen (the memory of the controller) with the //lcd_gfx_clear// function. There is a letter map which contains all the numbersletters and most common signs written inside of the library. The height of the letter is 7 and the width of the letter is 5 pixels. The gap between each letter is horizontally 6 and vertically 8 pixels, i.e. there can be 6 rows and 14 columns of letters overall. To display a letter or text, first its position must be determined by using the function // lcd_gfx_goto_char_xy// . For displaying the letter is // lcd_gfx_write_char// function and for displaying text // lcd_gfx_write_string// function.+The functions of the graphic LCD are similar to the alphanumeric LCD functions. First, the screen must be started with // lcd_gfx_init// function. After start-up it is advised to clean the screen, more precisely controllers memory with the //lcd_gfx_clear// function. There is a letter map in side of the library with full Latin alphabetnumbers and with most common signs written. The height of the letter is 7 and the width of the letter is 5 pixels. The gap between each letter is horizontally 6 and vertically 8 pixels, i.e. in total it fits 6 rows and 14 columns of letters. To display a letter or text, first its position must be determined by using function // lcd_gfx_goto_char_xy// . For displaying letter is // lcd_gfx_write_char// function and for displaying text // lcd_gfx_write_string// function.
  
-The following is an example of time counter. The program counts seconds (approximately), minutes and hours. For converting time to text is //sprintf// function.  +The following is an example of time counter. The program counts seconds (approximately), minutes and hours. For converting time to text //sprintf// function is used.  
  
 <code c> <code c>
 // //
-// Example of using the graphic LCD of the Home Lab+// Example of using the graphic LCD of the HomeLab
-// The clock time since the beginning of the program is displayed LCD.+// Time of day is displayed on LCD since the beginning of the program.
 // //
 #include <stdio.h> #include <stdio.h>
en/examples/display/lcd_graphic.1268480350.txt.gz · Last modified: 2020/07/20 09:00 (external edit)
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0