基于单片机红外测距系统仿真设计-毕设课设

资料下载地址-1037(百度网盘):点击下载

基于单片机红外测距系统仿真设计-毕设课设

#include <reg52.h>
#include <intrins.h> /* 包含NOP空指令函数_nop_ */
#include <stdio.h>
typedef unsigned char	BYTE;
typedef unsigned int	WORD;
typedef bit		BOOL;

#define uchar	unsigned char
#define uint	unsigned int

sbit	eoc	= P3 ^ 0;
sbit	oe	= P3 ^ 1;
sbit	st	= P3 ^ 2;

sbit	motor	= P0 ^ 0;
sbit	alarm	= P0 ^ 1;

sbit clk = P3 ^ 6;

sbit	rs	= P0 ^ 7;
sbit	rw	= P0 ^ 6;
sbit	ep	= P0 ^ 5;

uchar code table[] = "0123456789";


uchar code tab[] = { 0x3F, 0x06, 0x5B, 0x4F, 0x66, 0x6D, 0x7D, 0x07, 0x7F, 0x6F, 0x0, 0x0 }; /* 数码管共阴级显示0~9 */

uint	ad_0809, a1, a2, a3;
uchar	out;
uchar	value = 0;


void delaynms( uint x );


void display();


void ad0809();


void delayms( uint x )
{
	uint i, j;
	for ( i = x; i > 0; i-- )
		for ( j = 110; j > 0; j-- )
			;
}

基于单片机红外测距系统仿真设计-毕设课设

上一篇:基于单片机电子密码锁系统设计-毕设课设资料


下一篇:基于单片机语音地铁站台播报系统仿真设计-毕设资料