#include <reg52.h>
#define int8 unsigned char
#define int16 unsigned int
#define int32 unsigned long
int8 flag;
int8 n;
int8 code table[][14]={
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,
/*-- ??: ? --*/
/*-- Fixedsys12; ??????????:?x?=16x16 --*/
0xBF,0xBF,0xB0,0xB7,0xB7,0xB7,0xB0,0xBF,0xB0,0xB7,0xB7,0xB7,0xB0,0xBF,0xBF,0xFF,
0xFF,0xFF,0x00,0x7F,0x9D,0xFE,0x01,0xFF,0x00,0x7F,0x9D,0xFE,0x01,0xFF,0xFF,0xFF,
/*-- ??: ? --*/
/*-- Fixedsys12; ??????????:?x?=16x16 --*/
0xF7,0xF7,0xF0,0x07,0xF7,0xF0,0xFF,0x80,0xBB,0xBB,0xBB,0xBB,0x80,0xFF,0xFF,0xFF,
0xFD,0xBB,0x57,0xEF,0x97,0x79,0xFD,0x01,0xBD,0xBD,0xBD,0xBD,0x01,0xFD,0xFD,0xFF,
/*-- ??: , --*/
/*-- Fixedsys12; ??????????:?x?=16x16 --*/
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xE5,0xE3,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
/*-- ??: ? --*/
/*-- Fixedsys12; ??????????:?x?=16x16 --*/
0xFE,0xFD,0xF3,0x87,0xF7,0xF7,0xF7,0x00,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xFF,0xFF,
0xFD,0xFD,0xBD,0xBD,0xBD,0xBD,0xBD,0x01,0xBD,0xBD,0xBD,0xBD,0xBD,0xFD,0xFD,0xFF,
/*-- ??: ? --*/
/*-- Fixedsys12; ??????????:?x?=16x16 --*/
0xFF,0xFF,0xFF,0x80,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0x80,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0x00,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0x00,0xFF,0xFF,0xFF,0xFF,
/*-- ??: ? --*/
/*-- Fixedsys12; ??????????:?x?=16x16 --*/
0xFF,0xF8,0xFF,0x00,0xF7,0xFB,0xEF,0xEF,0xEF,0x00,0xEF,0xEF,0xE0,0xFF,0xFF,0xFF,
0x7F,0xFF,0xFF,0x00,0xFF,0x7E,0x7D,0x73,0x4F,0x3F,0x4F,0x73,0x7D,0x7E,0x7E,0xFF,
/*-- ??: ? --*/
/*-- Fixedsys12; ??????????:?x?=16x16 --*/
0xFF,0xFF,0xF8,0xC6,0xDE,0xDE,0xDE,0xD0,0xBE,0xBE,0x3E,0xBE,0xFE,0xFE,0xFF,0xFF,
0xFF,0xFB,0xF7,0xEF,0x9F,0xFD,0xFE,0x01,0xFF,0xFF,0xBF,0xDF,0xEF,0xF3,0xFF,0xFF};
void delay(void);
int16 offset;
void main(void)
{
int8 i;
int8 *p;
flag=0x10;
n=0;
TMOD=0x01;
TH0=0xb1;
TL0=0xe0;
ET0=1;
EA=1;
TR0=1;
p=&table[0][0];
while (1)
{
for (i=0;i<8;i++) //ÏÔê¾×ó°ë±ßÆáÄ»
{
P0=*(p+offset+2*i);
P2=i|0x08; //P2.4=0,P2.3=1 Ñ¡ÖDU2, êä3öé¨ÃèÂë¸øU6
delay();
P0=*(p+offset+2*i+1);
P2=i|0x10; //P2.4=1,P2.3=0 Ñ¡ÖDU3, êä3öé¨ÃèÂë¸øU7
delay();
}
for (i=8;i<16;i++) //ÏÔê¾óò°ë±ßÆáÄ»
{
P0=*(p+offset+2*i);
P2=(i-8)|0x20; //P2.5=1 P2.4=0, P2.3=0 Ñ¡ÖDU4,êä3öé¨ÃèÂëU8
delay();
P0=*(p+offset+2*i+1);
P2=(i-8)|0x40; //P2.6=1 P2.5=0, P2.4=0 Ñ¡ÖDU5,êä3öé¨ÃèÂëU9
delay();
}
}
}
void delay(void)
{
int16 i;
for (i=0;i<50;i++)
;
}
void timer0() interrupt 1 using 3
{
TF0=0;
TH0=0xb1;
TL0=0xe0;
if (n<10)
{
n++;
}
else
{
offset+=2;
if (offset>480)
offset=0;
n=0;
}
|