Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 30, 2024, 04:35:44 04:35


Login with username, password and session length


Pages: [1]
Print
Author Topic: Extended GLCD Library for CCS (128x64 - KS0108 Based LCDs)  (Read 33993 times)
0 Members and 1 Guest are viewing this topic.
saint
Newbie
*
Offline Offline

Posts: 23

Thank You
-Given: 21
-Receive: 69

!! SAINTRULEZ !!


« on: March 27, 2009, 11:47:48 11:47 »

Hi Everyone,

Several days ago i started a commercial project which uses a 128x64 KS108 based GLCD. I started to write some code for make the GLCD alive by using "GLCD.c" driver which comes with CCS. (This is the first time that I'm using 128x64 GLCD Undecided ). It worked great on my hardware without any problems but original driver file had really limited ready to use functions in it.  Undecided

So I decided to add some new functions and make a new library for my project. After a sleepless night + 4 mug of coffee, I've added 5 new functions and I wanted to share it with you...

I hope this new Library also helps you on your projects...Feel free to use it  Grin

Here are the functions added by me:

============================================================

  • glcd_standby(command)

                     Turns ON-OFF graphic LCD. Good solution on system standby
                     GLCD does not clear its memory map on OFF command. So last
                     screen shows up when ON command send to GLCD

  • glcd_3Dbox(x,y,width,height,depth,color)

                     Draws a 3D box on a graphic LCD (Ex: to make a 3D Button)

  • glcd_circle_seg(x,y,radius,angle_start,angle_end,color)

                     Draws a segment of a circle on a graphic LCD

  • glcd_image(inverse)

                     Fills the graphic LCD screen with 128x64 bit converted image
                     with inverse option

  • glcd_image_xy(x,y,inverse)
                   
                     Draws less or equal 128x64 pixels of image to the graphic LCD
                     screen on specified x, y coordinate with inverse option

============================================================

You can find detailed descriptions and "How To Use" information's above the related functions...

I'm also adding a Test Program which demonstrates each function on GLCD. Hardware based on 18F4520 with 10Mhz Xtal (HW enabled 4X PLL - H4 fuse used).
You can see my PIN connections at the pin definition section in my "Extended_GCD.c" library. You also can use your own connections...

Have a nice programming days...

SAINT


! Info: I used "Bitmap2LCD BASIC Edition V1.5b" to convert the images. Basic version of this program is free at http://bitmap2lcd.com

When you select the Bitmap or JPEG image in the program, choose "Table vertical downwards" and "Most significant bit last" from "File & Encoder Manager" toolbar at the right of your screen...

! RAR File Edited: Related BMP images added to the RAR archive...
« Last Edit: December 09, 2011, 12:36:12 12:36 by saint » Logged

System Design Engineer...

!! You DON'T DIE if you "Thank" someone !!

Visit TURKEY on your next vacation...
dilipvpn
Inactive

 Muted
Offline Offline

Posts: 4

Thank You
-Given: 9
-Receive: 2


« Reply #1 on: August 26, 2009, 08:05:30 08:05 »

Sir,
How i can use more than one images like image[],image2[].etc
Logged
kemalserkan
Guest
« Reply #2 on: April 05, 2010, 07:08:53 19:08 »

i changed glcd_image_xy function. you can add more image arrarys. you must use #ROM adress={list} for image arrays.
(Note: i can't use pointers because my ccs c compiler doesn't workwith pointers(4.104 version)-does anyone have similar mistake with this version of compiler??)

Posted on: April 05, 2010, 08:07:07 20:07 - Automerged

or you can use this
void glcd_image(long mempointer)
{  int j, i;
   int page = 0xB8;
   char chipsel;
   char buffer[1];
   output_low(GLCD_DI);                // Set for instruction
   glcd_writeByte(GLCD_CS1, 0x40);     // Set the column address to 0
   glcd_writeByte(GLCD_CS2, 0x40);
   glcd_writeByte(GLCD_CS1, page);     // Set the page address to 0
   glcd_writeByte(GLCD_CS2, page);
   for (j = 0; j < 8; j++, page+=1)
   {  output_low(GLCD_DI);
      glcd_writeByte(GLCD_CS1, page);
      glcd_writeByte(GLCD_CS2, page);
      for (i = 0; i < 128; i++)
      {
         if ( i < 64)
         {
            chipsel = GLCD_CS1;
         }
         else
         {
            chipsel = GLCD_CS2;
         }
         read_program_memory(mempointer, buffer, 1);
         mempointer++;
         output_high(GLCD_DI);
         glcd_writeByte(chipsel, *buffer);
      }
   }
}
Logged
metal
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2420

Thank You
-Given: 862
-Receive: 678


Top Topic Starter


« Reply #3 on: April 10, 2010, 10:45:24 22:45 »

Any one tried to add the functionality to use with glcd font creator?
Logged
th_sak
Active Member
***
Offline Offline

Posts: 141

Thank You
-Given: 150
-Receive: 149



« Reply #4 on: November 23, 2011, 02:30:00 14:30 »

I'm trying to download this lib but I get a corrupted rar file. Does anyone have it to reupload?

Thank's
Logged
PCROBOTICS
V.I.P
Junior Member
*****
Offline Offline

Posts: 63

Thank You
-Given: 958
-Receive: 178


Smile souling my love, weŽll always be together...


« Reply #5 on: November 23, 2011, 06:34:24 18:34 »

I'm trying to download this lib but I get a corrupted rar file. Does anyone have it to reupload?

Thank's

Yes, I download the file and I could not open it. Please if anyone has it, upload it, thanks.
Logged

"We are made of stardust."
Carl Sagan
jack12345
Junior Member
**
Offline Offline

Posts: 49

Thank You
-Given: 57
-Receive: 134


Happy diy


« Reply #6 on: November 24, 2011, 02:11:15 14:11 »

new download  link
http://www.4shared.com/file/5j0q4pGV/Extended_GLCD.html
Logged
saint
Newbie
*
Offline Offline

Posts: 23

Thank You
-Given: 21
-Receive: 69

!! SAINTRULEZ !!


« Reply #7 on: December 09, 2011, 12:42:05 12:42 »

New Download link added to topic...
Logged

System Design Engineer...

!! You DON'T DIE if you "Thank" someone !!

Visit TURKEY on your next vacation...
ahmed
Cracking Team
Senior Member
****
Offline Offline

Posts: 316

Thank You
-Given: 101
-Receive: 593


« Reply #8 on: April 26, 2015, 10:21:15 10:21 »

Hi,

Here is Modified version of CCS built in GLCD library for KS0108 based GLCD.(HDM64GS12.c and Graphics.c)

With some new and modified functions from Extended GLCD Library (posted here some years ago) and other by me.

New Functions included in library are,


    glcd_3Dbox(x,y,width,height,depth,color)


                     Draws a 3D box on a graphic LCD (Ex: to make a 3D Button)

    glcd_circle_seg(x,y,radius,angle_start,angle_end,color)


                     Draws a segment of a circle on a graphic LCD

    glcd_image(inverse)


                     Fills the graphic LCD screen with 128x64 bit converted image
                     with inverse option

    glcd_image_xy(x,y,inverse)

                  
                     Draws less or equal 128x64 pixels of image to the graphic LCD
                     screen on specified x, y coordinate with inverse option

    glcd_putc1116(x,y,textptr,size,color)                                              
                    * Write Text in 11x16 font



Tested personally! On software and by hardware both.
Demo Project of CCS compiler and Library files are attached.Proteus file is also included
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC