16X16点阵74HC595作列驱动C源程序.docx
《16X16点阵74HC595作列驱动C源程序.docx》由会员分享,可在线阅读,更多相关《16X16点阵74HC595作列驱动C源程序.docx(17页珍藏版)》请在冰豆网上搜索。
16X16点阵74HC595作列驱动C源程序
#include
sbitSET=P3^5;
sbitADD=P3^6;
sbitSUB=P3^7;
sbitLOCK=P3^2;
sbitDAT=P3^0;
sbitCLK=P3^1;
unsignedcharcnt,cnt2,line,*p,*old;
charspeed;
bitsec,key_mark;
unsignedcharcodeMatrix001[32]=
{
/*------------------------------------------------------------------------------
;源文件/文字:
临
;宽×高(像素):
16×16
------------------------------------------------------------------------------*/
0x08,0x80,0x08,0x80,0x08,0x80,0x49,0xFE,0x49,0x40,0x4A,0x20,0x4C,0x20,0x48,0x00,
0x49,0xFC,0x49,0x24,0x49,0x24,0x49,0x24,0x49,0x24,0x09,0xFC,0x09,0x04,0x08,0x00
};
unsignedcharcodeMatrix002[32]=
{
/*------------------------------------------------------------------------------
;源文件/文字:
沂
;宽×高(像素):
16×16
------------------------------------------------------------------------------*/
0x00,0x08,0x20,0x3C,0x13,0xC0,0x12,0x00,0x82,0x00,0x42,0x00,0x43,0xFE,0x12,0x10,
0x12,0x10,0x22,0x10,0xE2,0x10,0x22,0x10,0x22,0x10,0x24,0x10,0x24,0x10,0x08,0x10
};
unsignedcharcodeMatrix003[32]=
{
/*------------------------------------------------------------------------------
;源文件/文字:
大
;宽×高(像素):
16×16
------------------------------------------------------------------------------*/
0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xFF,0xFE,0x01,0x00,0x01,0x00,
0x02,0x80,0x02,0x80,0x04,0x40,0x04,0x40,0x08,0x20,0x10,0x10,0x20,0x08,0xC0,0x06
};
unsignedcharcodeMatrix004[32]=
{
/*------------------------------------------------------------------------------
;源文件/文字:
学
;宽×高(像素):
16×16
------------------------------------------------------------------------------*/
0x22,0x08,0x11,0x08,0x11,0x10,0x00,0x20,0x7F,0xFE,0x40,0x02,0x80,0x04,0x1F,0xE0,
0x00,0x40,0x01,0x80,0xFF,0xFE,0x01,0x00,0x01,0x00,0x01,0x00,0x05,0x00,0x02,0x00
};
unsignedcharcodeMatrix005[32]=
{
/*------------------------------------------------------------------------------
;源文件/文字:
信
;宽×高(像素):
16×16
------------------------------------------------------------------------------*/
0x08,0x40,0x08,0x20,0x0B,0xFE,0x10,0x00,0x10,0x00,0x31,0xFC,0x30,0x00,0x50,0x00,
0x91,0xFC,0x10,0x00,0x10,0x00,0x11,0xFC,0x11,0x04,0x11,0x04,0x11,0xFC,0x11,0x04
};
unsignedcharcodeMatrix006[32]=
{
/*------------------------------------------------------------------------------
;源文件/文字:
息
;宽×高(像素):
16×16
------------------------------------------------------------------------------*/
0x01,0x00,0x02,0x00,0x1F,0xF0,0x10,0x10,0x1F,0xF0,0x10,0x10,0x1F,0xF0,0x10,0x10,
0x1F,0xF0,0x10,0x10,0x01,0x00,0x08,0x84,0x48,0x92,0x48,0x12,0x87,0xF0,0x00,0x00
};
unsignedcharcodeMatrix007[32]=
{
/*------------------------------------------------------------------------------
;源文件/文字:
学
;宽×高(像素):
16×16
------------------------------------------------------------------------------*/
0x22,0x08,0x11,0x08,0x11,0x10,0x00,0x20,0x7F,0xFE,0x40,0x02,0x80,0x04,0x1F,0xE0,
0x00,0x40,0x01,0x80,0xFF,0xFE,0x01,0x00,0x01,0x00,0x01,0x00,0x05,0x00,0x02,0x00
};
unsignedcharcodeMatrix008[32]=
{
/*------------------------------------------------------------------------------
;源文件/文字:
院
;宽×高(像素):
16×16
------------------------------------------------------------------------------*/
0x00,0x40,0x78,0x20,0x4B,0xFE,0x52,0x02,0x54,0x04,0x61,0xF8,0x50,0x00,0x48,0x00,
0x4B,0xFE,0x48,0x90,0x68,0x90,0x50,0x90,0x41,0x12,0x41,0x12,0x42,0x0E,0x44,0x00
};
unsignedcharcodeMatrix009[32]=
{
/*------------------------------------------------------------------------------
;源文件/文字:
0
;宽×高(像素):
16×16
------------------------------------------------------------------------------*/
0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xF0,0x1C,0x38,0x38,0x1C,0x38,0x1C,0x78,0x1E,
0x78,0x1E,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x1C,0x38,0x07,0xE0,0x00,0x00,0x00,0x00
};
unsignedcharcodeMatrix010[32]=
{
0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xC0,0x0F,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,
0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x1F,0xF8,0x00,0x00,0x00,0x00
};//1
unsignedcharcodeMatrix011[32]=
{
0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xF0,0x18,0x18,0x38,0x1C,0x38,0x1C,0x00,0x38,
0x00,0x70,0x01,0xC0,0x07,0x00,0x0C,0x04,0x3F,0xFC,0x3F,0xFC,0x00,0x00,0x00,0x00
};//2
unsignedcharcodeMatrix012[32]=
{
0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xF0,0x38,0x38,0x38,0x18,0x00,0x38,0x03,0xF0,
0x03,0xF0,0x00,0x18,0x00,0x1C,0x38,0x1C,0x38,0x18,0x1F,0xF0,0x00,0x00,0x00,0x00
};//3
unsignedcharcodeMatrix013[32]=
{
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0xF0,0x01,0xF0,0x02,0x70,0x0C,0x70,
0x18,0x70,0x30,0x70,0x3F,0xFE,0x00,0x70,0x00,0x70,0x03,0xFE,0x00,0x00,0x00,0x00
};//4
unsignedcharcodeMatrix014[32]=
{
0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xFC,0x18,0x00,0x18,0x00,0x18,0xC0,0x1F,0xF8,
0x18,0x1C,0x00,0x1C,0x10,0x1C,0x38,0x1C,0x38,0x18,0x0F,0xF0,0x00,0x00,0x00,0x00
};//5
unsignedcharcodeMatrix015[32]=
{
0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xF8,0x0C,0x38,0x18,0x10,0x38,0x00,0x3F,0xF8,
0x7C,0x1C,0x78,0x0C,0x38,0x0E,0x38,0x0C,0x1C,0x18,0x0F,0xF0,0x00,0x00,0x00,0x00
};//6
unsignedcharcodeMatrix016[32]=
{
0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xFE,0x38,0x0C,0x30,0x10,0x00,0x30,0x00,0x60,
0x00,0xC0,0x01,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x00,0x00,0x00,0x00
};//7
unsignedcharcodeMatrix017[32]=
{
0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xF0,0x38,0x1C,0x30,0x0C,0x3C,0x1C,0x1F,0xF0,
0x0F,0xF0,0x38,0x78,0x70,0x1C,0x70,0x0C,0x38,0x18,0x0F,0xF0,0x00,0x00,0x00,0x00
};//8
unsignedcharcodeMatrix018[32]=
{
0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xF0,0x38,0x18,0x30,0x1C,0x70,0x1C,0x70,0x1C,
0x38,0x3C,0x1F,0xDC,0x00,0x1C,0x18,0x38,0x3C,0x70,0x1F,0xE0,0x00,0x00,0x00,0x00
};//9
unsignedcharcodeMatrix019[32]=
{
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
};//kongge
unsignedcharcodeMatrix020[32]=
{
0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xF0,0x18,0x18,0x38,0x1C,0x38,0x1C,0x00,0x38,
0x00,0x70,0x01,0xC0,0x07,0x00,0x0C,0x04,0x3F,0xFC,0x3F,0xFC,0x00,0x00,0x00,0x00
};//2
unsignedcharcodeMatrix021[32]=
{
0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xF0,0x1C,0x38,0x38,0x1C,0x38,0x1C,0x78,0x1E,
0x78,0x1E,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x1C,0x38,0x07,0xE0,0x00,0x00,0x00,0x00
};//0
unsignedcharcodeMatrix022[32]=
{
0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xC0,0x0F,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,
0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x1F,0xF8,0x00,0x00,0x00,0x00
};//1
unsignedcharcodeMatrix023[32]=
{
0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xC0,0x0F,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,
0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x1F,0xF8,0x00,0x00,0x00,0x00
};//1
unsignedcharcodeMatrix024[32]=
{
0x10,0x00,0x10,0x00,0x1F,0xFC,0x20,0x80,0x20,0x80,0x40,0x80,0x1F,0xF8,0x10,0x80,
0x10,0x80,0x10,0x80,0xFF,0xFE,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80
};//年
unsignedcharcodeMatrix025[32]=
{
0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xF0,0x38,0x1C,0x30,0x0C,0x3C,0x1C,0x1F,0xF0,
0x0F,0xF0,0x38,0x78,0x70,0x1C,0x70,0x0C,0x38,0x18,0x0F,0xF0,0x00,0x00,0x00,0x00
};//8
unsignedcharcodeMatrix026[32]=
{
0x00,0x00,0x1F,0xF8,0x10,0x08,0x10,0x08,0x10,0x08,0x1F,0xF8,0x10,0x08,0x10,0x08,
0x10,0x08,0x1F,0xF8,0x10,0x08,0x10,0x08,0x20,0x08,0x20,0x08,0x40,0x28,0x80,0x10
};//月
unsignedcharcodeMatrix027[32]=
{
0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xC0,0x0F,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,
0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x1F,0xF8,0x00,0x00,0x00,0x00
};//1
unsignedcharcodeMatrix028[32]=
{
0x00,0x00,0x1F,0xF0,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x1F,0xF0,
0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x1F,0xF0,0x10,0x10
};//日
unsignedcharcodeMatrix029[32]=
{
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
};//kongge
unsignedcharcodeMatrix030[32]=
{
0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xF0,0x1C,0x38,0x38,0x1C,0x38,0x1C,0x78,0x1E,
0x78,0x1E,0x38,0x1C,0x38,0x1C,0x38,0x1C,0x1C,0x38,0x07,0xE0,0x00,0x00,0x00,0x00
};//0
unsignedcharcodeMatrix031[32]=
{
0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xF0,0x38,0x18,0x30,0x1C,0x70,0x1C,0x70,0x1C,
0x38,0x3C,0x1F,0xDC,0x00,0x1C,0x18,0x38,0x3C,0x70,0x1F,0xE0,0x00,0x00,0x00,0x00
};//9
unsignedcharcodeMatrix032[32]=
{
0x10,0x00,0x13,0xFC,0x20,0x84,0x20,0x88,0x48,0x88,0xF8,0x90,0x10,0x9C,0x20,0x84,
0x41,0x44,0xF9,0x44,0x41,0x28,0x01,0x28,0x1A,0x10,0xE2,0x28,0x44,0x44,0x01,0x82
};//级
unsignedcharcodeMatrix033[32]=
{
0x01,0x00,0x01,0x00,0x01,0x00,0x3F,0xF8,0x21,0x08,0x21,0x08,0x21,0x08,0x3F,0xF8,
0x21,0x08,0x21,0x08,0x21,0x08,0x3F,0xF8,0x21,0x0A,0x01,0x02,0x01,0x02,0x00,0xFE
};//电
unsignedcharcodeMatrix034[32]=
{
0x00,0x00,0x7F,0xF8,0x00,0x10,0x00,0x20,0x00,0x40,0x01,0x80,0x01,0x00,0xFF,0xFE,
0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x05,0x00,0x02,0x00
};//子
unsignedcharcodeMatrix035[32]=
{
0x08,0x40,0x08,0x20,0x0B,0xFE,0x10,0x00,0x10,0x00,0x31,0xFC,0x30,0x00,0x50,0x00,
0x91,0xFC,0x10,0x00,0x10,0x00,0x11,0xFC,0x11,0x04,0x11,0x04,0x11,0xFC,0x11,0x04
};//x信
unsignedcharcodeMatrix036[32]=
{
0x01,0x00,0x02,0x00,0x1F,0xF0,0x10,0x10,0x1F,0xF0,0x10,0x10,0x1F,0xF0,0x10,0x10,
0x1F,0xF0,0x10,0x10,0x01,0x00,0x08,0x84,0x48,0x92,0x48,0x12,0x87,0xF0,0x00,0x00
};//息
unsignedcharcodeMatrix037[32]=
{
0x00,0x00,0x00,0x00,0x7F,0xFC,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,
0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0xFF,0xFE,0x00,0x00,0x00,0x00
};//工
unsignedcharcodeMatrix038[32]=
{
0x08,0x00,0x1D,0xFC,0xF1,0x04,0x11,0x04,0x11,0x04,0xFD,0xFC,0x10,0x00,0x30,0x00,
0x39,0xFE,0x54,0x20,0x54,0x20,0x91,0xFC,0x10,0x20,0x10,0x20,0x13,0xFE,0x10,0x00
};//程
unsignedcharcodeend;
voidSendData(unsignedchar*q)
{
unsignedchari,t;