#include
#include
#include
#define uchar unsigned char
#define uint unsigned int
#define ysfs 600 //宏界说 预设风速
#define shuiping 1500 //宏界说 水平方位AD转化成果
#define fuyang 1500 //宏界说 俯仰方位AD转化成果
#define PA XBYTE [0x7CFF] //8255芯片端口4个基地址宏界说
#define PB XBYTE [0x7FFD]
#define PC XBYTE [0x7FFE]
#define CONTROL XBYTE [0x7FFF]
sbit OE=P1^0; //以下为关于AD0808与单片机的八个接口界说
sbit EOC=P1^1;
sbit START=P1^2;
sbit CLK=P1^3;
sbit ALE=P1^4;
sbit C0=P1^5;
sbit C1=P1^6;
sbit C2=P1^7;
sbit gdkg=P2^3; //用于复位光电开关端口界说
sbit clock=P2^0; //界说水平俯仰步进电机的速度端口,频率越快,速度越快,不给频率电机不转
sbit cw1=P2^1; //界说水平步进电机的转向端口,1正转,0回转
sbit enable1=P2^2; //界说水平步进电机的使能端口,1转,0不转
sbit cw2=P2^4; //界说俯仰步进电机的转向端口,1正转,0回转
sbit enable2=P2^5; //界说俯仰步进电机的使能端口,1转,0不转
uint ad_result_fenshu,ad_result_shuiping,ad_result_fuyang;
void timer_init()
{
}
void AD_chane(int x)
{
C1=0;
C2=0;
C1=0;
C2=0;
C1=1;
C2=0;
}
int Get_AD_Sd()
{
}
void reset()
{
}
void shuiping_tiaozheng(int date)
{
}
void fuyang_tiaozheng(int date)
{
}
void main()
{
ALE=0;
enable1=0;
enable2=0;
while(1) //进入循环
{
}
}
void timer0() interrupt 1
{
}
void timer1() interrupt 3
{
}
声明:本文内容来自网络转载或用户投稿,文章版权归原作者和原出处所有。文中观点,不代表本站立场。若有侵权请联系本站删除(kf@86ic.com)https://www.86ic.net/qiche/adas/260856.html