///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////
#include
#define uchar unsigned char
#define uint unsigned int
#define Lcd_IO P0
#define Commd 0
#define Data 1
sbit LCDRS=P3^4;
sbit LCDRW=P3^5;
sbit LCDEN=P3^6;
sbit LCDPSB=P3^7;
sbit wei=P2^7;
sbit duan=P2^6;
//一幅公鸡图形数据
uchar code Lcd_num[]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x70,0x00,0x70,0xC0,0x02,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x70,0x00,0x70,0xC0,0x0F,0x03,0x00,0x3F,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0xF8,0x00,0x70,0xC0,0xFF,0x83,0x00,0xC0,0x30,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0xE8,0x03,0xFE,0xC0,0x1C,0x03,0x03,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,
0x01,0xCC,0x00,0x70,0xC0,0x1C,0x33,0x04,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,
0x01,0xC7,0x00,0x76,0xDC,0x1C,0x33,0x08,0x00,0x01,0x00,0x00,0x00,0xE0,0x30,0x00,
0x03,0x87,0x87,0x7F,0xFC,0x1C,0x33,0x18,0x06,0x0C,0xE0,0x00,0x00,0xC0,0x30,0x00,
0x07,0x03,0xF7,0xFF,0xFC,0xFF,0xB3,0x10,0x06,0x1D,0xC0,0x00,0x00,0xC0,0x30,0x00,
0x0C,0x01,0xE7,0xFE,0xDC,0xFF,0xB3,0x20,0x0E,0x3A,0xF0,0x00,0x00,0xC0,0x70,0x00,
0x1F,0xFF,0xE7,0x0E,0xDC,0x1C,0x33,0x20,0x0E,0x31,0xD0,0x00,0x01,0xC0,0x70,0x00,
0x2F,0xFF,0xA3,0x04,0xDC,0x3C,0x33,0x20,0x0E,0x70,0x60,0x00,0x01,0xC0,0x70,0x00,
0x00,0x70,0x03,0xFC,0xDC,0x3E,0x33,0x40,0x0C,0xE0,0x00,0x00,0x01,0xC0,0x60,0x00,
0x00,0x70,0x00,0x18,0xDC,0x3F,0x33,0x40,0x0C,0xC1,0x9F,0xC3,0xD9,0xBC,0x6E,0x1C,
0x00,0x70,0x00,0x70,0xDC,0x3F,0x33,0x40,0x1D,0x81,0x9F,0xE7,0xF9,0xFC,0x6E,0x18,
0x1F,0xFF,0xE0,0xF2,0xDC,0x7F,0x33,0x40,0x1F,0x81,0x98,0xE7,0x39,0x8E,0xE6,0x38,
0x1F,0xFF,0xE0,0x76,0xDC,0x7D,0x33,0x40,0x1F,0x03,0x98,0xEE,0x33,0x8E,0xE6,0x30,
0x08,0x70,0x00,0x7C,0xDC,0x5C,0x33,0x20,0x1F,0x83,0xB8,0xCE,0x33,0x8C,0xE6,0x30,
0x0C,0x71,0x87,0xF8,0xDC,0xDC,0x33,0x20,0x1B,0x83,0x38,0xCE,0x33,0x0C,0xC6,0x60,
0x06,0x71,0x07,0xF1,0xDC,0x9C,0x33,0x20,0x19,0x83,0x38,0xCC,0x33,0x0C,0xC6,0x60,
0x07,0x73,0x07,0x71,0xDD,0x9C,0x03,0x10,0x39,0xC3,0x31,0xCC,0x73,0x1C,0xC6,0xC0,
0x03,0x72,0x00,0x71,0x9C,0x1C,0x03,0x18,0x39,0xC3,0x31,0xCC,0x77,0x1D,0xC6,0xC0,
0x03,0x76,0x00,0x71,0x9C,0x1C,0x03,0x08,0x39,0xC7,0x31,0xDC,0x67,0x1D,0xC7,0x80,
0x02,0x74,0x00,0x73,0x1C,0x1C,0x03,0x04,0x38,0xE7,0x71,0x9C,0xE7,0x39,0x83,0x80,
0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,
0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,
0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x00,0x06,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0xC0,0x00,0x0C,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0xC0,0x00,0x0C,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x80,0x00,0x18,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,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x01,0x00,0x30,0x00,0x05,0x04,0x84,0x00,0x00,0x00,0x01,0x04,0x00,0x14,0x00,
0x00,0x11,0x10,0x08,0x00,0x04,0x82,0x48,0x1F,0xF0,0x00,0x00,0x84,0x00,0x12,0x00,
0x00,0x1F,0xF0,0x04,0x00,0x04,0x0F,0xFE,0x00,0x10,0x00,0x00,0x04,0x00,0x10,0x00,
0x00,0x00,0x40,0x04,0x03,0xFF,0x88,0x02,0x08,0x10,0x00,0x03,0xE7,0x8F,0xFE,0x00,
0x00,0x12,0x40,0x0A,0x00,0x04,0x03,0xF8,0x04,0x10,0x00,0x00,0x04,0x00,0x10,0x00,
0x00,0x3F,0x78,0x0A,0x00,0x04,0x00,0x10,0x02,0x10,0x00,0x02,0x44,0x00,0x10,0x00,
0x00,0x12,0x88,0x0A,0x01,0xF4,0x00,0x20,0x00,0x50,0xFF,0xE1,0x5F,0x87,0xD0,0x00,
0x00,0x12,0x20,0x11,0x00,0x44,0x0F,0xFE,0x01,0x90,0x00,0x01,0x50,0x81,0x10,0x00,
0x00,0x1E,0x20,0x11,0x00,0x42,0x00,0x40,0x06,0x10,0x00,0x00,0x90,0x81,0x08,0x00,
0x00,0x12,0x50,0x20,0x80,0x42,0x80,0x40,0x38,0x10,0x00,0x00,0xD0,0x81,0x0A,0x00,
0x00,0x12,0x50,0x40,0x40,0x79,0x80,0x40,0x00,0x10,0x00,0x03,0x1F,0x81,0xE6,0x00,
0x00,0x1E,0x88,0x80,0x23,0x80,0x81,0xC0,0x00,0xE0,0x00,0x00,0x10,0x8E,0x02,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,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,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x11,0xF0,0x04,0x00,0x40,0x00,0x80,0x13,0xE0,0x51,0x00,0x20,0x00,0x00,
0x00,0x00,0x1C,0x90,0x04,0x00,0x20,0x1F,0xFC,0x12,0x20,0x51,0x07,0xFF,0x00,0x00,
0x00,0x00,0x24,0x91,0x3F,0x87,0xFF,0x11,0x04,0x13,0xE0,0x91,0x01,0x04,0x00,0x00,
0x00,0x00,0x49,0x30,0x84,0x80,0x80,0x0F,0xF8,0x7E,0x20,0xBF,0x80,0x88,0x00,0x00,
0x00,0x00,0x3E,0x00,0x04,0x80,0x80,0x02,0x20,0x13,0xE1,0x91,0x03,0xFE,0x00,0x00,
0x00,0x00,0x2A,0xA0,0x04,0x80,0xFE,0x01,0xC0,0x10,0x00,0x91,0x02,0x52,0x00,0x00,
0x00,0x00,0x3E,0xF0,0x7F,0xC0,0x82,0x1E,0x38,0x1B,0xF0,0x91,0x02,0x8A,0x00,0x00,
0x00,0x00,0x2B,0x20,0x04,0x00,0x82,0x00,0x80,0x70,0x80,0xFF,0xC3,0x76,0x00,0x00,
0x00,0x00,0x3E,0x20,0x8A,0x01,0x02,0x1F,0xFC,0x12,0xE0,0x80,0x02,0x52,0x00,0x00,
0x00,0x00,0x2A,0xF1,0x0A,0x01,0x02,0x02,0xA0,0x12,0x80,0x91,0x02,0x72,0x00,0x00,
0x00,0x00,0x2A,0x20,0x11,0x02,0x02,0x04,0x90,0x12,0x80,0xA0,0x82,0x02,0x00,0x00,
0x00,0x00,0x46,0x20,0x60,0xC4,0x1C,0x18,0x8C,0x35,0xF0,0xC0,0x42,0x06,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
///////////////////////////////////////////////////////////////////////
函数称号:DelayUs
函数功用:让单片机延时10us,即当iNumber=10时,延时为100us
参数介绍:iNumber:界说要延时10us的次数
返回值:
注意事项:无
///////////////////////////////////////////////////////////////////////
void DelayUs(uint iNumber)
{
}
///////////////////////////////////////////////////////////////////////
函数称号:毫秒延时函数
函数功用:完结毫秒级的延时
参数介绍:Delay_MS: 界说需求延时的毫秒的数值
返回值:
注意事项:本试验是在所用晶振为12M的前提下完结的毫秒延时,本函数是经过循环的形
///////////////////////////////////////////////////////////////////////
void DelayMs(uint Delay_MS)
{
}
///////////////////////////////////////////////////////////////////////
函数称号:WriteLCD_CommdData
函数功用:向12864写入一条指令或一个字节的数据
参数介绍:cCommd:挑选是写入指令了仍是数据,当cCommd=1时,为指令,cCommd=0相反
返回值:
注意事项:无
///////////////////////////////////////////////////////////////////////
void WriteLCD_CommdData(uchar cCommd,uchar cData)
{
}
///////////////////////////////////////////////////////////////////////
函数称号:Init_LCD()
函数功用:初始化12864液晶
参数介绍:无
返回值:
注意事项:初始化的详细进程请看12864的数据手册
///////////////////////////////////////////////////////////////////////
void Init_LCD()
{
}
//液晶自界说显现
void Lcd_define(uchar *str)
{
}
//主函数
void main()
{
}