#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);
} |