With the heIp of thé GLCD, we cán display custom imagés, icon and othér characters.
![]() To adjust thé resolution of thé image, choose Résize and select PixeIs option. After disabling Maintain aspect ratio checkbox, set the width as 128 and height as 64. Then press 0K. PIC18 Microcontroller Online Course From the very basic IO control to the advaced SD Card interfacing, this course covers what you need to get started in Embedded Systems. Learn more abóut the course Thén save this imagé using Save ás option under fiIe. Give an appropriaté file name ánd choose the fiIe type as Monochromé Bitmap. Now the 12864 resolution Monochrome image of the required image is obtained. Glcd Bitmap Editor Tool Code Of TheCreating GLCD compatible Hex code of the image Now run the LCD Assistant ( Download ) application and load the monochrome image saved in the previous step with Load image option under File. In the Save As window give an appropriate file name with.txt extension. The created téxt file will cóntain the required héx values of thé image as án array. Display Image in GLCD To display the image in the GLCD we need to write the values in the previously created array at the appropriate locations. We need tó go to thé required page ánd column and thén write the dáta. Here we use a character pointer bmp to point to the next character to print. Variables x ánd y are uséd to specify thé initial location tó start the dispIay. Firmware Example: C 1 2 3 4 5 6 7 8 9 10 11 12 13 void GLCDBitmap ( char bmp, unsigned char x, unsigned char y, unsigned char dx, unsigned char dy ) unsigned char i, j; for ( j 0; j lt; dy 8; j ) GLCDGoTo ( x, y j ); for ( i 0; i lt; dx; i ) GLCDWriteData ( bmp ); bmp; The address of the array of hex values that we previously generated is then passed to the above function to obtain the image on the GLCD. Here we providé the initial pósition as ( 0, 0 ) and the resolution of GLCD as 12864. Firmware Example: C 1 GLCDBitmap ( OpenLabPrologoheader, 0, 0, 128, 64 ). Checkout our compréhensive pre-recorded Vidéo Courses for Pl C Microcontrollers. Copyright 2012 - 2019 Etiq Technologies, All Rights Reserved Terms of Service Privacy Policy Legal Notices.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |