CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

how to speed up

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
wh1sp3r



Joined: 15 Jul 2006
Posts: 22

View user's profile Send private message

how to speed up
PostPosted: Mon Jul 17, 2006 1:54 am     Reply with quote

Hi, lpease, how to speed up a pixel command for glcd ?
wh1sp3r



Joined: 15 Jul 2006
Posts: 22

View user's profile Send private message

PostPosted: Mon Jul 17, 2006 2:15 am     Reply with quote

Iam plaing with this ,, is good way ? :D

Code:
#include <16F877A>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=20000000)


#include <HDM64GS12>
#include <graphics>
#include <math>

void Main()
{
int a,i,c;

//glcd_init(ON);


    output_low(GLCD_DI);                      // Set for instruction
    glcd_writeByte(GLCD_LEFT, 0x40);          // Set horizontal address to 0
    glcd_writeByte(GLCD_RIGHT, 0x40);
   

    for(c = 0; c < 5;c++)
    {

      output_low(GLCD_DI);
      glcd_writeByte(GLCD_LEFT, c | 0xB8);      // Set page address
      glcd_writeByte(GLCD_RIGHT, c | 0xB8);
      output_high(GLCD_DI);                     // Set for data

     
     for(a = 0; a < 65;a++)
     {
         glcd_writeByte(GLCD_LEFT, 255);     
     }
     
    }

}
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Mon Jul 17, 2006 3:54 am     Reply with quote

The pixel command is slow because it has to read a whole byte from the LCD memory, modify a single pixel and then write back the whole byte.
What I understand from your other thread is that you don't want to modify a single pixel but you want to update the whole screen. I was going to recommend you have a look at glcd_update() in HDM64GS12.c but I can see from your posted code you already did so.

I didn't look into your program in detail, but the idea should work.

Code:
     for(a = 0; a < 65;a++)
Change this to
Code:
     for(a = 0; a < 64;a++)
wh1sp3r



Joined: 15 Jul 2006
Posts: 22

View user's profile Send private message

PostPosted: Mon Jul 17, 2006 2:47 pm     Reply with quote

please, is there some way, how to speed up pixel command ? please Smile
Guest
Guest







PostPosted: Mon Jul 17, 2006 5:14 pm     Reply with quote

LOL

I love the non english posters Smile
wh1sp3r



Joined: 15 Jul 2006
Posts: 22

View user's profile Send private message

PostPosted: Mon Jul 17, 2006 5:21 pm     Reply with quote

and i Dont LOVE people, who laugh to me. Shame on you :-P
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Tue Jul 18, 2006 6:11 am     Reply with quote

Our Guest poster was not being very nice, but what he meant to say was that just repeating the same question is not likely to give you a better response. In general the quality and number of responses in a forum like this depends on the quality of the question...

You gave us a sample program to which I responded by giving you a direction for faster screen redrawing. Ignoring my answer wasn't very nice and doesn't give us a hint as to what you really meant to say.

I guess I misunderstood you and you do really mean to speed up the pixel drawing? If yes, then be more specific. Tell us why you want it faster. Given that you want the pixel drawing to be faster I conclude you want to update multiple pixels. What do you want to draw? I ask this because it might be possible that for your drawing requirements a faster algorithm exists.

Give us as much details as you can: How fast is it now? How much faster do you need it to be? The exact type number of your display(driver), your compiler version, the processor you are using, etc., etc.
wh1sp3r



Joined: 15 Jul 2006
Posts: 22

View user's profile Send private message

PostPosted: Tue Jul 18, 2006 12:22 pm     Reply with quote

I have own algoritm for drawing image and animation (image per 8 ms) viz thread "GLCD image and animation maker", but i want draw some small images on different X,Y positions .. no 128x64, but for example 10x10 Smile glcd_pixel is really slow. when i draw small image, it takes about 70 ms .. its long time..
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group