視頻教程:https://www.bilibili.com/video/BV1rR4y177NK
#include "reg52.h" //此文件中定義了單片機的一些特殊功能寄存器
#define uchar unsigned char
#define uint unsigned int
typedef unsigned int u16; //對數(shù)據(jù)類型進行聲明定義
typedef unsigned char u8;
sbit wr=P2^0; //數(shù)據(jù)寫
sbit rd=P2^1; //數(shù)據(jù)讀
sbit ce=P2^2; //片選
sbit cd=P2^3; //指令數(shù)據(jù)通道,1指令,0數(shù)據(jù)
sbit rst=P2^4; //復位信號
uchar code HZ0[][32]={
{0x02,0x00,0x02,0x00,0x02,0x00,0x03,0xFC,0x02,0x00,0x02,0x00,0x3F,0xF0,0x20,0x10,
0x20,0x10,0x20,0x10,0x3F,0xF0,0x00,0x00,0x24,0x88,0x22,0x44,0x42,0x44,0x80,0x04},/*"點",0*/
{0x00,0x80,0x00,0x80,0xFC,0x80,0x04,0xFC,0x05,0x04,0x49,0x08,0x2A,0x40,0x14,0x40,
0x10,0x40,0x28,0xA0,0x24,0xA0,0x45,0x10,0x81,0x10,0x02,0x08,0x04,0x04,0x08,0x02},/*"歡",0*/
{0x00,0x00,0x20,0x80,0x13,0x3C,0x12,0x24,0x02,0x24,0x02,0x24,0xF2,0x24,0x12,0x24,
0x12,0x24,0x12,0xB4,0x13,0x28,0x12,0x20,0x10,0x20,0x28,0x20,0x47,0xFE,0x00,0x00},/*"迎",1*/
{0x10,0x40,0x10,0x40,0x1F,0xFE,0x20,0x40,0x20,0x40,0x67,0xFC,0x64,0x44,0xA4,0x44,
0x27,0xFC,0x20,0x40,0x22,0x40,0x21,0x40,0x20,0x80,0x21,0x40,0x22,0x30,0x2C,0x0E},/*"使",2*/
{0x00,0x00,0x3F,0xF8,0x21,0x08,0x21,0x08,0x21,0x08,0x3F,0xF8,0x21,0x08,0x21,0x08,
0x21,0x08,0x3F,0xF8,0x21,0x08,0x21,0x08,0x21,0x08,0x41,0x08,0x41,0x28,0x80,0x10},/*"用",3*/
};
uchar code SZ[][16]={
{0x00,0x00,0x00,0x18,0x24,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x24,0x18,0x00,0x00},/*"0",0*/
{0x00,0x00,0x00,0x08,0x38,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x3E,0x00,0x00},/*"1",1*/
{0x00,0x00,0x00,0x3C,0x42,0x42,0x42,0x02,0x04,0x08,0x10,0x20,0x42,0x7E,0x00,0x00},/*"2",2*/
{0x00,0x00,0x00,0x3C,0x42,0x42,0x02,0x04,0x18,0x04,0x02,0x42,0x42,0x3C,0x00,0x00},/*"3",3*/
{0x00,0x00,0x00,0x04,0x0C,0x0C,0x14,0x24,0x24,0x44,0x7F,0x04,0x04,0x1F,0x00,0x00},/*"4",4*/
{0x00,0x00,0x00,0x7E,0x40,0x40,0x40,0x78,0x44,0x02,0x02,0x42,0x44,0x38,0x00,0x00},/*"5",5*/
{0x00,0x00,0x00,0x18,0x24,0x40,0x40,0x5C,0x62,0x42,0x42,0x42,0x22,0x1C,0x00,0x00},/*"6",6*/
{0x00,0x00,0x00,0x7E,0x42,0x04,0x04,0x08,0x08,0x10,0x10,0x10,0x10,0x10,0x00,0x00},/*"7",7*/
{0x00,0x00,0x00,0x3C,0x42,0x42,0x42,0x24,0x18,0x24,0x42,0x42,0x42,0x3C,0x00,0x00},/*"8",8*/
{0x00,0x00,0x00,0x38,0x44,0x42,0x42,0x42,0x46,0x3A,0x02,0x02,0x24,0x18,0x00,0x00},/*"9",9*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",10*/
};
void delay(uint t) //延時函數(shù)
{
uint i,j;
for(i=0;i1;i++);
}
void Delay_xms(uint x)
{
uint i,j;
for(i=0;i
審核編輯:湯梓紅
聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場。文章及其配圖僅供工程師學習之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問題,請聯(lián)系本站處理。
舉報投訴
-
Proteus
+關(guān)注
關(guān)注
79文章
1692瀏覽量
106573 -
點陣
+關(guān)注
關(guān)注
6文章
194瀏覽量
72503 -
LCD12864
+關(guān)注
關(guān)注
7文章
232瀏覽量
44909 -
復位信號
+關(guān)注
關(guān)注
0文章
54瀏覽量
6319
發(fā)布評論請先 登錄
相關(guān)推薦
LABVIEW程序怎么設(shè)置中英文切換
我做了一個程序,上級要求最好能做成中英雙文(不是軟件語言,是寫出來的程序的語言),然后我就像通過控件標簽文本屬性來設(shè)置,做一個中英文的枚舉,英文顯示默認標簽,中文
發(fā)表于 02-29 21:20
使用Proteus仿真LCD12864液晶顯示動畫的程序免費下載
本文檔的主要內(nèi)容詳細介紹的是使用Proteus仿真LCD12864液晶顯示動畫的程序免費下載。
發(fā)表于 09-11 10:32
?91次下載
評論