?? max526.c
字號:
#define uchar unsigned char
#define uint unsigned int
#define ulong unsigned long
#include<reg52.h>
#include"zlg7289.h"
#include"lcd_12864.h"
#include"da_tlv5614.h"
//#include"max526.h"
#include"sin1024.h"
uchar KeyValue=0xff;
void Keybord_7289() interrupt 0
{
uchar Key;
KeyValue=ZLG_7289_Keybord();
Key=(KeyValue%8)*4+3-(KeyValue/8)+1;
Disponechar(0,3,Key|0x30);
}
void main()
{
uchar count=0;
uint i=0;
LCDInit();
LCDClr();
ZLG_7289_Init();
EA=1; //CPU開中斷
EX0=1; //打開INT0中斷
IT0=1; //設定INT0為負跳變觸發
ZLG_7289_Reset();
LcdPrintf(0,0,"testing da");
SCON=0X10; //設定串口工作方式為0方式,波特率為主振頻率/12。
while(1)
{
switch(KeyValue)
{
case 4: { TLV_5614(1,i++); Dispnumber(i,4,10,1); KeyValue=0xff; break; }
default: break;
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -