1、 I 摘 要 80C51 单片机是一款八位单片机,他的易用性和多功能性受到了广大使用者的好 评。这里介绍的是如何用 80C51 单片机来实现长春工业大学的毕业设计,该设计是结 合科研项目而确定的设计类课题。本系统以设计题目的要求为目的,采用 80C51 单片 机为控制核心,利用超声波传感器检测道路上的障碍,控制电动小汽车的自动避障, 快慢速行驶,以及自动停车,并可以自动记录时间、里程和速度,自动寻迹和寻光功 能。整个系统的电路结构简单,可靠性能高。实验测试结果满足要求,本文着重介绍 了该系统的硬件设计方法及测试结果分析。 采用的技术主要有: (1) 通过编程来控制小车的速度; (2) 传感器的
2、有效应用; (3) 新型显示芯片的采用. 关键词关键词 80C51 单片机、光电检测器、PWM 调速、电动小车 II Design and create an intelligence electricity motive small car Abstract 80C51 is a 8 bit single chip computer. Its easily using and multi-function suffer large users. This article introduces the CCUT graduation design with the 80C51 single c
3、hip computer. This design combines with scientific research object. This system regards the request of the topic, adopting 80C51 for controlling core, super sonic sensor for test the hinder. It can run in a high and a low speed or stop automatically. It also can record the time, distance and the spe
4、ed or searching light and mark automatically the electric circuit construction of whole system is simple, the function is dependable. Experiment test result satisfy the request, this text emphasizes introduced the hardware system designs and the result analyze. The adoption of technique as: (1) Redu
5、ce the speed by program the engine; (2) Efficient application of the sensor; (3) The adoption of the new display chip. KeyKeywordswords 80C51 single chip computer, light electricity detector, PWM speed adjusting, Electricity motive small car III 目 录 第一章 前 言 . 1 第二章 方案设计与论证 3 一 直流调速系统 3 二 检测系统 4 三 显示
6、电路 9 四 系统原理图 9 第三章 硬件设计 . 10 一 80C51 单片机硬件结构 10 二 最小应用系统设计 . 11 三 前向通道设计 . 12 四 后向通道设计 . 15 五 显示电路设计 . 17 第四章 软件设计 . 20 一 主程序设计 . 20 二 显示子程序设计 . 24 三 避障子程序设计 . 25 四 软件抗干扰技术 . 26 五 “看门狗”技术 . 28 六 可编程逻辑器件 . 29 第五章 测试数据、测试结果分析及结论 . 30 致 谢 31 参 考 文 献 . 32 附录 A 程序清单 33 附录 B 硬件原理图 41 1 第一章 前 言 随着汽车工业的迅速发展,关于汽车的研究也就越来越受人关注。全国电子大 赛和省内电子大赛几乎每次都有智能小车这方面的题目, 全国各高校也都很重视该题 目的研究。可见其研究意义很大。本设计就是在这样的背景下提出的,指导教师已经 有充分的准备。本题目是结合科研项目而确定的设计类课题。设计的智能电动小车应 该能够实时显示时间、速度、里程,具有自动寻迹、寻光、避障功能,可程控行驶速 度、准确定位停车。 根据题目的要求,确定如下