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

GLCD 128x64 image and animation maker here :-P

 
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

GLCD 128x64 image and animation maker here :-P
PostPosted: Sat Jul 15, 2006 2:54 pm     Reply with quote

Hi, Iam new there, and i tried make something usefull.



loop down Smile new version there.


Last edited by wh1sp3r on Mon Jul 17, 2006 5:11 am; edited 4 times in total
wh1sp3r



Joined: 15 Jul 2006
Posts: 22

View user's profile Send private message

PostPosted: Mon Jul 17, 2006 4:20 am     Reply with quote

ok, i got it Smile I change all displaying routine, image is displayed about 8 ms !

http://archiv.softcz.com/imagemakerv2.rar

This is new version of my image maker, which work with new routine.
Next time, i will make some window gui, support for custom sizes of images and animation.

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


#include <HDM64GS12>
#include <math>

const int image_lefta[256] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,128,128,128,128,128,64,64,64,64,64,64,32,32,32,32,32,32,32,32,32,
32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
0,0,0,0,0,254,0,1,1,1,1,1,253,253,253,253,1,1,1,1,1,1,253,253,253,253,1,1,1,1,253,253,
253,253,249,241,225,193,129,193,225,249,253,253,253,253,253,1,1,1,1,253,253,253,253,221,221,221,29,17,1,255,1,1,
0,0,0,0,0,63,96,96,96,224,96,96,127,127,127,127,124,124,124,124,96,96,127,127,127,127,96,96,96,96,127,127,
127,127,97,103,111,127,127,111,103,99,97,127,127,127,127,96,96,96,96,127,127,127,127,125,125,125,124,116,96,127,64,64};
const int image_leftb[256] = {
0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,127,127,127,127,255,255,247,251,123,191,95,93,125,189,
189,63,93,89,177,115,243,229,207,27,63,119,255,207,191,255,255,255,255,255,255,255,255,127,127,127,127,127,127,127,127,255,
0,0,0,128,192,248,248,248,248,252,254,254,254,254,254,254,254,254,254,254,254,255,255,255,255,255,246,239,208,246,174,173,
169,128,209,208,224,247,249,255,255,252,220,240,127,255,223,255,255,255,255,255,255,254,254,255,255,255,255,255,255,255,254,255,
0,0,0,1,1,1,1,3,3,3,7,7,7,7,7,15,15,15,7,15,15,15,7,7,15,14,15,13,15,47,43,43,
43,43,43,47,111,239,255,253,253,255,254,255,255,255,255,255,191,191,239,239,239,191,255,191,255,255,255,255,255,255,255,255,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1};
const int image_rightc[256] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
32,32,160,160,160,96,224,224,96,96,96,32,0,32,32,32,32,32,32,32,32,32,0,0,64,64,64,0,128,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,1,0,254,1,168,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,224,24,36,132,0,2,130,5,81,68,112,
160,192,96,96,32,0,128,128,192,192,192,64,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
64,160,96,252,246,1,14,6,6,2,2,2,2,2,2,2,2,2,2,2,2,66,114,60,32,16,16,0,4,2,3,2,
0,0,0,4,4,4,4,20,16,16,16,16,16,9,9,41,112,32,67,5,240,126,174,128,56,0,0,0,0,0,0,0};
const int image_rightd[256] = {
255,255,127,127,125,120,120,120,120,120,248,120,120,120,120,120,120,248,248,224,135,0,0,0,0,0,0,0,0,128,240,248,
120,188,220,92,252,28,28,60,92,92,60,120,248,248,96,192,143,168,216,136,49,68,72,2,160,96,0,0,0,0,0,0,
255,255,255,255,255,255,254,254,254,254,254,254,254,254,254,254,254,254,254,254,255,255,255,255,255,255,254,255,190,255,255,253,
240,239,221,223,254,168,136,170,196,208,228,230,248,127,126,156,216,224,240,240,242,242,240,177,32,0,0,0,0,0,0,0,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,127,127,127,127,255,255,191,191,191,191,255,254,
255,253,255,255,255,251,255,255,255,127,125,63,31,31,31,31,31,31,63,15,15,7,7,3,3,3,0,0,0,0,0,0,
1,1,1,1,3,3,3,11,11,11,11,7,3,14,6,6,6,2,18,19,19,3,23,21,21,17,1,19,19,3,6,6,
14,15,15,7,15,15,15,11,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};

int a;
int b;
int c;
int radek;
int offset;
int x;
int sloupec;
int offset2;

void glcd_image(int image1)
{
    output_low(GLCD_DI);                     
    glcd_writeByte(GLCD_LEFT, 0x40);         
    glcd_writeByte(GLCD_RIGHT, 0x40);

    offset = 0;


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

      output_low(GLCD_DI);
      glcd_writeByte(GLCD_LEFT, c | 0xB8);     
      glcd_writeByte(GLCD_RIGHT, c | 0xB8);
      output_high(GLCD_DI);                   

     for(a = 0; a < 64;a++)
     {
         if(c<4>3) glcd_writeByte(GLCD_LEFT, image_leftb[a+offset]);
         if(c<4>3) glcd_writeByte(GLCD_RIGHT, image_rightd[a+offset]);
     delay_us(5);
     }
     offset += 64;
     }


}



void main()
{
  glcd_init(ON);
  delay_ms(100);

  glcd_image(1);
}


:o)
wh1sp3r



Joined: 15 Jul 2006
Posts: 22

View user's profile Send private message

PostPosted: Mon Jul 17, 2006 5:10 am     Reply with quote

animation here :o)

http://videa.softcz.com/animation.avi (1MB)

I have to tell you again, that this is with 16F877A ! Smile
wh1sp3r



Joined: 15 Jul 2006
Posts: 22

View user's profile Send private message

PostPosted: Mon Jul 17, 2006 8:46 am     Reply with quote

So, this is my animator Smile

http://archiv.softcz.com/glcdanim.rar

and code:

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


#include <HDM64GS12>
#include <math>
#include "imagedata.h"



void main()
{
  glcd_init(ON);
  delay_ms(100);

  loop:
  glcd_image(1);
  delay_ms(500);
  glcd_image(2);
  delay_ms(500);
  glcd_image(3);
  delay_ms(500);
  glcd_image(4);
  delay_ms(500);
  glcd_image(5);
  delay_ms(500);
  glcd_image(6);
  delay_ms(500);
  glcd_image(7);
  delay_ms(500);
  glcd_image(8);
  delay_ms(500);
  goto loop;
}


Try it Smile and tell me, what do you think
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