sysinit.h
来自「这是用proteus做的基于51核的一个菜单仿真的程序开发环境keil 没有使用」· C头文件 代码 · 共 46 行
H
46 行
#include <reg51.h>
//#include <lcddrive.h>
#define unchar unsigned char
//--------------------timer0 set-------------------------------
// now the xtal 12.0M
//timer0 model 1 16bit
//-------------------------------------------------------------
SysInit()
{
unchar i;
TMOD|=0x01; // timer0 mode 1
TH0=256-9216/256;
TL0=(65536-9216)%256 ;
EA=1;
ET0=1;
TR0=1;
i=0xff;
while (i>0)
i--;
i=0xff;
while (i>0)
i--;
// lcd init
TxtHomeAdresSet(0,0);
TxtWidthSet(0x20);
CursorShapeSet(0xa2);
DisplayModelOr();
GraphicHomeAdressSet(GRAPHIC_HOME_ADRESS%256, GRAPHIC_HOME_ADRESS/256);
GraphicWidthSet(0x20);
WriteCmd(0x9f);// the switch text dispaly ,graphic display on
TxtAttributeSet(); //set the screen as text attribution
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?