百度网盘下载地址(960):点击下载
//10HZ-50MHZ
#include <reg52.h>
unsigned long int fre;
unsigned char time;
unsigned int count;
unsigned int count1;
sbit LCD_RS=P1^0; //片选信号
sbit LCD_RW=P1^1; //读写信号
sbit LCD_E=P1^2; //使能信号
#define LCD_DB P0 //数据信号
unsigned char character[10]={0};//在屏幕上显示的字符串
unsigned char characterA[]={"Acquisition Done"};//在屏幕上显示的字符串
unsigned char characterB[]={"Wait a Minute....."};//在屏幕上显示的字符串
unsigned char character_1[]={"FRE= Hz"};
unsigned char FLAG = 0; //是否分频选择标志
void LCD_init(void);//初始化函数
void LCD_write_command(unsigned char command);//写指令函数
void LCD_write_data(unsigned char dat);//写数据函数
void LCD_disp_char(unsigned char x,unsigned char y,unsigned char dat);//在某个屏幕位置上显示一个字符,X(0-15),y(1-2)
void delay_n40us(unsigned int n);//延时函数
void timer_init(); //中断初始化函数
//-----------------------------延时函数---------------------------
void delay_n40us(unsigned int n) //延时函数
{
unsigned int i;
unsigned char j;
for(i=n;i>0;i--)
for(j=0;j<2;j++);
}
void delay_1s()
{
unsigned int i,j;
for(i = 0;i<100;i++)
for(j = 0;j<1000;j++);