//by double z
#include
#define FENBIANLV 150
#define CYCLEMUN 10
bit over =1;
unsigned char pianyi=0;
unsigned char cntcyclenum=0;
unsigned char code tab[]={ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, //每行8条的宽度 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, 0x1E,0xDC,0xDE,0xBD,0xDE,0x7D,0xDE,0xBD,0x40,0xC1,0x7F,0xFF,0x7F,0xFF,0x00,0x00, 0x3F,0x7E,0x5F,0xBD,0x6F,0xDB,0x77,0xF7,0x7B,0xEF,0x7D,0xDF,0x7F,0xBF,0xFF,0xFF, // 0xDF,0xFE,0xEF,0xFE,0xD7,0xFE,0x1B,0x00,0xD9,0x7E,0xDA,0x9E,0xFF,0xFF,0xD7,0xD6, 0xDB,0xB6,0xD9,0x76,0x0A,0x00,0xD3,0xF6,0xDB,0xF6,0x1F,0xF0,0xFF,0xFE,0xFF,0xFF, // 0x07,0xFF,0x73,0xFE,0xF9,0xFC,0xFC,0xF9,0xFC,0xF3,0xF9,0xE7,0xF3,0xCF,0xE7,0x9F, 0xE7,0x9F,0xF3,0xCF,0xF9,0xE7,0xFC,0xF3,0xFC,0xF9,0xF9,0xFC,0x73,0xFE,0x07,0xFF, // 0xFF,0xDF,0xFB,0xDF,0xFB,0xDF,0xFB,0xDF,0xFB,0xDF,0xFB,0xDF,0xFB,0xDF,0x03,0xC0, 0xFB,0xDF,0xFB,0xDF,0xFB,0xDF,0xFB,0xDF,0xF9,0xDF,0xFB,0xCF,0xFF,0xDF,0xFF,0xFF,//工 0xFF,0xBF,0xEF,0xBF,0x9F,0xBF,0x7F,0xB8,0xFF,0xBF,0x00,0x80,0xFF,0xBF,0xFF,0xBF, 0xFF,0xBF,0x00,0x80,0xFF,0xBB,0xFF,0xBC,0x3F,0xBF,0xCF,0x9F,0xFF,0xBF,0xFF,0xFF,//业 0xDF,0xFF,0xDF,0xBF,0xDF,0xBF,0xDF,0xDF,0xDF,0xEF,0xDF,0xF3,0x5F,0xFC,0x80,0xFF, 0x5F,0xFE,0xDF,0xF9,0xDF,0xF7,0xDF,0xEF,0xDF,0xDF,0xCF,0x9F,0xDF,0xDF,0xFF,0xFF,//大 0xBF,0xFB,0xCF,0xFB,0xEE,0xFB,0x69,0xFB,0x6F,0xFB,0x6F,0xBB,0x6E,0x7B,0x69,0x81, 0x6F,0xF9,0x6F,0xFA,0x67,0xFB,0xEB,0xFB,0xEC,0xFB,0xAF,0xF9,0xCF,0xFB,0xFF,0xFF,//学 };
void set(void) { EA=1; //全局中断开 EX2=1; //外部中断2打开 IT2=1; //外部中断2边沿触发 }
void delay(unsigned int i) { while(i--); }
void show(unsigned char *add)
{ unsigned char i; unsigned char *addreset; over=0; addreset=add; add+=pianyi*2; for(i=0;i(FENBIANLV*2)) add=addreset; add=add+2; P1=*add; P3=*(add+1); } over=1; }
void main(void) { set(); //P2=P0=0; //可以加背景色 while(1); }
void int2(void) interrupt 6 //外部中断
{ if(over) { show(tab); }
cntcyclenum++; if(cntcyclenum==CYCLEMUN) { pianyi++; cntcyclenum=0; } if(pianyi==FENBIANLV) pianyi=0; } |
|