📄 main.c
字号:
//version 1.0,by liufes@163.com,2004/03/16
//
//established on 2004/03/08
//primary functions are lcd display,which includes hy12864b and ocm4x8c,and matrix keyboard
//with mcu to cpld connect
//with music
//with inner watchdog(atmel at89s52)
//with rs232 connection,work both in binery mode and ascii mode;can select ecc or not
//multy procedure provided
//
//#include <rtx51tny.h>
//#define HY_12864B //无字库 液晶
#define OCM4X8C //有字库液晶
#include "../h/main.h"
void main()
{
#ifdef OCM4X8C
extern void OCM4X8C_initial(void);
extern void DisplayEChar(byte);
extern void DisplayCChar(word);
//extern void DisplayCGRAM(byte);
extern void DisplayNumber(word);
extern void DisplayString(byte *);
extern void IndexShiftRight(void);
extern void IndexShiftLeft(void);
extern void SetStartPoisition(byte,byte);
OCM4X8C_initial();
DisplayString("I am OK!"); //显示字符串
IndexShiftLeft();
SetStartPoisition(2,1); //从第二行第一个字符开始显示
DisplayString("中国人民站起来了") ;//显示字符串;
DisplayEChar('a'); //显示半角字符
DisplayCChar(0xd1d0); //按照内码显示汉字
IndexShiftRight();
DisplayNumber(153); //显示数字
#else
#ifdef HY12864B
STRING[]={0x80,0x81,0x82,0x83,STRING_END};//"山东大学"
extern byte PROMPT_X,PROMPT_Y;//显示的起始坐标
extern void LcdPutChar(byte);
extern void Display(byte *);
extern void DisplayNumber(word);
LcdPutChar(0); //'0'
PROMPT_X=10;PROMPT_y=2; //将当前光标定位于第三行,第十一个像素
LcdPutChar(0x80); //'山'
Display(STRING);
DisplayNumber(153); //显示数字
#endif
#endif
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -