Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- *********************************************************************
- ** Matriz de LED de 192 pixels de Resolution Firmaware_1.0.
- ** Autor: El Guajirigallo**
- ** https://youtu.be/DfsPXaMLpcE !!!! **
- */
- # include <16F877A.h>
- # use Delay(clock=4000000)
- # use Fast_io(b)
- # use Fast_io(c)
- # use fast_io(d)
- # fuses XT,NOWDT
- # byte PoRt_a = 0x05
- # byte PoRt_B = 0x06
- # byte PoRt_c = 0x07
- # byte PoRt_d = 0x08
- #define data_pin PIN_C5
- #define clock_pin PIN_C6
- #define latch_pin PIN_C7
- void f74595_init(){
- output_bit(data_pin,1);
- output_bit(clock_pin,1);
- output_bit(data_pin,0);
- }
- void f74595_clock(){
- output_bit(clock_pin,1);
- output_bit(clock_pin,0);
- output_bit(latch_pin,1);
- output_bit(latch_pin,0);
- }
- // void Send_Data(void);
- // void carry_rows(void);
- void stop(void);
- void Adv_1(void); //FUNTION QUE MUSTRA LOS ANUNCIOS
- void fig(void);
- void adv_2(void);
- //void write_data(unsigned int32 number);
- //int32 filas(int32 ref);
- void write_data(unsigned int number){ //FUNCION PARA ESCRBOR LOS DIGITOS EN EL DISPLAY
- for(int32 j= 0x2000000;j>0;j=j>>1){
- //for(int32 j= 0x4000000;j>0;j= j>>1){
- if(number & j) //and ligico entre j y number para detectar bit a bit 0 o 1 de number
- output_high(data_pin);
- else
- output_low(data_pin);
- output_high(clock_pin);
- output_low(clock_pin);
- }
- output_high(latch_pin);
- output_low(latch_pin);
- //delay_ms(100);
- }
- int32 filas(int32 ref){
- switch(ref){
- //case 0: return 0xffffff;
- case 0: return 0x3fffffe;
- case 1: return 0x3FFFFFD;
- case 2: return 0x3FFFFFb;
- case 3: return 0x3FFFFF7;
- case 4: return 0x3FFFFEF;
- case 5: return 0x3FFFFDF;
- case 6: return 0x3FFFFBF;
- case 7: return 0x3FFFF7F;
- case 8: return 0x3FFFEFF;
- case 9: return 0x3FFFDFF;
- case 10: return 0x3FFFBFF;
- case 11: return 0x3FFF7FF;
- case 12: return 0x3FFEFFF;
- case 13: return 0x3FFDFFF;
- case 14: return 0x3FFBFFF;
- case 15: return 0x3FF7FFF;
- case 16: return 0x3FEFFFF;
- case 17: return 0x3FDFFFF;
- case 18: return 0x3FBFFFF;
- case 19: return 0x3F7FFFF;
- case 20: return 0x3EFFFFF;
- case 21: return 0x3DFFFFF;
- case 22: return 0x3BFFFFF;
- case 23: return 0X37FFFFF;
- case 24: return 0x02FFFFFF;
- case 25: return 0x01FFFFFF;
- }
- }
- /*
- int32 filas(int32 ref){
- switch(ref){
- case 0: return 0x01FFFFFF;
- case 1: return 0x02FFFFFF;
- case 2: return 0X37FFFFF;
- case 3: return 0x3BFFFFF;
- case 4: return 0x3DFFFFF;
- case 5: return 0x3EFFFFF;
- case 6: return 0x3F7FFFF;
- case 7: return 0x3FBFFFF;
- case 8: return 0x3FDFFFF;
- case 9: return 0x3FEFFFF;
- case 10: return 0x3FF7FFF;
- case 11: return 0x3FFBFFF;
- case 12: return 0x3FFDFFF;
- case 13: return 0x3FFEFFF;
- case 14: return 0x3FFF7FF;
- case 15: return 0x3FFFBFF;
- case 16: return 0x3FFFDFF;
- case 17: return 0x3FFFEFF;
- case 18: return 0x3FFFF7F;
- case 19: return 0x3FFFFBF;
- case 20: return 0x3FFFFDF;
- case 21: return 0x3FFFFEF;
- case 22: return 0x3FFFFF7;
- case 23: return 0x3FFFFFb;
- case 24: return 0x3FFFFFD;
- case 25: return 0x3fffffe;
- }
- }
- */
- int const PWR[]={ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfe,0xff,0x33,0x33,0xff,0xfe,//A
- 0x00,
- 0x6c,0xfe,0x92,0xaa,0x44,0xa0,0x10,//&
- 0x00,
- 0xfe,0xff,0x33,0x33,0xff,0xfe,//A
- 0x00,0x00,0x00,
- 0xff,0xff,0x99,0x99,0x81,//E
- 0x00,
- 0xfe,0xfe,0x80,0x80,0x80,//L
- 0x00,
- 0x78,0xfc,0x94,0x94,0x9c,0x98,//e
- 0x00,
- 0x78,0xfc,0x84,0x84,0x48,//c
- 0x00,
- 0x04,0x7e,0xfe,0x84,0x40,//t
- 0x00,
- 0xf8,0xfc,0x04,0x04,0x08,//r
- 0x00,
- 0xf6,0xf6,//i
- 0x00,
- 0x78,0xfc,0x84,0x84,0x48,//c
- 0x00,//106
- 0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
- 0x00,
- 0xfe,0xfe,0x80,0x80,0x00,//l
- 0x00,
- 0x00,0x00,
- 0x86,0x8f,0x89,0x89,0xf9,0x71,//S
- 0x00,
- 0x78,0xfc,0x84,0xfc,0x78,//o
- 0x00,
- 0xfe,0xfe,0x80,0x80,//l
- 0x00,
- 0x7c,0xfc,0x80,0x80,0x7c,//u150
- 0x00,
- 0x04,0x7e,0xfe,0x84,0x40,//t
- 0x00,
- 0xf6,0xf6,//i
- 0x00,
- 0x78,0xfc,0x84,0xfc,0x78,//o
- 0x00,
- 0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
- 0x00,
- 0x88,0x9c,0x94,0x94,0xf4,0x64,//s
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x1c,0x2c,0x40,0x98,0xd6,0xc4,0x00,0x00, //telefono
- 0x00,0x00,
- 0x42,0xc3,0x89,0x89,0xff,0x76,//205 //3
- 0x00,
- 0x7e,0xff,0x99,0x8d,0xff,0x7e, //0
- 0x00,
- 0x4f,0x8d,0x8d,0xfd,0x79, //5
- 0x00,0x00,0x18,0x18,0x18,0x00,//gion
- 0x42,0xc3,0x89,0x89,0xff,0x76, //3
- 0x00,
- 0x82,0xff,0xff,0x80, //1
- 0x00,
- 0x78,0xfc,0x96,0x93,0xf1,0x61, //6
- 0x00,0x18,0x18,0x18,0x00,//gion
- 0x7e,0xff,0x99,0x8d,0xff,0x7e, //0
- 0x00,
- 0x7e,0xff,0x99,0x8d,0xff,0x7e, //0
- 0x00,
- 0x01,0xf1,0xf9,0x0d,0x07,0x03,//7
- 0x00,
- 0xc2,0xe3,0xb1,0x99,0x8f,0x86,//2
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xff,0xff,0x06,0x0c,0x0c,0x06,0xff,0xff,//M
- 0x00,
- 0xf6,0xf6,//i
- 0x00,
- 0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
- 0x00,
- 0xf6,0xf6,//i
- 0x00,0x00, 0x00,0x00,
- 0x86,0x8f,0x89,0x89,0xf9,0x71,//S
- 0x00,
- 0xfc,0xfe,0x22,0x3e,0x1c,//p
- 0x00,
- 0xfe,0xfe,0x80,0x80,//l
- 0x00,
- 0xf6,0xf6,//i
- 0x00,
- 0x04,0x7e,0xfe,0x84,0x40,//t
- 0x00,
- 0x00,
- 0x81,0xff,0xff,0x80,//I
- 0x00,
- 0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
- 0x00,
- 0x88,0x9c,0x94,0x94,0xf4,0x64,//s
- 0x00,
- 0x04,0x7e,0xfe,0x84,0x40,//t
- 0x00,
- 0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
- 0x00,
- 0xfe,0xfe,0x80,0x80,//l
- 0x00,
- 0xfe,0xfe,0x80,0x80,//l
- 0x00,
- 0x60,0xf4,0x94,0xfc,0xf8,//a
- 0x00,
- 0x04,0x7e,0xfe,0x84,0x40,//t
- 0x00,
- 0xf6,0xf6,//i
- 0x00,
- 0x78,0xfc,0x84,0xfc,0x78,//o
- 0x00,
- 0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xff,0xff,0x18,0x18,0x18,0xff,0xff,//H
- 0x00,
- 0x78,0xfc,0x84,0xfc,0x78,//o
- 0x00,
- 0xfc,0xfc,0x18,0x30,0x18,0xfc,0xfc,//m
- 0x00,
- 0x78,0xfc,0x94,0x94,0x9c,0x98,//e
- 0x00,
- 0x00,
- 0xff,0xff,0x11,0x71,0xdf,0x8e,//R
- 0x00,
- 0x78,0xfc,0x94,0x94,0x9c,0x98,//e
- 0x00,
- 0xfe,0xfe,0x40,0x20,0x40,0xfe,//w
- 0x00,
- 0xf6,0xf6,//i
- 0x00,
- 0xf8,0xfc,0x04,0x04,0x08,//r
- 0x00,
- 0xf6,0xf6,//i
- 0x00,
- 0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
- 0x00,
- 0x18,0xbc,0xa4,0xa4,0xfc,0x7c,//g
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xff,0xff,0x1e,0x3c,0x78,0xff,0xff,//N
- 0x00,
- 0x78,0xfc,0x94,0x94,0x9c,0x98,//e
- 0x00,
- 0xfe,0xfe,0x40,0x20,0x40,0xfe,//w
- 0x00,0x00,0x00,
- 0xff,0xff,0x11,0x11,0x0e,//P
- 0x00,
- 0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
- 0x00,
- 0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
- 0x00,
- 0x78,0xfc,0x94,0x94,0x9c,0x98,//e
- 0x00,
- 0xfe,0xfe,0x80,0x80,//l
- 0x00,0x00,
- 0x81,0xff,0xff,0x80,//I
- 0x00,
- 0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
- 0x00,
- 0x88,0x9c,0x94,0x94,0xf4,0x64,//s
- 0x00,
- 0x04,0x7e,0xfe,0x84,0x40,//t
- 0x00,
- 0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
- 0x00,
- 0xfe,0xfe,0x80,0x80,//l
- 0x00,
- 0xfe,0xfe,0x80,0x80,//l
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x08,0xcc,0xb4,0x94,0x94,0xb4,0xcc,0x08,//telefono 2
- 0x00,0x00,0x00,0x00,
- 0x44,0x82,0x92,0x92,0x6c,
- 0x00, //3
- 0x7c,0xa2,0x92,0x8a,0x7c, //0
- 0x00,
- 0x4e,0x8a,0x8a,0x8a,0x72, //5
- 0x00,0x00,0x18,0x18,0x18,0x00,//gion
- 0x44,0x82,0x92,0x92,0x6c, //3
- 0x00,
- 0x84,0xfe,0x80, //1
- 0x00,
- 0x78,0x94,0x92,0x92,0x60, //6
- 0x00,0x18,0x18,0x18,0x00,//gion
- 0x7c,0xa2,0x92,0x8a,0x7c,
- 0x00,//0
- 0x7c,0xa2,0x92,0x8a,0x7c, //0
- 0x00,
- 0x02,0xe2,0x12,0x0a,0x06, //7
- 0x00,
- 0xc4,0xa2,0xa2,0x92,0x8c, //2
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xff,0xff,0x60,0x30,0x30,0x60,0xff,0xff,//w
- 0x00,
- 0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
- //0x00,
- 0x04,0x7e,0xfe,0x84,0x40,//t
- 0x00,
- 0x78,0xfc,0x94,0x94,0x9c,0x98,//e
- 0x00,
- 0xf8,0xfc,0x04,0x04,0x08,//r
- 0x00,0x00,
- 0xff,0xff,0x18,0x18,0xff,0xff,//H
- 0x00,
- 0x78,0xfc,0x94,0x94,0x9c,0x98,//e
- 0x00,
- 0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
- 0x00,
- 0x04,0x7e,0xfe,0x84,0x40,//t
- 0x00,
- 0x78,0xfc,0x94,0x94,0x9c,0x98,//e
- 0x00,
- 0xf8,0xfc,0x04,0x04,0x08,//r
- 0x00,0x00,
- 0x81,0xff,0xff,0x80, //I
- 0x00,
- 0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
- 0x00,
- 0x88,0x9c,0x94,0x94,0xf4,0x64,//s
- 0x00,
- 0x04,0x7e,0xfe,0x84,0x40,//t
- 0x00,
- 0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
- 0x00,
- 0xfe,0xfe,0x80,0x80,//l
- 0x00,
- 0xfe,0xfe,0x80,0x80,//l
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xff,0xff,0x70,0x38,0x38,0x70,0xff,0xff,//w
- 0x00,
- 0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
- 0x00,
- 0x88,0x9c,0x94,0x94,0xf4,0x64,//s
- 0x00,
- 0xfe,0xfe,0x10,0x10,0xe0,//h
- 0x00,
- 0x78,0xfc,0x94,0x94,0x9c,0x98,//e
- 0x00,
- 0xf8,0xfc,0x04,0x04,0x08,0x00,//r
- 0x00,
- 0x30,0x30,0x30,0x00,//gion
- 0x00,
- 0xff,0xff,0x81,0x81,0x7e,0x3c, //D
- 0x00,
- 0xf8,0xfc,0x04,0x04,0x08,//r
- 0x00,
- 0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
- 0x00,
- 0x0e,0x1e,0xf0,0xf0,0x1e,0x0e,//y
- 0x00,
- 0x78,0xfc,0x94,0x94,0x9c,0x98,//e
- 0x00,
- 0xf8,0xfc,0x04,0x04,0x08,//r
- 0x00,0x00,
- 0x81,0xff,0xff,0x80,//I
- 0x00,
- 0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
- 0x00,
- 0x88,0x9c,0x94,0x94,0xf4,0x64,//s
- 0x00,
- 0x04,0x7e,0xfe,0x84,0x40,//t
- 0x00,
- 0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
- 0x00,
- 0xfe,0xfe,0x80,0x80,//l
- 0x00,
- 0xfe,0xfe,0x80,0x80,//l
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x7e,0xff,0x81,0x81,0xc3,0x42,//C
- 0x00,
- 0x78,0xfc,0x94,0x94,0x9c,0x98,//e
- 0x00,
- 0xf6,0xf6,//i
- 0x00,
- 0xfe,0xfe,0x80,0x80,//l
- 0x00,
- 0xf6,0xf6,//i
- 0x00,
- 0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
- 0x00,
- 0x18,0xbc,0xa4,0xa4,0xfc,0x7c,//g
- 0x00,0x00,
- 0xff,0xff,0x13,0x13,0x03,//F
- 0x00,
- 0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
- 0x00,
- 0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
- 0x00,0x00,0x00,
- 0x81,0xff,0xff,0x80,//I
- 0x00,
- 0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
- 0x00,
- 0x88,0x9c,0x94,0x94,0xf4,0x64,//s
- 0x00,
- 0x04,0x7e,0xfe,0x84,0x40,//t
- 0x00,
- 0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
- 0x00,
- 0xfe,0xfe,0x80,0x80,//l
- 0x00,
- 0xfe,0xfe,0x80,0x80,//l
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x44,0x82,0x92,0x92,0x6c,
- 0x00, //3
- 0x7c,0xa2,0x92,0x8a,0x7c, //0
- 0x00,
- 0x4e,0x8a,0x8a,0x8a,0x72, //5
- 0x00,0x00,0x18,0x18,0x18,0x00,//gion
- 0x44,0x82,0x92,0x92,0x6c, //3
- 0x00,
- 0x84,0xfe,0x80, //1
- 0x00,
- 0x78,0x94,0x92,0x92,0x60, //6
- 0x00,0x18,0x18,0x18,0x00,//gion
- 0x7c,0xa2,0x92,0x8a,0x7c,
- 0x00,//0
- 0x7c,0xa2,0x92,0x8a,0x7c, //0
- 0x00,
- 0x02,0xe2,0x12,0x0a,0x06, //7
- 0x00,
- 0xc4,0xa2,0xa2,0x92,0x8c, //2
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
- };
- int const figr[] = {
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x38,0x5c,0xbe,0xbe,0x94,0x94,0x42,0x3c,
- 0x00,0x00,0x00,0x00,0x00,
- 0x7e,0xff,0xcf,0xf9,0xf9,0xcf,0xff,0x7e,
- 0x00,0x00,0x00,0x00,0x00,
- 0x18,0x3e,0xf8,0xf8,0xf8,0x3e,0x18,0x00,
- 0x00,0x00,0x00,0x00,0x00,
- 0x80,0x68,0x3c,0x1a,0x01,0x00,0x00,0x00,
- 0x00,0x00,
- 0x08,0x08,0x28,0xaf,0x28,0x08,0x08,0x00,
- 0x00,0x00,0x00,0x00,0x00,
- 0x80,0x48,0x18,0x3a,0x7c,0x08,0x12,0x01,
- 0x00,0x00,0x00,0x00,0x00,
- 0xc0,0x9c,0xbe,0xc1,0x01,0xc1,0xbe,0x9c,0xc0,
- 0x00,0x00,0x00,0x00,0x00,
- 0x10,0x10,0x10,0x10,0x38,0x7c,0x7c,0x00,//101
- 0x28,0x28,0x7c,0x7c,0x38,0x10,0x10,0x10,
- 0x00,0x00,0x00,0x00,0x00,
- 0x11,0x04,0x40,0x7e,0xff,0xe3,0x7e,0x40,
- 0x04,0x11,0x00,0x00,0x00,0x00,0x00,
- 0x40,0x5e,0xe1,0xff,0x5e,0x40,0x00,0x14,
- 0x22,0x41,0x00,0x00,0x00,0x00,0x00,
- 0x0c,0x1f,0xfc,0x9f,0x8c,0x80,0xfe,0x02,
- 0x02,0x3e,
- 0x40,0x80,0x40,0x38,0x04,0x02,0x04,0x38,0x40,0x80,0x40,0x38,0x04,0x02,0x04,0x38,//scope1
- 0x40,0x80,0x40,0x38,0x04,0x02,0x04,0x38,0x40,0x80,0x40,0x38,0x04,0x02,0x04,0x38,//scope2
- 0x40,0x80,0x40,0x38,0x04,0x02,0x04,0x38,0x40,0x80,0x40,0x38,0x04,0x02,0x04,0x38,//scope3
- 0x80,0x8c,0x9f,0x7c,0x1f,0x0c,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//112
- };
- int const tabla[]={
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xfe,0xff,0x11,0x11,0x11,0xfe,0x00,//A
- 0x00,
- 0x6c,0xfe,0x92,0xaa,0x44,0xa0,0x10,//&
- 0x00,0x00,
- 0xfe,0xff,0x11,0x11,0x11,0xfe,0x00,//A
- 0x00,0x00,0x00, 0x00,
- 0xff,0xff,0x99,0x99,0x81,0x00,//E
- 0x00,
- 0xfe,0xfe,0x80,0x80,0x80,0x00,//L
- 0x00,
- 0x78,0xfc,0x94,0x94,0x9c,0x98,0x00,//e
- 0x00,
- 0x78,0xfc,0x84,0x84,0x48,0x00,//c
- 0x00,
- 0x04,0x7e,0xfe,0x84,0x40,0x00,//t
- 0x00,
- 0xf8,0xfc,0x04,0x04,0x08,0x00,//r
- 0x00,
- 0xf6,0xf6,0x00,0x00,//i
- 0x78,0xfc,0x84,0x84,0x48,0x00,//c
- 0x00,//106
- 0x60,0xf4,0x94,0xfc,0xf8,0x80,0x00,//a
- 0x00,
- 0xfe,0xfe,0x80,0x80,0x00,//l
- 0x00,
- 0x00,0x00,0x00,
- 0x86,0x8f,0x89,0x89,0xf9,0x71,0x00,//S
- 0x00,
- 0x78,0xfc,0x84,0xfc,0x78,0x00,//o
- 0x00,
- 0xfe,0xfe,0x80,0x80,0x00,//l
- 0x00,
- 0x7c,0xfc,0x80,0x80,0x7c,0x00,//u150
- 0x00,
- 0x04,0x7e,0xfe,0x84,0x40,0x00,//t
- 0x00,
- 0xf6,0xf6,0x00,0x00,//i
- 0x78,0xfc,0x84,0xfc,0x78,0x00,//o
- 0x00,
- 0xfc,0xfc,0x0c,0x04,0xfc,0xf8,0x00,//n
- 0x00,
- 0x88,0x9c,0x94,0x94,0xf4,0x64,0x00,//s
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x1c,0x2c,0x40,0x98,0xd6,0xc4,0x00,0x00, //telefono
- 0x00,0x00,
- 0x42,0xc3,0x89,0x89,0xff,0x76,0x00,//205 //3
- 0x00,
- 0x7e,0xff,0x99,0x8d,0xff,0x7e,0x00, //0
- 0x00,
- 0x4f,0x8d,0x8d,0xfd,0x79,0x00,0x00, //5
- 0x00,0x00,0x18,0x18,0x18,0x00,0x00, //gion
- 0x42,0xc3,0x89,0x89,0xff,0x76,0x00, //3
- 0x00,
- 0x82,0xff,0xff,0x80,0x00, //1
- 0x00,
- 0x78,0xfc,0x96,0x93,0xf1,0x61, //6
- 0x00,0x00,0x18,0x18,0x18,0x00,0x00, //gion
- 0x7e,0xff,0x99,0x8d,0xff,0x7e,0x00, //0
- 0x00,
- 0x7e,0xff,0x99,0x8d,0xff,0x7e,0x00, //0
- 0x00,
- 0x01,0xf1,0xf9,0x0d,0x07,0x03,0x00, //7
- 0x00,
- 0xc2,0xe3,0xb1,0x99,0x8f,0x86,0x00, //2
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- //0x04,0x02,0x01,0x02,0x04,0x00,0x00, //espacio
- //0x01,0x7f,0xb7,0xcf,0xcf,0xb7,0x7f,0x01, //camara
- //0x00,0x00,0x00,
- 0x01,0x7f,0xb7,0xcf,0xcf,0xb7,0x7f,0x01, //camara
- 0x00,0x00,0x00,0x00,
- 0x7e,0xff,0x81,0x81,0xc3,0x42,0x00,//C
- 0x00,
- 0x7e,0xff,0x81,0x81,0xc3,0x42,0x00,//C
- 0x00,
- 0x03,0x03,0xff,0xff,0x03,0x03,0x00,//T
- 0x00,
- 0x0f,0x3f,0xf0,0xf0,0x3f,0x0f,0x00,//V
- 0x00,0x00,0x00,
- 0x01,0x7f,0xb7,0xcf,0xcf,0xb7,0x7f,0x01, //camara
- //0x00,0x00,0x00,
- // 0x01,0x7f,0xb7,0xcf,0xcf,0xb7,0x7f,0x01, //camara
- //0x00,0x04,0x02,0x01,0x02,0x04,0x00,//espacio
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0xf6,0xf1,0xf1,0xf1,0xfe,0xf0,0x00,//candado left
- 0x00,
- 0xfe,0xff,0x13,0x13,0x13,0xfe,0x00,//A
- 0x00,
- 0x78,0xfc,0x84,0x84,0x48,0x00,//c
- 0x00,
- 0x78,0xfc,0x84,0x84,0x48,0x00,//c
- 0x00,
- 0x78,0xfc,0x94,0x94,0x9c,0x98,0x00,//e
- 0x00,
- 0x88,0x9c,0x94,0x94,0xf4,0x64,0x00,//s
- 0x00,
- 0x88,0x9c,0x94,0x94,0xf4,0x64,0x00,//s
- 0x00,0x00,0x00,
- 0x7e,0xff,0x81,0x81,0xc3,0x42,0x00,//C
- 0x00,
- 0x78,0xfc,0x84,0xfc,0x78,0x00,//O
- 0x00,
- 0xfc,0xfc,0x0c,0x04,0xfc,0xf8,0x00,//n
- 0x00,
- 0x04,0x7e,0xfe,0x84,0x40,0x00,//t
- 0x00,
- 0xf8,0xfc,0x04,0x04,0x08,0x00,//r
- 0x00,
- 0x78,0xfc,0x84,0xfc,0x78,0x00,//O
- 0x00,
- 0xfe,0xfe,0x80,0x80,0x00,//l
- 0x00,
- 0xf0,0xfe,0xf1,0xf1,0xf1,0xf6,0x00,//candado right
- 0x00,0x00,0xc0,0xc0,//Dot
- 0x00,0x00,0xc0,0xc0,//Dot
- 0x00,0x00,0xc0,0xc0,//Dot
- 0x00,0x00,0xc0,0xc0,//Dot
- 0x00,0x00,0x00,
- //0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- //0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- //0x00,0x04,0x02,0x01,0x02,0x04,0x00, //espacio
- 0xff,0xff,0x81,0x81,0x7e,0x3c,0x00, //D
- 0x00,
- 0x60,0xf4,0x94,0xfc,0xf8,0x80,0x00,//a
- 0x00,
- 0x04,0x7e,0xfe,0x84,0x40,0x00,//t
- 0x00,
- 0x60,0xf4,0x94,0xfc,0xf8,0x80,0x00,//a
- 0x00,
- 0x00,0x04,0x02,0x01,0x02,0x04,0x00, //espacio
- 0x00,0x00,
- 0x0f,0x3f,0xf0,0xf0,0x3f,0x0f,0x00,//V
- 0x00,
- 0x78,0xfc,0x84,0xfc,0x78,0x00,//o
- 0x00,
- 0xf6,0xf6,0x00,0x00,//i
- 0x00,
- 0x78,0xfc,0x84,0x84,0x48,0x00,//c
- 0x00,
- 0x78,0xfc,0x94,0x94,0x9c,0x98,0x00,//e
- 0x00,
- 0x00,0x04,0x02,0x01,0x02,0x04,0x00, //espacio
- 0x00,
- 0x7e,0xff,0x81,0x81,0xc3,0x42,0x00,//C
- 0x00,
- 0x60,0xf4,0x94,0xfc,0xf8,0x80,0x00,//a
- 0x00,
- 0xff,0xff,0x98,0x88,0xf8,0x70,0x00,//b
- 0x00,
- 0xfe,0xfe,0x80,0x80,0x00,//l
- 0x00,
- 0xf6,0xf6,0x00,0x00,//i
- 0x00,
- 0xfc,0xfc,0x0c,0x04,0xfc,0xf8,0x00,//n
- 0x00,
- 0x18,0xbc,0xa4,0xa4,0xfc,0x7c,0x00,//g
- 0x00,0x00,0x00,0x00,
- 0x86,0x8f,0x89,0x89,0xf9,0x71,0x00,//S
- 0x00,
- 0x78,0xfc,0x84,0xfc,0x78,0x00,//o
- 0x00,
- 0xfe,0xfe,0x80,0x80,0x00,//l
- 0x00,
- 0x7c,0xfc,0x80,0x80,0x7c,0x00,//u
- 0x00,
- 0x04,0x7e,0xfe,0x84,0x40,0x00,//t
- 0x00,
- 0xf6,0xf6,0x00,0x00,//i
- 0x00,
- 0x78,0xfc,0x84,0xfc,0x78,0x00,//o
- 0x00,
- 0xfc,0xfc,0x0c,0x04,0xfc,0xf8,0x00,//n
- 0x00,
- 0x88,0x9c,0x94,0x94,0xf4,0x64,0x00,//s
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x08,0xcc,0xb4,0x94,0x94,0xb4,0xcc,0x08,//telefono 2
- 0x00,0x00,0x00,0x00,
- 0x42,0xc3,0x89,0x89,0xff,0x76,0x00, //3
- 0x00,
- 0x7e,0xff,0x99,0x8d,0xff,0x7e,0x00, //0
- 0x00,
- 0x4f,0x8d,0x8d,0xfd,0x79,0x00,0x00, //5
- 0x00,0x00,0x18,0x18,0x18,0x00,0x00,//gion
- 0x42,0xc3,0x89,0x89,0xff,0x76,0x00, //3
- 0x00,
- 0x82,0xff,0xff,0x80,0x00, //1
- 0x00,
- 0x78,0xfc,0x96,0x93,0xf1,0x61, //6
- 0x00,0x00,0x18,0x18,0x18,0x00,0x00,//gion
- 0x7e,0xff,0x99,0x8d,0xff,0x7e,0x00, //0
- 0x00,
- 0x7e,0xff,0x99,0x8d,0xff,0x7e,0x00, //0
- 0x00,
- 0x01,0xf1,0xf9,0x0d,0x07,0x03,0x00, //7
- 0x00,
- 0xc2,0xe3,0xb1,0x99,0x8f,0x86,0x00, //2
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x0f,0x1f,0xf0,0xf0,0x1f,0x0f,//Y
- 0x00,0x00,
- 0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
- 0x00,0x00,
- //0xf8,0xfc,0x0c,0xf8,0x0c,0x0c,0xf8,//m
- 0xfc,0x08,0x30,0x08,0xfc,
- 0x00,0x00,
- 0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
- 0x00,0x00,
- 0xfe,0xfe,0x10,0xf0,0xe0,//h
- 0x00,0x00,
- 0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
- 0x00,0x00,0x00,0x00,
- 0xff,0x02,0x04,0x08,0x04,0x02,0xff,//M
- 0x00,0x00,
- 0x7c,0xfc,0x80,0x80,0x7c,//u
- 0x00,0x00,
- 0x88,0x9c,0x94,0x94,0xf4,0x64,0x00,//s
- 0x00,
- 0xf6,0xf6,0x00,//i
- 0x00,
- 0x78,0xfc,0x84,0x84,0x48,0x00,//c
- 0x00,0x00,0x00,
- 0x7e,0xff,0x81,0x81,0xc3,0x42,0x00,//C
- 0x00,
- 0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
- 0x00,0x00,
- 0x88,0x9c,0x94,0x94,0xf4,0x64,0x00,//s
- 0x00,
- 0x04,0x7e,0xfe,0x84,0x40,0x00,//t
- 0x00,0x00,0x00,0x00,
- 0x81,0xff,0xff,0x80,0x00,//I
- 0x00,
- 0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
- 0x00,0x00,
- 0x88,0x9c,0x94,0x94,0xf4,0x64,//s
- 0x00,0x00,
- 0x04,0x7e,0xfe,0x84,0x40,0x00,//t
- 0x00,
- 0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
- 0x00,0x00,
- 0xfe,0xfe,0x80,0x80,0x00,//l
- 0x00,
- 0xfe,0xfe,0x80,0x80,0x00,//l
- 0x00,0x00,0x00,
- 0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
- 0x00,0x00,
- 0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
- 0x00,0x00,
- 0x60,0x90,0x9e,0xfe,0x80,//d
- 0x00,0x00,0x00,0x00,
- 0x86,0x8f,0x89,0x89,0xf9,0x71,0x00,//S
- 0x00,
- 0x78,0xfc,0x94,0x94,0x9c,0x98,0x00,//e
- 0x00,
- 0x04,0x7e,0xfe,0x84,0x40,0x00,//t
- 0x00,
- 0x7c,0xfc,0x80,0x80,0x7c,//u
- 0x00,0x00,
- 0x84,0xfc,0xfc,0x24,0x24,0x18,//p
- 0x00,0x00,0xc0,0xc0,//Dot
- 0x00,0x00,0xc0,0xc0,//Dot
- 0x00,0x00,0xc0,0xc0,//Dot
- 0x00,0x00,0xc0,0xc0,//Dot
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
- };
- void arrow_right(void);//FUNTION QUE MUUEVE LA FLECHA ALA DERECHA
- void arrow_left(void);//FUNTION QUE MUEVE LA FLECHA ALA ISQUIERDA
- //int R_arrow[]={ 0x08,0x14,0x22,0x49,0x08,0x08,0x08,0x08} ;//RIGHT ARROW
- //int l_arrow[]={ 0x08,0x08,0x08,0x08,0x49,0x22,0x14,0x08} ;//LEFT ARROW
- //int Clear_Dir[8]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};// _limpiar_Direccion
- // int direction[8];//ARREGLO DE 8 BYTE PARA USARLO COMO DIREECION EN QUE SE MUEVE LA FLECHA.
- // long v;
- long strb=1500;
- int cont=0;
- void main(){
- set_tris_a(0x0f);
- set_tris_b(0x00);
- set_tris_c(0x00);
- set_tris_d(0x00);
- int i=0;
- while(1){
- do{
- adv_1();
- i++;
- } while(i<1);
- i=0;
- do{
- fig();
- i++;
- } while(i<1);
- i=0;
- do{
- adv_2();
- i++;
- } while(i<1);
- do{
- if(!input(pin_a1)&& (!input(pin_a2))){
- Stop();
- }else if(!input(pin_a1)){// && input(pin_a2)){
- arrow_left();
- }else if(!input(pin_a2))//&& input(pin_a0))
- {
- arrow_right();
- }
- }While((!input(pin_a1))||(!input(pin_a2)));
- }
- } //End del main.
- void Stop(){
- char *w;
- //long strb=1500;
- char LeTra[]= {
- 0x00,0x46,0x8f,0x89,0xf9,0x72,0x00,//S
- 0x01,0x01,0xff,0xff,0x01,0x01,0x00,//T
- 0x3c,0x7e,0x81,0x7e,0x3c,0x00,//O
- 0x81,0xff,0xff,0x91,0x0e//P
- };
- do{
- w=&LeTra[0];
- for(int z=0;z<25;++z){
- PoRt_D=0x00;
- write_data(filas(z));
- PoRt_D= *(w+z);
- //write_data(filas(z));
- DeLay_us(strb);//1500 para Effecto Strobe
- strb=strb+50;
- if(strb > 5000) strb=1500;
- }
- }while(!input(pin_a1) && (!input(pin_a2)));
- }
- void adv_1()
- {
- for(long R=0;R<1270;R++)
- {
- for(int i=0;i<1;i++){
- for(int t=0;t<=25;t++){
- port_D=0x00;
- write_data(filas(t));
- port_D= (PWR[t+R]);
- // write_data(filas(t));
- // port_D= (PWR[t+R]);
- delay_us(200);
- //port_D=0x00;
- }
- }
- if((!input(pin_a1))||(!input(pin_a2))){goto salir ;}
- }
- salir:
- delay_ms(1);
- }
- void fig(){
- for(int R=0;R<232;R++){
- for(int h=0;h<1;h++){
- for(int t=0;t<=25;t++){
- write_data(filas(t));
- port_D= (figr[cont + R]);
- delay_us(450);
- cont++;
- port_D=0x00;
- }
- cont=0x00;
- if((!input(pin_a1))||(!input(pin_a2))){goto salir ;}
- }
- if((!input(pin_a1))||(!input(pin_a2))){goto salir ;}
- }
- salir:
- delay_ms(1);
- }
- void adv_2(){
- for(long R=0;R<1128;R++){
- for(int h=0;h<1;h++){
- for(int t=0;t<=25;t++){
- write_data(filas(t));
- port_D= (tabla[t+R]);
- //port_d=0x00;
- //delay_ms(1);
- }
- if((!input(pin_a1))||(!input(pin_a2))){goto salir ;}
- }
- if((!input(pin_a1))||(!input(pin_a2))){goto salir ;}
- }
- salir:
- delay_ms(1);
- }
- //arrow_right ----------------------------------------------------------------------
- void arrow_left(){
- //int cont=0;
- //char *w;
- int const l_arrow[]={
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x10,0x38,0x7c,0xee,0xc7,0xbb,0x39,0x38,
- 0x38,0x38,0x38,0x38,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
- // 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- } ;
- for(int R=0;R<44;R++){
- for(int z=0;z<25;++z){
- PoRt_D=0x00;
- write_data(filas(z));
- PoRt_D= (l_arrow[z+r]);
- DeLay_us(300);//1500 para Effecto Strobe
- //cont++;
- //if(cont>8){cont=0;}
- }
- if((!input(pin_a1))&&(!input(pin_a2))){stop() ;}
- }
- }
- //arrow_left -------------------------------------------------------------------
- void arrow_right(){
- //int cont=0;
- //char *w;
- int const R_arrow[]={
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x38,0x38,0x38,0x38,0x38,0x39,0xbb,0xc7,
- 0xee,0x7c,0x38,0x10,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
- } ;
- for(int R=44;R>0;R--){
- for(int z=0;z<25;z++){
- PoRt_D=0x00;
- write_data(filas(z));
- PoRt_D= (R_arrow[z+r]);
- DeLay_us(300);//1500 para Effecto Strobe
- //cont++;
- //if(cont>8){cont=0;}
- }
- if((!input(pin_a1))&&(!input(pin_a2))){stop() ;}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement