⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.h

📁 12864显示屏C源程序单片机为AVRD单片机
💻 H
字号:




#define CSPACE      0x2f
#define Byte unsigned char
#define Word unsigned int
//#define CSB PC3
//#define CSA PC4
//#define DI PB0
//#define RW PB1
//#define ENABLE PB2
#define Set_CSA() PORTC|=0x08;//12;//0x0c
#define Clr_CSA() PORTC&=~0x08;
#define Set_CSB() PORTC|=0x10;//10100
#define Clr_CSB() PORTC&=~0x10;
#define Set_DI()  PORTB|=1;
#define Clr_DI()  PORTB&=~1;
#define Set_RW()  PORTB|=2;
#define Clr_RW()  PORTB&=~2;
#define Set_ENABLE()  PORTB|=4;
#define Clr_ENABLE()  PORTB&=~4;

signed char posi;
const Byte prostr[4]={1,2,3,4};
//const Word in[6]={0,44,48,52,56,60}??????
//volatile Byte  flg;//volatile不允许编译优化在涉及中断里的变量时要用
Byte  flg;
Byte  flg1;
Byte  flg2;
Byte  fl;
Byte  a;
Byte  b;
Byte  c;
Byte  d;

Word a1;
Word b1;
Word c1;
Word d1;



void setscr(Byte wdat);
void write_scr(Byte lr,Byte cd,Byte dat);
void initscr();
void showstr(Byte type,Byte page,Byte column,Byte ch);
void shownum(Byte row,Byte col,Byte len,Byte value);
void show();

void init();//初始化
void roll();//滚动
void Static_state();//静态显示
void  value1();//反显1,在44处反显
void  value2();//反显2
void  value3();//反显3,在48处反显
void  value4();//反显4,在52处反显
void Button();//检测有无按键
void Initial_value();//初始值
void Butt();//检测有无按键1



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -