Advertisement
Macrovision

Matriz de led de 8x24

Aug 30th, 2018 (edited)
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 42.79 KB | None | 0 0
  1. /*
  2. *********************************************************************
  3.    ** Matriz de LED de 192 pixels de Resolution Firmaware_1.0.
  4.                    ** Autor: El Guajirigallo**
  5.    
  6.         ** https://youtu.be/DfsPXaMLpcE !!!! **
  7. */
  8.              
  9. # include <16F877A.h>
  10. # use Delay(clock=4000000)
  11. # use Fast_io(b)
  12. # use Fast_io(c)
  13. # use fast_io(d)
  14. # fuses XT,NOWDT
  15. # byte PoRt_a = 0x05
  16. # byte PoRt_B = 0x06
  17. # byte PoRt_c = 0x07
  18. # byte PoRt_d = 0x08
  19. #define data_pin  PIN_C5
  20. #define clock_pin PIN_C6
  21. #define latch_pin PIN_C7
  22.  
  23. void f74595_init(){
  24.    output_bit(data_pin,1);
  25.    output_bit(clock_pin,1);
  26.    output_bit(data_pin,0);
  27. }
  28.  
  29. void f74595_clock(){
  30.    output_bit(clock_pin,1);
  31.    output_bit(clock_pin,0);
  32.    output_bit(latch_pin,1);
  33.    output_bit(latch_pin,0);
  34. }
  35.  
  36.  
  37.  // void Send_Data(void);
  38.  // void carry_rows(void);
  39.   void stop(void);
  40.   void Adv_1(void); //FUNTION QUE MUSTRA LOS ANUNCIOS
  41.   void fig(void);
  42.   void adv_2(void);
  43.   //void write_data(unsigned int32 number);
  44.   //int32 filas(int32 ref);
  45.  
  46.  
  47.  
  48.   void write_data(unsigned int number){            //FUNCION PARA ESCRBOR LOS  DIGITOS EN EL DISPLAY
  49.        for(int32 j= 0x2000000;j>0;j=j>>1){
  50.        //for(int32 j= 0x4000000;j>0;j= j>>1){
  51.        if(number & j)                             //and ligico entre j y number para detectar bit a bit 0 o 1 de number
  52.        output_high(data_pin);      
  53.        else
  54.        output_low(data_pin);
  55.        output_high(clock_pin);
  56.        output_low(clock_pin);
  57.     }
  58.        output_high(latch_pin);
  59.        output_low(latch_pin);
  60.      
  61.       //delay_ms(100);
  62.     }
  63.    
  64.     int32 filas(int32 ref){
  65.   switch(ref){
  66.   //case 0: return  0xffffff;  
  67.   case 0: return  0x3fffffe;
  68.   case 1: return  0x3FFFFFD;
  69.   case 2: return  0x3FFFFFb;
  70.   case 3: return  0x3FFFFF7;
  71.   case 4: return  0x3FFFFEF;
  72.   case 5: return  0x3FFFFDF;
  73.   case 6: return  0x3FFFFBF;
  74.   case 7: return  0x3FFFF7F;
  75.   case 8: return  0x3FFFEFF;
  76.   case 9: return  0x3FFFDFF;
  77.   case 10: return 0x3FFFBFF;
  78.   case 11: return 0x3FFF7FF;
  79.   case 12: return 0x3FFEFFF;
  80.   case 13: return 0x3FFDFFF;
  81.   case 14: return 0x3FFBFFF;
  82.   case 15: return 0x3FF7FFF;
  83.   case 16: return 0x3FEFFFF;
  84.   case 17: return 0x3FDFFFF;
  85.   case 18: return 0x3FBFFFF;
  86.   case 19: return 0x3F7FFFF;
  87.   case 20: return 0x3EFFFFF;
  88.   case 21: return 0x3DFFFFF;
  89.   case 22: return 0x3BFFFFF;
  90.   case 23: return 0X37FFFFF;
  91.   case 24: return 0x02FFFFFF;
  92.   case 25: return 0x01FFFFFF;
  93.   }
  94.  }
  95.    
  96.    
  97.  /*
  98.  
  99.  int32 filas(int32 ref){
  100.   switch(ref){
  101.   case 0: return  0x01FFFFFF;
  102.   case 1: return  0x02FFFFFF;
  103.   case 2: return  0X37FFFFF;
  104.   case 3: return  0x3BFFFFF;
  105.   case 4: return  0x3DFFFFF;
  106.   case 5: return  0x3EFFFFF;
  107.   case 6: return  0x3F7FFFF;
  108.   case 7: return  0x3FBFFFF;
  109.   case 8: return  0x3FDFFFF;
  110.   case 9: return  0x3FEFFFF;
  111.   case 10: return 0x3FF7FFF;
  112.   case 11: return 0x3FFBFFF;
  113.   case 12: return 0x3FFDFFF;
  114.   case 13: return 0x3FFEFFF;
  115.   case 14: return 0x3FFF7FF;
  116.   case 15: return 0x3FFFBFF;
  117.   case 16: return 0x3FFFDFF;
  118.   case 17: return 0x3FFFEFF;
  119.   case 18: return 0x3FFFF7F;
  120.   case 19: return 0x3FFFFBF;
  121.   case 20: return 0x3FFFFDF;
  122.   case 21: return 0x3FFFFEF;
  123.   case 22: return 0x3FFFFF7;
  124.   case 23: return 0x3FFFFFb;
  125.   case 24: return 0x3FFFFFD;
  126.   case 25: return 0x3fffffe;
  127.  
  128.   }
  129.  
  130.  }
  131.  */
  132.  int const PWR[]={    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  133.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  134.                       0x00,0x00,0x00,0x00,0x00,0x00,
  135.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  136.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  137.                       0x00,0x00,0x00,0x00,0x00,0x00,
  138.                  
  139.                          0xfe,0xff,0x33,0x33,0xff,0xfe,//A                      
  140.                          0x00,
  141.                          0x6c,0xfe,0x92,0xaa,0x44,0xa0,0x10,//&
  142.                          0x00,
  143.                          0xfe,0xff,0x33,0x33,0xff,0xfe,//A
  144.                          0x00,0x00,0x00,
  145.                          0xff,0xff,0x99,0x99,0x81,//E
  146.                          0x00,
  147.                          0xfe,0xfe,0x80,0x80,0x80,//L
  148.                          0x00,
  149.                          0x78,0xfc,0x94,0x94,0x9c,0x98,//e
  150.                          0x00,
  151.                          0x78,0xfc,0x84,0x84,0x48,//c
  152.                          0x00,
  153.                          0x04,0x7e,0xfe,0x84,0x40,//t
  154.                          0x00,
  155.                          0xf8,0xfc,0x04,0x04,0x08,//r
  156.                          0x00,
  157.                          0xf6,0xf6,//i
  158.                          0x00,
  159.                          0x78,0xfc,0x84,0x84,0x48,//c
  160.                          0x00,//106
  161.                          0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
  162.                          0x00,
  163.                          0xfe,0xfe,0x80,0x80,0x00,//l
  164.                          0x00,
  165.                          0x00,0x00,
  166.                          0x86,0x8f,0x89,0x89,0xf9,0x71,//S
  167.                          0x00,
  168.                          0x78,0xfc,0x84,0xfc,0x78,//o
  169.                          0x00,
  170.                          0xfe,0xfe,0x80,0x80,//l
  171.                          0x00,
  172.                          0x7c,0xfc,0x80,0x80,0x7c,//u150
  173.                          0x00,
  174.                          0x04,0x7e,0xfe,0x84,0x40,//t
  175.                          0x00,
  176.                          0xf6,0xf6,//i
  177.                          0x00,
  178.                          0x78,0xfc,0x84,0xfc,0x78,//o
  179.                          0x00,
  180.                          0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
  181.                          0x00,
  182.                          0x88,0x9c,0x94,0x94,0xf4,0x64,//s
  183.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  184.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  185.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  186.                          0x1c,0x2c,0x40,0x98,0xd6,0xc4,0x00,0x00,   //telefono
  187.                          0x00,0x00,
  188.                          0x42,0xc3,0x89,0x89,0xff,0x76,//205               //3
  189.                          0x00,
  190.                          0x7e,0xff,0x99,0x8d,0xff,0x7e,                    //0
  191.                          0x00,
  192.                          0x4f,0x8d,0x8d,0xfd,0x79,                         //5
  193.                          0x00,0x00,0x18,0x18,0x18,0x00,//gion
  194.                          0x42,0xc3,0x89,0x89,0xff,0x76,                    //3
  195.                          0x00,
  196.                          0x82,0xff,0xff,0x80,                              //1
  197.                          0x00,
  198.                          0x78,0xfc,0x96,0x93,0xf1,0x61,                    //6
  199.                          0x00,0x18,0x18,0x18,0x00,//gion
  200.                          0x7e,0xff,0x99,0x8d,0xff,0x7e,                    //0
  201.                          0x00,
  202.                          0x7e,0xff,0x99,0x8d,0xff,0x7e,                    //0
  203.                          0x00,
  204.                          0x01,0xf1,0xf9,0x0d,0x07,0x03,//7
  205.                          0x00,
  206.                          0xc2,0xe3,0xb1,0x99,0x8f,0x86,//2
  207.                          
  208.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  209.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  210.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  211.                       0xff,0xff,0x06,0x0c,0x0c,0x06,0xff,0xff,//M
  212.                       0x00,
  213.                       0xf6,0xf6,//i
  214.                       0x00,
  215.                       0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
  216.                       0x00,
  217.                       0xf6,0xf6,//i
  218.                       0x00,0x00, 0x00,0x00,
  219.                       0x86,0x8f,0x89,0x89,0xf9,0x71,//S
  220.                       0x00,
  221.                       0xfc,0xfe,0x22,0x3e,0x1c,//p
  222.                       0x00,
  223.                       0xfe,0xfe,0x80,0x80,//l
  224.                       0x00,
  225.                       0xf6,0xf6,//i
  226.                       0x00,
  227.                       0x04,0x7e,0xfe,0x84,0x40,//t
  228.                       0x00,
  229.                       0x00,
  230.                       0x81,0xff,0xff,0x80,//I
  231.                       0x00,
  232.                       0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
  233.                       0x00,
  234.                       0x88,0x9c,0x94,0x94,0xf4,0x64,//s
  235.                       0x00,
  236.                       0x04,0x7e,0xfe,0x84,0x40,//t
  237.                       0x00,
  238.                       0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
  239.                       0x00,
  240.                       0xfe,0xfe,0x80,0x80,//l
  241.                       0x00,
  242.                       0xfe,0xfe,0x80,0x80,//l
  243.                       0x00,
  244.                       0x60,0xf4,0x94,0xfc,0xf8,//a
  245.                       0x00,
  246.                       0x04,0x7e,0xfe,0x84,0x40,//t
  247.                       0x00,
  248.                       0xf6,0xf6,//i
  249.                       0x00,
  250.                       0x78,0xfc,0x84,0xfc,0x78,//o
  251.                       0x00,
  252.                       0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
  253.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  254.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  255.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  256.                       0xff,0xff,0x18,0x18,0x18,0xff,0xff,//H
  257.                       0x00,
  258.                       0x78,0xfc,0x84,0xfc,0x78,//o
  259.                       0x00,
  260.                       0xfc,0xfc,0x18,0x30,0x18,0xfc,0xfc,//m
  261.                       0x00,
  262.                       0x78,0xfc,0x94,0x94,0x9c,0x98,//e
  263.                       0x00,
  264.                       0x00,
  265.                       0xff,0xff,0x11,0x71,0xdf,0x8e,//R
  266.                       0x00,
  267.                       0x78,0xfc,0x94,0x94,0x9c,0x98,//e
  268.                       0x00,
  269.                       0xfe,0xfe,0x40,0x20,0x40,0xfe,//w
  270.                       0x00,
  271.                       0xf6,0xf6,//i
  272.                       0x00,
  273.                       0xf8,0xfc,0x04,0x04,0x08,//r
  274.                       0x00,
  275.                       0xf6,0xf6,//i
  276.                       0x00,
  277.                       0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
  278.                       0x00,
  279.                       0x18,0xbc,0xa4,0xa4,0xfc,0x7c,//g
  280.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  281.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  282.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  283.                      
  284.                      
  285.                       0xff,0xff,0x1e,0x3c,0x78,0xff,0xff,//N
  286.                       0x00,
  287.                       0x78,0xfc,0x94,0x94,0x9c,0x98,//e
  288.                       0x00,
  289.                       0xfe,0xfe,0x40,0x20,0x40,0xfe,//w
  290.                       0x00,0x00,0x00,                    
  291.                       0xff,0xff,0x11,0x11,0x0e,//P
  292.                       0x00,
  293.                       0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
  294.                       0x00,
  295.                       0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
  296.                       0x00,
  297.                       0x78,0xfc,0x94,0x94,0x9c,0x98,//e
  298.                       0x00,
  299.                       0xfe,0xfe,0x80,0x80,//l
  300.                       0x00,0x00,
  301.                       0x81,0xff,0xff,0x80,//I
  302.                       0x00,
  303.                       0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
  304.                       0x00,
  305.                       0x88,0x9c,0x94,0x94,0xf4,0x64,//s
  306.                       0x00,
  307.                       0x04,0x7e,0xfe,0x84,0x40,//t
  308.                       0x00,
  309.                       0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
  310.                       0x00,
  311.                       0xfe,0xfe,0x80,0x80,//l
  312.                       0x00,
  313.                       0xfe,0xfe,0x80,0x80,//l                    
  314.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  315.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  316.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  317.                       0x08,0xcc,0xb4,0x94,0x94,0xb4,0xcc,0x08,//telefono 2
  318.                       0x00,0x00,0x00,0x00,
  319.                       0x44,0x82,0x92,0x92,0x6c,
  320.                       0x00,                                             //3
  321.                       0x7c,0xa2,0x92,0x8a,0x7c,                         //0
  322.                       0x00,
  323.                       0x4e,0x8a,0x8a,0x8a,0x72,                         //5
  324.                       0x00,0x00,0x18,0x18,0x18,0x00,//gion
  325.                       0x44,0x82,0x92,0x92,0x6c,                         //3
  326.                       0x00,
  327.                       0x84,0xfe,0x80,                                   //1
  328.                       0x00,
  329.                       0x78,0x94,0x92,0x92,0x60,                         //6
  330.                       0x00,0x18,0x18,0x18,0x00,//gion
  331.                       0x7c,0xa2,0x92,0x8a,0x7c,
  332.                       0x00,//0
  333.                       0x7c,0xa2,0x92,0x8a,0x7c,                         //0
  334.                       0x00,
  335.                       0x02,0xe2,0x12,0x0a,0x06,                         //7
  336.                       0x00,
  337.                       0xc4,0xa2,0xa2,0x92,0x8c,                         //2
  338.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  339.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  340.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  341.                       0xff,0xff,0x60,0x30,0x30,0x60,0xff,0xff,//w
  342.                       0x00,
  343.                       0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
  344.                       //0x00,
  345.                       0x04,0x7e,0xfe,0x84,0x40,//t
  346.                       0x00,
  347.                       0x78,0xfc,0x94,0x94,0x9c,0x98,//e
  348.                       0x00,
  349.                       0xf8,0xfc,0x04,0x04,0x08,//r
  350.                       0x00,0x00,
  351.                       0xff,0xff,0x18,0x18,0xff,0xff,//H
  352.                       0x00,
  353.                       0x78,0xfc,0x94,0x94,0x9c,0x98,//e
  354.                       0x00,
  355.                       0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
  356.                       0x00,
  357.                       0x04,0x7e,0xfe,0x84,0x40,//t
  358.                       0x00,
  359.                       0x78,0xfc,0x94,0x94,0x9c,0x98,//e
  360.                       0x00,
  361.                       0xf8,0xfc,0x04,0x04,0x08,//r
  362.                       0x00,0x00,
  363.                       0x81,0xff,0xff,0x80,     //I
  364.                       0x00,
  365.                       0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
  366.                       0x00,
  367.                       0x88,0x9c,0x94,0x94,0xf4,0x64,//s
  368.                       0x00,
  369.                       0x04,0x7e,0xfe,0x84,0x40,//t
  370.                       0x00,
  371.                       0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
  372.                       0x00,
  373.                       0xfe,0xfe,0x80,0x80,//l
  374.                       0x00,
  375.                       0xfe,0xfe,0x80,0x80,//l
  376.                      
  377.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  378.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  379.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  380.                       0xff,0xff,0x70,0x38,0x38,0x70,0xff,0xff,//w
  381.                       0x00,
  382.                       0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
  383.                       0x00,
  384.                       0x88,0x9c,0x94,0x94,0xf4,0x64,//s
  385.                       0x00,
  386.                       0xfe,0xfe,0x10,0x10,0xe0,//h
  387.                       0x00,
  388.                       0x78,0xfc,0x94,0x94,0x9c,0x98,//e
  389.                       0x00,
  390.                       0xf8,0xfc,0x04,0x04,0x08,0x00,//r
  391.                       0x00,
  392.                       0x30,0x30,0x30,0x00,//gion
  393.                       0x00,
  394.                       0xff,0xff,0x81,0x81,0x7e,0x3c, //D
  395.                       0x00,
  396.                       0xf8,0xfc,0x04,0x04,0x08,//r
  397.                       0x00,
  398.                       0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
  399.                       0x00,
  400.                       0x0e,0x1e,0xf0,0xf0,0x1e,0x0e,//y
  401.                       0x00,
  402.                       0x78,0xfc,0x94,0x94,0x9c,0x98,//e
  403.                       0x00,
  404.                       0xf8,0xfc,0x04,0x04,0x08,//r
  405.                       0x00,0x00,
  406.                       0x81,0xff,0xff,0x80,//I
  407.                       0x00,
  408.                       0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
  409.                       0x00,
  410.                       0x88,0x9c,0x94,0x94,0xf4,0x64,//s
  411.                       0x00,
  412.                       0x04,0x7e,0xfe,0x84,0x40,//t
  413.                       0x00,
  414.                       0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
  415.                       0x00,
  416.                       0xfe,0xfe,0x80,0x80,//l
  417.                       0x00,
  418.                       0xfe,0xfe,0x80,0x80,//l
  419.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  420.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  421.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  422.                       0x7e,0xff,0x81,0x81,0xc3,0x42,//C
  423.                       0x00,
  424.                       0x78,0xfc,0x94,0x94,0x9c,0x98,//e
  425.                       0x00,
  426.                       0xf6,0xf6,//i
  427.                       0x00,
  428.                       0xfe,0xfe,0x80,0x80,//l
  429.                       0x00,
  430.                       0xf6,0xf6,//i
  431.                       0x00,
  432.                       0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
  433.                       0x00,
  434.                       0x18,0xbc,0xa4,0xa4,0xfc,0x7c,//g
  435.                       0x00,0x00,
  436.                       0xff,0xff,0x13,0x13,0x03,//F
  437.                       0x00,
  438.                       0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
  439.                       0x00,
  440.                       0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
  441.                       0x00,0x00,0x00,
  442.                       0x81,0xff,0xff,0x80,//I
  443.                       0x00,
  444.                       0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
  445.                       0x00,
  446.                       0x88,0x9c,0x94,0x94,0xf4,0x64,//s
  447.                       0x00,
  448.                       0x04,0x7e,0xfe,0x84,0x40,//t
  449.                       0x00,
  450.                       0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
  451.                       0x00,
  452.                       0xfe,0xfe,0x80,0x80,//l
  453.                       0x00,
  454.                       0xfe,0xfe,0x80,0x80,//l
  455.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  456.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  457.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  458.                       0x44,0x82,0x92,0x92,0x6c,
  459.                       0x00,                                                  //3
  460.                       0x7c,0xa2,0x92,0x8a,0x7c,                         //0
  461.                       0x00,
  462.                       0x4e,0x8a,0x8a,0x8a,0x72,                         //5
  463.                       0x00,0x00,0x18,0x18,0x18,0x00,//gion
  464.                       0x44,0x82,0x92,0x92,0x6c,                         //3
  465.                       0x00,
  466.                       0x84,0xfe,0x80,                                  //1
  467.                       0x00,
  468.                       0x78,0x94,0x92,0x92,0x60,                         //6
  469.                       0x00,0x18,0x18,0x18,0x00,//gion
  470.                       0x7c,0xa2,0x92,0x8a,0x7c,
  471.                       0x00,//0
  472.                       0x7c,0xa2,0x92,0x8a,0x7c,                         //0
  473.                       0x00,
  474.                       0x02,0xe2,0x12,0x0a,0x06,                        //7
  475.                       0x00,
  476.                       0xc4,0xa2,0xa2,0x92,0x8c,                         //2
  477.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  478.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  479.                       0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
  480.     };
  481.    
  482.     int const figr[] = {
  483.    
  484.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  485.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  486.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  487.                          0x38,0x5c,0xbe,0xbe,0x94,0x94,0x42,0x3c,
  488.                          0x00,0x00,0x00,0x00,0x00,
  489.                          0x7e,0xff,0xcf,0xf9,0xf9,0xcf,0xff,0x7e,
  490.                          0x00,0x00,0x00,0x00,0x00,
  491.                          0x18,0x3e,0xf8,0xf8,0xf8,0x3e,0x18,0x00,
  492.                          0x00,0x00,0x00,0x00,0x00,
  493.                          0x80,0x68,0x3c,0x1a,0x01,0x00,0x00,0x00,
  494.                          0x00,0x00,
  495.                          0x08,0x08,0x28,0xaf,0x28,0x08,0x08,0x00,
  496.                          0x00,0x00,0x00,0x00,0x00,
  497.                          0x80,0x48,0x18,0x3a,0x7c,0x08,0x12,0x01,
  498.                          0x00,0x00,0x00,0x00,0x00,
  499.                          0xc0,0x9c,0xbe,0xc1,0x01,0xc1,0xbe,0x9c,0xc0,
  500.                          0x00,0x00,0x00,0x00,0x00,
  501.                          0x10,0x10,0x10,0x10,0x38,0x7c,0x7c,0x00,//101
  502.                          0x28,0x28,0x7c,0x7c,0x38,0x10,0x10,0x10,
  503.                          0x00,0x00,0x00,0x00,0x00,
  504.                          0x11,0x04,0x40,0x7e,0xff,0xe3,0x7e,0x40,
  505.                          0x04,0x11,0x00,0x00,0x00,0x00,0x00,
  506.                          0x40,0x5e,0xe1,0xff,0x5e,0x40,0x00,0x14,
  507.                          0x22,0x41,0x00,0x00,0x00,0x00,0x00,
  508.                          0x0c,0x1f,0xfc,0x9f,0x8c,0x80,0xfe,0x02,
  509.                          0x02,0x3e,
  510.                          0x40,0x80,0x40,0x38,0x04,0x02,0x04,0x38,0x40,0x80,0x40,0x38,0x04,0x02,0x04,0x38,//scope1
  511.                          0x40,0x80,0x40,0x38,0x04,0x02,0x04,0x38,0x40,0x80,0x40,0x38,0x04,0x02,0x04,0x38,//scope2
  512.                          0x40,0x80,0x40,0x38,0x04,0x02,0x04,0x38,0x40,0x80,0x40,0x38,0x04,0x02,0x04,0x38,//scope3
  513.                          0x80,0x8c,0x9f,0x7c,0x1f,0x0c,0x00,0x00,
  514.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  515.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  516.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00//112
  517.  };
  518.                
  519.     int const tabla[]={
  520.                          
  521.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  522.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  523.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,                        
  524.                          0xfe,0xff,0x11,0x11,0x11,0xfe,0x00,//A                      
  525.                          0x00,
  526.                          0x6c,0xfe,0x92,0xaa,0x44,0xa0,0x10,//&
  527.                          0x00,0x00,
  528.                          0xfe,0xff,0x11,0x11,0x11,0xfe,0x00,//A
  529.                          0x00,0x00,0x00, 0x00,
  530.                          0xff,0xff,0x99,0x99,0x81,0x00,//E
  531.                          0x00,
  532.                          0xfe,0xfe,0x80,0x80,0x80,0x00,//L
  533.                          0x00,
  534.                          0x78,0xfc,0x94,0x94,0x9c,0x98,0x00,//e
  535.                          0x00,
  536.                          0x78,0xfc,0x84,0x84,0x48,0x00,//c
  537.                          0x00,
  538.                          0x04,0x7e,0xfe,0x84,0x40,0x00,//t
  539.                          0x00,
  540.                          0xf8,0xfc,0x04,0x04,0x08,0x00,//r
  541.                          0x00,
  542.                          0xf6,0xf6,0x00,0x00,//i
  543.                          0x78,0xfc,0x84,0x84,0x48,0x00,//c
  544.                          0x00,//106
  545.                          0x60,0xf4,0x94,0xfc,0xf8,0x80,0x00,//a
  546.                          0x00,
  547.                          0xfe,0xfe,0x80,0x80,0x00,//l
  548.                          0x00,
  549.                          0x00,0x00,0x00,
  550.                          0x86,0x8f,0x89,0x89,0xf9,0x71,0x00,//S
  551.                          0x00,
  552.                          0x78,0xfc,0x84,0xfc,0x78,0x00,//o
  553.                          0x00,
  554.                          0xfe,0xfe,0x80,0x80,0x00,//l
  555.                          0x00,
  556.                          0x7c,0xfc,0x80,0x80,0x7c,0x00,//u150
  557.                          0x00,
  558.                          0x04,0x7e,0xfe,0x84,0x40,0x00,//t
  559.                          0x00,
  560.                          0xf6,0xf6,0x00,0x00,//i
  561.                          0x78,0xfc,0x84,0xfc,0x78,0x00,//o
  562.                          0x00,
  563.                          0xfc,0xfc,0x0c,0x04,0xfc,0xf8,0x00,//n
  564.                          0x00,
  565.                          0x88,0x9c,0x94,0x94,0xf4,0x64,0x00,//s
  566.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  567.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  568.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  569.                          0x1c,0x2c,0x40,0x98,0xd6,0xc4,0x00,0x00,   //telefono
  570.                          0x00,0x00,
  571.                          0x42,0xc3,0x89,0x89,0xff,0x76,0x00,//205               //3
  572.                          0x00,
  573.                          0x7e,0xff,0x99,0x8d,0xff,0x7e,0x00,                    //0
  574.                          0x00,
  575.                          0x4f,0x8d,0x8d,0xfd,0x79,0x00,0x00,                    //5
  576.                          0x00,0x00,0x18,0x18,0x18,0x00,0x00,                    //gion
  577.                          0x42,0xc3,0x89,0x89,0xff,0x76,0x00,                    //3
  578.                          0x00,
  579.                          0x82,0xff,0xff,0x80,0x00,                              //1
  580.                          0x00,
  581.                          0x78,0xfc,0x96,0x93,0xf1,0x61,                         //6
  582.                          0x00,0x00,0x18,0x18,0x18,0x00,0x00,                    //gion
  583.                          0x7e,0xff,0x99,0x8d,0xff,0x7e,0x00,                    //0
  584.                          0x00,
  585.                          0x7e,0xff,0x99,0x8d,0xff,0x7e,0x00,                    //0
  586.                          0x00,
  587.                          0x01,0xf1,0xf9,0x0d,0x07,0x03,0x00,                    //7
  588.                          0x00,
  589.                          0xc2,0xe3,0xb1,0x99,0x8f,0x86,0x00,                    //2
  590.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  591.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  592.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  593.                        //0x04,0x02,0x01,0x02,0x04,0x00,0x00,  //espacio
  594.                        //0x01,0x7f,0xb7,0xcf,0xcf,0xb7,0x7f,0x01, //camara
  595.                        //0x00,0x00,0x00,
  596.                          0x01,0x7f,0xb7,0xcf,0xcf,0xb7,0x7f,0x01, //camara
  597.                          0x00,0x00,0x00,0x00,
  598.                          0x7e,0xff,0x81,0x81,0xc3,0x42,0x00,//C
  599.                          0x00,
  600.                          0x7e,0xff,0x81,0x81,0xc3,0x42,0x00,//C
  601.                          0x00,
  602.                          0x03,0x03,0xff,0xff,0x03,0x03,0x00,//T
  603.                          0x00,
  604.                          0x0f,0x3f,0xf0,0xf0,0x3f,0x0f,0x00,//V
  605.                          0x00,0x00,0x00,
  606.                          0x01,0x7f,0xb7,0xcf,0xcf,0xb7,0x7f,0x01, //camara
  607.                          //0x00,0x00,0x00,
  608.                         // 0x01,0x7f,0xb7,0xcf,0xcf,0xb7,0x7f,0x01, //camara
  609.                        //0x00,0x04,0x02,0x01,0x02,0x04,0x00,//espacio
  610.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  611.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  612.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  613.                      
  614.                          0xf6,0xf1,0xf1,0xf1,0xfe,0xf0,0x00,//candado left
  615.                          0x00,
  616.                          0xfe,0xff,0x13,0x13,0x13,0xfe,0x00,//A
  617.                          0x00,
  618.                          0x78,0xfc,0x84,0x84,0x48,0x00,//c
  619.                          0x00,
  620.                          0x78,0xfc,0x84,0x84,0x48,0x00,//c
  621.                          0x00,
  622.                          0x78,0xfc,0x94,0x94,0x9c,0x98,0x00,//e
  623.                          0x00,
  624.                          0x88,0x9c,0x94,0x94,0xf4,0x64,0x00,//s
  625.                          0x00,
  626.                          0x88,0x9c,0x94,0x94,0xf4,0x64,0x00,//s
  627.                          0x00,0x00,0x00,
  628.                          0x7e,0xff,0x81,0x81,0xc3,0x42,0x00,//C
  629.                          0x00,
  630.                          0x78,0xfc,0x84,0xfc,0x78,0x00,//O
  631.                          0x00,
  632.                          0xfc,0xfc,0x0c,0x04,0xfc,0xf8,0x00,//n
  633.                          0x00,
  634.                          0x04,0x7e,0xfe,0x84,0x40,0x00,//t
  635.                          0x00,
  636.                          0xf8,0xfc,0x04,0x04,0x08,0x00,//r
  637.                          0x00,
  638.                          0x78,0xfc,0x84,0xfc,0x78,0x00,//O
  639.                          0x00,
  640.                          0xfe,0xfe,0x80,0x80,0x00,//l
  641.                          0x00,
  642.                          0xf0,0xfe,0xf1,0xf1,0xf1,0xf6,0x00,//candado right
  643.                          0x00,0x00,0xc0,0xc0,//Dot
  644.                          0x00,0x00,0xc0,0xc0,//Dot
  645.                          0x00,0x00,0xc0,0xc0,//Dot
  646.                          0x00,0x00,0xc0,0xc0,//Dot
  647.                          0x00,0x00,0x00,
  648.                        //0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  649.                        //0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  650.                        //0x00,0x04,0x02,0x01,0x02,0x04,0x00,  //espacio                          
  651.                          0xff,0xff,0x81,0x81,0x7e,0x3c,0x00, //D
  652.                          0x00,
  653.                          0x60,0xf4,0x94,0xfc,0xf8,0x80,0x00,//a
  654.                          0x00,
  655.                          0x04,0x7e,0xfe,0x84,0x40,0x00,//t
  656.                          0x00,
  657.                          0x60,0xf4,0x94,0xfc,0xf8,0x80,0x00,//a
  658.                          0x00,
  659.                          0x00,0x04,0x02,0x01,0x02,0x04,0x00,  //espacio
  660.                          0x00,0x00,
  661.                          0x0f,0x3f,0xf0,0xf0,0x3f,0x0f,0x00,//V
  662.                          0x00,
  663.                          0x78,0xfc,0x84,0xfc,0x78,0x00,//o
  664.                          0x00,
  665.                          0xf6,0xf6,0x00,0x00,//i
  666.                          0x00,
  667.                          0x78,0xfc,0x84,0x84,0x48,0x00,//c
  668.                          0x00,
  669.                          0x78,0xfc,0x94,0x94,0x9c,0x98,0x00,//e
  670.                          0x00,
  671.                          0x00,0x04,0x02,0x01,0x02,0x04,0x00,  //espacio
  672.                          0x00,
  673.                          0x7e,0xff,0x81,0x81,0xc3,0x42,0x00,//C
  674.                          0x00,
  675.                          0x60,0xf4,0x94,0xfc,0xf8,0x80,0x00,//a
  676.                          0x00,
  677.                          0xff,0xff,0x98,0x88,0xf8,0x70,0x00,//b
  678.                          0x00,
  679.                          0xfe,0xfe,0x80,0x80,0x00,//l
  680.                          0x00,
  681.                          0xf6,0xf6,0x00,0x00,//i
  682.                          0x00,
  683.                          0xfc,0xfc,0x0c,0x04,0xfc,0xf8,0x00,//n
  684.                          0x00,
  685.                          0x18,0xbc,0xa4,0xa4,0xfc,0x7c,0x00,//g
  686.                          0x00,0x00,0x00,0x00,
  687.                          0x86,0x8f,0x89,0x89,0xf9,0x71,0x00,//S
  688.                          0x00,
  689.                          0x78,0xfc,0x84,0xfc,0x78,0x00,//o
  690.                          0x00,
  691.                          0xfe,0xfe,0x80,0x80,0x00,//l
  692.                          0x00,
  693.                          0x7c,0xfc,0x80,0x80,0x7c,0x00,//u
  694.                          0x00,
  695.                          0x04,0x7e,0xfe,0x84,0x40,0x00,//t
  696.                          0x00,
  697.                          0xf6,0xf6,0x00,0x00,//i
  698.                          0x00,
  699.                          0x78,0xfc,0x84,0xfc,0x78,0x00,//o
  700.                          0x00,
  701.                          0xfc,0xfc,0x0c,0x04,0xfc,0xf8,0x00,//n
  702.                          0x00,
  703.                          0x88,0x9c,0x94,0x94,0xf4,0x64,0x00,//s
  704.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  705.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  706.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  707.                          0x08,0xcc,0xb4,0x94,0x94,0xb4,0xcc,0x08,//telefono 2
  708.                          0x00,0x00,0x00,0x00,
  709.                          0x42,0xc3,0x89,0x89,0xff,0x76,0x00,                    //3
  710.                          0x00,
  711.                          0x7e,0xff,0x99,0x8d,0xff,0x7e,0x00,                    //0
  712.                          0x00,
  713.                          0x4f,0x8d,0x8d,0xfd,0x79,0x00,0x00,                    //5
  714.                          0x00,0x00,0x18,0x18,0x18,0x00,0x00,//gion
  715.                          0x42,0xc3,0x89,0x89,0xff,0x76,0x00,                    //3
  716.                          0x00,
  717.                          0x82,0xff,0xff,0x80,0x00,                              //1
  718.                          0x00,
  719.                          0x78,0xfc,0x96,0x93,0xf1,0x61,                         //6
  720.                          0x00,0x00,0x18,0x18,0x18,0x00,0x00,//gion
  721.                          0x7e,0xff,0x99,0x8d,0xff,0x7e,0x00,                    //0
  722.                          0x00,
  723.                          0x7e,0xff,0x99,0x8d,0xff,0x7e,0x00,                    //0
  724.                          0x00,
  725.                          0x01,0xf1,0xf9,0x0d,0x07,0x03,0x00,                    //7
  726.                          0x00,
  727.                          0xc2,0xe3,0xb1,0x99,0x8f,0x86,0x00,                    //2
  728.                          0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  729.                          0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  730.                          0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  731.                          0x0f,0x1f,0xf0,0xf0,0x1f,0x0f,//Y
  732.                          0x00,0x00,
  733.                          0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
  734.                          0x00,0x00,
  735.                          //0xf8,0xfc,0x0c,0xf8,0x0c,0x0c,0xf8,//m
  736.                          0xfc,0x08,0x30,0x08,0xfc,
  737.                          0x00,0x00,
  738.                          0x60,0xf4,0x94,0xfc,0xf8,0x80,//a                        
  739.                          0x00,0x00,
  740.                          0xfe,0xfe,0x10,0xf0,0xe0,//h
  741.                          0x00,0x00,
  742.                          0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
  743.                          0x00,0x00,0x00,0x00,
  744.                          0xff,0x02,0x04,0x08,0x04,0x02,0xff,//M
  745.                          0x00,0x00,
  746.                          0x7c,0xfc,0x80,0x80,0x7c,//u
  747.                          0x00,0x00,
  748.                          0x88,0x9c,0x94,0x94,0xf4,0x64,0x00,//s
  749.                          0x00,
  750.                          0xf6,0xf6,0x00,//i
  751.                          0x00,
  752.                          0x78,0xfc,0x84,0x84,0x48,0x00,//c
  753.                          0x00,0x00,0x00,
  754.                          0x7e,0xff,0x81,0x81,0xc3,0x42,0x00,//C
  755.                          0x00,
  756.                          0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
  757.                          0x00,0x00,
  758.                          0x88,0x9c,0x94,0x94,0xf4,0x64,0x00,//s
  759.                          0x00,
  760.                          0x04,0x7e,0xfe,0x84,0x40,0x00,//t
  761.                          0x00,0x00,0x00,0x00,
  762.                          0x81,0xff,0xff,0x80,0x00,//I
  763.                          0x00,
  764.                          0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
  765.                          0x00,0x00,
  766.                          0x88,0x9c,0x94,0x94,0xf4,0x64,//s
  767.                          0x00,0x00,
  768.                          0x04,0x7e,0xfe,0x84,0x40,0x00,//t
  769.                          0x00,
  770.                          0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
  771.                          0x00,0x00,
  772.                          0xfe,0xfe,0x80,0x80,0x00,//l
  773.                          0x00,
  774.                          0xfe,0xfe,0x80,0x80,0x00,//l
  775.                          0x00,0x00,0x00,
  776.                          0x60,0xf4,0x94,0xfc,0xf8,0x80,//a
  777.                          0x00,0x00,
  778.                          0xfc,0xfc,0x0c,0x04,0xfc,0xf8,//n
  779.                          0x00,0x00,
  780.                          0x60,0x90,0x9e,0xfe,0x80,//d
  781.                          0x00,0x00,0x00,0x00,
  782.                          0x86,0x8f,0x89,0x89,0xf9,0x71,0x00,//S
  783.                          0x00,
  784.                          0x78,0xfc,0x94,0x94,0x9c,0x98,0x00,//e
  785.                          0x00,
  786.                          0x04,0x7e,0xfe,0x84,0x40,0x00,//t
  787.                          0x00,
  788.                          0x7c,0xfc,0x80,0x80,0x7c,//u
  789.                          0x00,0x00,
  790.                          0x84,0xfc,0xfc,0x24,0x24,0x18,//p
  791.                          0x00,0x00,0xc0,0xc0,//Dot
  792.                          0x00,0x00,0xc0,0xc0,//Dot
  793.                          0x00,0x00,0xc0,0xc0,//Dot
  794.                          0x00,0x00,0xc0,0xc0,//Dot
  795.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  796.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  797.                          0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
  798.                          
  799.                          
  800.     };
  801.    
  802.      
  803.    
  804.    
  805.    
  806.   void arrow_right(void);//FUNTION QUE MUUEVE LA FLECHA ALA DERECHA
  807.   void arrow_left(void);//FUNTION QUE MUEVE LA FLECHA ALA ISQUIERDA
  808.   //int R_arrow[]={ 0x08,0x14,0x22,0x49,0x08,0x08,0x08,0x08} ;//RIGHT ARROW
  809.   //int l_arrow[]={ 0x08,0x08,0x08,0x08,0x49,0x22,0x14,0x08} ;//LEFT ARROW
  810.   //int Clear_Dir[8]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};// _limpiar_Direccion
  811.  // int direction[8];//ARREGLO DE 8 BYTE PARA USARLO COMO DIREECION EN QUE SE MUEVE LA FLECHA.
  812.  // long v;
  813.    
  814.    
  815.    
  816.    
  817.      long strb=1500;
  818.      int cont=0;
  819.                  
  820.   void main(){  
  821.        
  822.         set_tris_a(0x0f);
  823.         set_tris_b(0x00);
  824.         set_tris_c(0x00);
  825.         set_tris_d(0x00);
  826.         int i=0;
  827.        
  828.        
  829.   while(1){        
  830.              do{
  831.                  adv_1();
  832.                  i++;
  833.                } while(i<1);
  834.   i=0;
  835.  
  836.              do{
  837.                    fig();
  838.                    i++;
  839.                } while(i<1);
  840.   i=0;
  841.  
  842.              do{
  843.                  adv_2();
  844.                  i++;
  845.                } while(i<1);
  846.   do{
  847.          if(!input(pin_a1)&& (!input(pin_a2))){
  848.             Stop();
  849.    }else if(!input(pin_a1)){// && input(pin_a2)){
  850.            arrow_left();
  851.  
  852.    }else if(!input(pin_a2))//&& input(pin_a0))
  853.    {
  854.           arrow_right();
  855.    }
  856.      
  857.  }While((!input(pin_a1))||(!input(pin_a2)));
  858.        
  859. }
  860.    
  861.    
  862.  
  863.      
  864.        
  865. }   //End del main.
  866.  
  867.  void Stop(){
  868.                  char *w;
  869.                  //long strb=1500;
  870.  
  871.  
  872.  char LeTra[]=  {                    
  873.                      0x00,0x46,0x8f,0x89,0xf9,0x72,0x00,//S                
  874.                      0x01,0x01,0xff,0xff,0x01,0x01,0x00,//T              
  875.                      0x3c,0x7e,0x81,0x7e,0x3c,0x00,//O
  876.                      0x81,0xff,0xff,0x91,0x0e//P  
  877.                 };
  878.                
  879.    do{
  880.      
  881.       w=&LeTra[0];
  882.    
  883.          for(int z=0;z<25;++z){
  884.            PoRt_D=0x00;
  885.                 write_data(filas(z));
  886.                   PoRt_D= *(w+z);
  887.                     //write_data(filas(z));
  888.                      DeLay_us(strb);//1500 para Effecto Strobe
  889.                         strb=strb+50;
  890.                         if(strb > 5000) strb=1500;
  891.          }      
  892.                  
  893.       }while(!input(pin_a1) && (!input(pin_a2)));
  894.  }
  895.  
  896.    
  897.    
  898.    void adv_1()  
  899. {
  900.  
  901.  
  902.        for(long R=0;R<1270;R++)
  903.     {
  904.              for(int i=0;i<1;i++){
  905.               for(int t=0;t<=25;t++){
  906.                 port_D=0x00;
  907.                  write_data(filas(t));
  908.                  port_D= (PWR[t+R]);
  909.                  // write_data(filas(t));
  910.                   // port_D= (PWR[t+R]);
  911.                    delay_us(200);
  912.                    //port_D=0x00;
  913.                      
  914.          }
  915.              }
  916.             if((!input(pin_a1))||(!input(pin_a2))){goto salir ;}                        
  917.    }
  918.          salir:
  919.          delay_ms(1);
  920.  }
  921.    
  922.    void fig(){
  923.  
  924. for(int R=0;R<232;R++){
  925.              for(int h=0;h<1;h++){
  926.                for(int t=0;t<=25;t++){
  927.                  write_data(filas(t));
  928.                    port_D= (figr[cont + R]);
  929.                    delay_us(450);
  930.                    cont++;
  931.                    port_D=0x00;
  932.                    
  933.              }
  934.              cont=0x00;
  935.              if((!input(pin_a1))||(!input(pin_a2))){goto salir ;}
  936.          }
  937.          if((!input(pin_a1))||(!input(pin_a2))){goto salir ;}
  938.        }
  939.      salir:
  940.      delay_ms(1);
  941.     }
  942.    
  943.    
  944.    
  945.    
  946.    void adv_2(){
  947.                  
  948. for(long R=0;R<1128;R++){
  949.              for(int h=0;h<1;h++){
  950.               for(int t=0;t<=25;t++){
  951.                 write_data(filas(t));
  952.                   port_D= (tabla[t+R]);
  953.                     //port_d=0x00;
  954.                   //delay_ms(1);
  955.                  
  956.          }
  957.          if((!input(pin_a1))||(!input(pin_a2))){goto salir ;}
  958.        }
  959.        if((!input(pin_a1))||(!input(pin_a2))){goto salir ;}
  960.      
  961.      }
  962.      salir:
  963.      delay_ms(1);
  964.    }
  965.    
  966.    
  967.    //arrow_right ----------------------------------------------------------------------
  968.    void arrow_left(){
  969.               //int cont=0;
  970.               //char *w;
  971.               int const l_arrow[]={
  972.                                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  973.                                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  974.                                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  975.                                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  976.                                0x10,0x38,0x7c,0xee,0xc7,0xbb,0x39,0x38,                            
  977.                                0x38,0x38,0x38,0x38,
  978.                                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  979.                                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  980.                                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  981.                                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
  982.                                // 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  983.                              } ;
  984.            
  985.        
  986.         for(int R=0;R<44;R++){      
  987.       for(int z=0;z<25;++z){      
  988.            PoRt_D=0x00;
  989.                 write_data(filas(z));
  990.                   PoRt_D= (l_arrow[z+r]);                  
  991.                      DeLay_us(300);//1500 para Effecto Strobe
  992.                      //cont++;
  993.                        //if(cont>8){cont=0;}
  994.          }        
  995.             if((!input(pin_a1))&&(!input(pin_a2))){stop() ;}
  996.      }
  997.      
  998.      
  999.    }
  1000.    
  1001.    
  1002.    
  1003.  //arrow_left -------------------------------------------------------------------
  1004.   void arrow_right(){
  1005.               //int cont=0;
  1006.               //char *w;
  1007.               int const R_arrow[]={
  1008.                                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  1009.                                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  1010.                                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  1011.                                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  1012.                                0x38,0x38,0x38,0x38,0x38,0x39,0xbb,0xc7,
  1013.                                0xee,0x7c,0x38,0x10,0x00,0x00,0x00,0x00,
  1014.                                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  1015.                                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  1016.                                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
  1017.                                
  1018.                              } ;
  1019.            
  1020.        
  1021.         for(int R=44;R>0;R--){      
  1022.       for(int z=0;z<25;z++){      
  1023.            PoRt_D=0x00;
  1024.                 write_data(filas(z));
  1025.                   PoRt_D= (R_arrow[z+r]);                  
  1026.                      DeLay_us(300);//1500 para Effecto Strobe
  1027.                      //cont++;
  1028.                        //if(cont>8){cont=0;}
  1029.          }        
  1030.             if((!input(pin_a1))&&(!input(pin_a2))){stop() ;}
  1031.     }
  1032.      
  1033.      
  1034.    }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement