#include <reg51.h>
#include <intrins.h>
#include <stdio.h>
#include <absacc.h>
#include <math.h>
#define uchar unsigned char /*宏定义*/
#define uint unsigned int
sbit G1=P3^7;
sbit RSRCLK=P3^3;
sbit dats_hong=P3^0;
sbit dats_lv=P3^1;
sbit RSSCLK=P3^2;
bit flag;
uchar *p;
unsigned char code Bmp[]={
0x42,0x00,0x44,0x7E,0x44,0x02,0xF0,0x03,0x41,0x02,0x4A,0x7E,0x4A,0x12,0xC4,0x12,
0x64,0x12,0x54,0x12,0x43,0x12,0x42,0x12,0x42,0x11,0x42,0x11,0xD2,0x10,0x22,0x10,/*"浙",0*/
0x04,0x00,0x08,0x00,0xC8,0x3F,0x00,0x02,0x11,0x02,0x12,0x02,0x0A,0x02,0x08,0x02,
0x08,0x02,0x04,0x02,0x07,0x02,0x04,0x02,0x04,0x02,0xF4,0x7F,0x04,0x00,0x00,0x00,/*"江",1*/
0x10,0x00,0xD0,0x7F,0x12,0x04,0x12,0x04,0xD2,0x7F,0x52,0x44,0x52,0x44,0x52,0x44,
0x52,0x44,0x4A,0x44,0x4A,0x54,0x48,0x24,0x04,0x04,0x02,0x04,0x01,0x04,0x00,0x04,/*"师",2*/
0x20,0x04,0x20,0x04,0xFF,0x7F,0x20,0x06,0x02,0x00,0x8C,0x1F,0x89,0x10,0x86,0x10,
0x92,0x10,0x90,0x1C,0x88,0x08,0x87,0x00,0x84,0x20,0x84,0x20,0x04,0x3F,0x04,0x00,/*"范",3*/
0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xFF,0x7F,0x80,0x00,0x40,0x01,
0x40,0x01,0x40,0x02,0x20,0x02,0x20,0x04,0x10,0x08,0x08,0x18,0x04,0x70,0x02,0x20,/*"大",4*/
0x80,0x10,0x08,0x31,0x30,0x13,0x10,0x09,0xFE,0x7F,0x02,0x20,0xF1,0x17,0x00,0x02,
0x00,0x01,0xFE,0x7F,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x40,0x01,0x80,0x00,/*"学",5*/
0x80,0x00,0x80,0x00,0x80,0x00,0xFC,0x1F,0x84,0x10,0x84,0x10,0xFC,0x1F,0x84,0x10,
0x84,0x10,0x84,0x10,0xFC,0x1F,0x84,0x10,0x80,0x40,0x80,0x40,0x00,0x7F,0x00,0x00,/*"电",6*/
0x00,0x00,0xFC,0x0F,0x00,0x04,0x00,0x02,0x00,0x01,0x80,0x00,0x80,0x00,0x80,0x20,
0xFF,0x7F,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xA0,0x00,0x40,0x00,/*"子",7*/
0x10,0x01,0x30,0x06,0x18,0x02,0xE8,0x7F,0x0C,0x00,0xCC,0x1F,0x0A,0x00,0xC9,0x1F,
0x08,0x00,0xC8,0x1F,0x48,0x10,0x48,0x10,0x48,0x10,0xC8,0x1F,0x48,0x10,0x00,0x00,/*"信",8*/
0x80,0x00,0x40,0x00,0xF8,0x0F,0x08,0x08,0xF8,0x0F,0x08,0x08,0xF8,0x0F,0x08,0x08,
0xF8,0x0F,0x00,0x00,0x90,0x00,0x14,0x21,0x14,0x49,0x16,0x48,0xE0,0x0F,0x00,0x00,/*"息",9*/
0x00,0x00,0xFC,0x3F,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,
0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xFF,0x7F,0x00,0x00,0x00,0x00,/*"工",10*/
0xB0,0x1F,0x8E,0x10,0x88,0x10,0x88,0x10,0xBF,0x10,0x88,0x1F,0x0C,0x00,0xDC,0x3F,
0x2A,0x02,0x0A,0x02,0xC9,0x3F,0x08,0x02,0x08,0x02,0x08,0x02,0xE8,0x7F,0x08,0x00,/*"程",11*/
0x80,0x00,0x80,0x00,0xFC,0x1F,0x40,0x00,0x40,0x00,0xFF,0x7F,0x20,0x00,0x10,0x04,
0xF0,0x0F,0x00,0x04,0x00,0x02,0x40,0x01,0x80,0x00,0x00,0x01,0x00,0x02,0x00,0x00,/*"专",12*/
0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x22,0x22,0x62,0x24,0x32,0x24,0x12,0x28,0x0A,
0x38,0x0A,0x28,0x06,0x20,0x02,0x20,0x02,0x20,0x22,0xFF,0x7F,0x00,0x00,0x00,0x00,/*"业",13*/
0x80,0x00,0x80,0x00,0xFE,0x3F,0xC0,0x01,0xA0,0x02,0x90,0x0C,0x8C,0x70,0xFB,0x27,
0x00,0x01,0x80,0x00,0xFE,0x7F,0x80,0x00,0x80,0x00,0x80,0x00,0xA0,0x00,0x40,0x00,/*"李",14*/
0x10,0x20,0x10,0x20,0x28,0x24,0x48,0x24,0x84,0x24,0xFE,0x25,0x01,0x24,0x88,0x24,
0x92,0x25,0xA4,0x24,0xA8,0x24,0x48,0x24,0xE0,0x21,0x1E,0x20,0x00,0x28,0x00,0x10,/*"剑",15*/
};
unsigned char code Bmp1[]={
0x80,0x00,0x80,0x01,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x40,0x01,0x40,0x01,
0x20,0x01,0x20,0x02,0x10,0x06,0x10,0x0C,0x08,0x18,0x04,0x70,0x02,0x20,0x00,0x00,//"人",0
0x40,0x00,0x80,0x00,0x80,0x00,0xFF,0x7F,0x10,0x04,0x10,0x04,0x10,0x04,0x20,0x02,
0x20,0x02,0x40,0x01,0x80,0x00,0x40,0x01,0x20,0x06,0x18,0x78,0x07,0x10,0x00,0x00,//"文",1
0x40,0x00,0xFC,0x1F,0x84,0x10,0x94,0x14,0xA4,0x12,0xFC,0x1F,0xC4,0x11,0xA4,0x16,
0x94,0x14,0x80,0x00,0xFE,0x7F,0x40,0x01,0x20,0x02,0x10,0x0C,0x0C,0x70,0x03,0x20,//"奥",2
0x02,0x00,0xC4,0x3F,0x0C,0x00,0x04,0x00,0x00,0x00,0xE0,0x7F,0x07,0x01,0x84,0x04,
0x84,0x08,0x44,0x10,0x24,0x3E,0xF4,0x33,0x04,0x10,0x1A,0x00,0xE1,0x7F,0x00,0x00,//"运",3
0x60,0x10,0x1E,0x11,0x10,0x12,0x10,0x12,0x7F,0x10,0x18,0x11,0x38,0x12,0x54,0x12,//
0x14,0x70,0x12,0x1E,0xD1,0x11,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,//"科",4
0x08,0x04,0x08,0x04,0x08,0x04,0xBF,0x7F,0x08,0x04,0x28,0x04,0x98,0x3F,0x8C,0x10,//
0x0B,0x11,0x08,0x09,0x08,0x06,0x08,0x06,0x08,0x09,0x88,0x70,0x6A,0x20,0x04,0x00,//"技",5
0x40,0x00,0xFC,0x1F,0x84,0x10,0x94,0x14,0xA4,0x12,0xFC,0x1F,0xC4,0x11,0xA4,0x16,//
0x94,0x14,0x80,0x00,0xFE,0x7F,0x40,0x01,0x20,0x02,0x10,0x0C,0x0C,0x70,0x03,0x20,//"奥",6
0x02,0x00,0xC4,0x3F,0x0C,0x00,0x04,0x00,0x00,0x00,0xE0,0x7F,0x07,0x01,0x84,0x04,//
0x84,0x08,0x44,0x10,0x24,0x3E,0xF4,0x33,0x04,0x10,0x1A,0x00,0xE1,0x7F,0x00,0x00,//"运",7
0x04,0x00,0xCC,0x1F,0x04,0x10,0x84,0x1F,0x12,0x10,0xFF,0x7F,0x08,0x02,0x44,0x12,//
0x82,0x0A,0x0F,0x07,0x80,0x0A,0x40,0x72,0x2C,0x22,0x03,0x02,0x80,0x02,0x00,0x01,//"绿",8
0x20,0x00,0x20,0x00,0xE0,0x0F,0x10,0x04,0x08,0x02,0xFC,0x0F,0x8A,0x08,0x88,0x08,//
0x88,0x08,0xF8,0x0F,0x08,0x00,0x08,0x20,0x08,0x20,0x08,0x20,0xF0,0x3F,0x00,0x00,//"色",9
0x40,0x00,0xFC,0x1F,0x84,0x10,0x94,0x14,0xA4,0x12,0xFC,0x1F,0xC4,0x11,0xA4,0x16,//
0x94,0x14,0x80,0x00,0xFE,0x7F,0x40,0x01,0x20,0x02,0x10,0x0C,0x0C,0x70,0x03,0x20,//"奥",10
0x02,0x00,0xC4,0x3F,0x0C,0x00,0x04,0x00,0x00,0x00,0xE0,0x7F,0x07,0x01,0x84,0x04,//
0x84,0x08,0x44,0x10,0x24,0x3E,0xF4,0x33,0x04,0x10,0x1A,0x00,0xE1,0x7F,0x00,0x00,//"运",11
};
void delay(uint t)
{
uint i;
for(i=0;i<t;i++);
}
/********发送数据****************** */
void byte(uchar temp)
{ uchar i;
for(i=0;i<8;i++)
{
dats_hong=1;
dats_lv=1;
if(temp&0x01)
{
if(flag)
{
dats_hong=0;
}
else
{ dats_lv=0; }
}
RSSCLK=0;
temp=temp>>1;
RSSCLK=1;
}
}
void disp(void)
{
uchar i,j,k,m,l,temp;
for(temp=0;temp<4;temp++)
{
for(k=0;k<8;k++)
{
for(m=0;m<10;m++)
{
for(j=0;j<16;j++)
{
flag=!flag;
for(i=0;i<8;i++)
{
//temp=0;
// k=0;
l=(*(p+i*32+j*2+temp*32)>>k)|(*(p+32*i+j*2+temp*32+1)<<(8-k));
byte(l);
l=(*(p+i*32+j*2+temp*32+1)>>k)|(*(p+32*i+j*2+temp*32+32)<<(8-k));
byte(l);
/*if(j>=0&&j<8)
{
flag=1;
}
else
{
flag=0;
} */
}
G1=1;
RSRCLK=0;
_nop_();
_nop_();
_nop_();
_nop_();
_nop_();
_nop_();
_nop_();
_nop_();
P0=j;
RSRCLK=1;
G1=0;
}
}
}
for(k=0;k<8;k++)
{
for(m=0;m<10;m++)
{
for(j=0;j<16;j++)
{
flag=!flag;
for(i=0;i<8;i++)
{
// temp=0;
// k=0;
l=(*(p+i*32+j*2+temp*32+1)>>k)|(*(p+32*i+j*2+temp*32+32)<<(8-k));
byte(l);
l=(*(p+i*32+j*2+temp*32+32)>>k)|(*(p+32*i+j*2+temp*32+32+1)<<(8-k));
byte(l);
/*if(j>=0&&j<8)
{
flag=1;
}
else
{
flag=0;
} */
}
G1=1;
RSRCLK=0;
_nop_();
_nop_();
_nop_();
_nop_();
_nop_();
_nop_();
_nop_();
_nop_();
P0=j;
RSRCLK=1;
G1=0;
}
}
}
}
}
void main(void)
{
flag=0;
p=Bmp1;
while(1)
{
disp();
delay(1000);
}
}