公交车语音报站系统毕业设计___(1)

更新时间:2024-05-06 12:03:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

毕 业 设 计 [论 文] 题 目:学 院:专 业:姓 名:学 号:指导老师:完成时间: 基于单片机的公交自动报站器设计 电气与信息工程学院 自动化 刘小洁 092410102 宁蕴緋 2014年5月23日

河南城建学院本科毕业设计(论文) 摘要

摘 要

随着国民经济的快速发展,我国城市人口高度集中并大幅增长、交通需求不断扩大导致城市道路交通拥挤,乘坐公交车出行是解决我国城市交通发展问题和实践低碳环保绿色出行的有效途径。随着近年来城市公交事业迅速发展,之前靠售票员报站的方式已经不能满足实际需要,而公共汽车的报站直接影响到服务的质量。

本设计介绍了基于单片机的公交车语音报站系统的设计,对系统软件设计和硬件实现进行了详细的描述,主要是以STC89C52单片机为核心控制元件,WT588D语音芯片为录音模块,以液晶屏为显示模块,以独立按键K1、K2为输入设备,扬声器为语音输出设备,设计一个带语音报站和液晶显示功能的公交车报站系统。

关键词: 公交报站 单片机 语音提示 液晶屏

I

河南城建学院本科毕业设计(论文)

Abstract

Abstract

With the take-off of the national economy, China's urban population is remarkably exploding. The increasing demand for transports gives rise to traffic congestion in urban areas. Therefore, public bus system is not only an efficient way to solve the problem of traffic congestion but a way to put the “Low-Carbon Transportation” into of date. The recent development of public transportation requires a phonetic system which can automatically announce bus stations.And the automatic stop announcer directly affects the service bus station reporting quality.

This paper introduces the automatic stop announcer based on STC89C52 and aims to explicitly describe the software and hardware applied in the system. The main features of the system are that STC89C52 is used for core controlling components, WT588D pronunciation chip for recording, LCD12864 screen for video displays, independent key K1 and K2 for input device, loudspeaker for output device. This is designed for a stop announcement and display system for buses.

Key words: Bus stop announcer Microcontroller Voice prompt LCD screen

II

河南城建学院本科毕业设计(论文) 目录

目录

摘 要 ............................................................. I ABSTRACT .......................................................... II 1 绪 论 .......................................................... 1 1.1 课题研究的背景 ............................................... 1 1.2 课题研究的意义 ............................................... 1 1.3 课题研究的主要内容 ........................................... 2 2 系统总体设计方案 ................................................ 3 2.1 功能要求 ..................................................... 3 2.2 设计思路 ..................................................... 3 2.3 方案选择 ..................................................... 3

2.3.1 显示模块选择方案 ......................................... 3 2.3.2 按键选择方案 ............................................. 5 2.3.3 芯片选择方案 ............................................. 5 2.4 总体设计框图 ................................................. 6 3 系统硬件设计 .................................................... 8 3.1 概述 ......................................................... 8 3.2 主控模块 ..................................................... 8

3.2.1 STC89C52芯片的简介 ...................................... 8 3.2.2 主控模块电路原理图 ...................................... 11 3.3 语音芯片模块 ................................................ 11 3.3.1 WT588D芯片简介 ......................................... 11 3.3.2 语音芯片模块电路原理图 .................................. 13 3.4 LCD液晶显示模块 ............................................ 13 3.4.1 组成结构 ................................................ 14 3.4.2 引脚功能 ................................................ 14 3.5 按键控制模块 ................................................. 15 3.5.1 按键控制模块电路原理图 .................................... 15 4 系统软件设计 ................................................... 17 4.1 系统的主流程图 .............................................. 17 4.2 显示模块设计 ................................................ 18 4.3 键盘扫描模块设计 ............................................ 18 5 系统分析与调试 ................................................. 19 6 结论与展望 ..................................................... 20 致 谢 ............................................................ 21 参考文献 .......................................................... 22 附录A 实物照片 ................................................... 23

III

河南城建学院本科毕业设计(论文) 目录

附录B 硬件原理图 ................................................ 24 附录C 程序 ...................................................... 25

IV

河南城建学院本科毕业设计(论文) 附录C 程序

附录C 程序

/********************独立按键程序*****************/ uchar key_can; //按键值

void key() //独立按键程序

{ static uchar key_new;

key_can = 20; //按键值还原 P1 |= 0x03;

if((P1 & 0x03) != 0x03) //按键按下

{ delay_1ms(1); //按键消抖动 if(((P1 & 0x03) != 0x03) && (key_new == 1)) {

按下 key_new = 0; switch(P1 & 0x03) { case 0x02: key_can = 2; break; 值 case 0x01: key_can = 1; break;

值 } }

}

else //按键松开

key_new = 1;

}

/***************主函数*****************/ void main() {

25

//确认是按键

//得到按键 //得到按键

河南城建学院本科毕业设计(论文) 附录C 程序

uchar num;

P0 = P1 = P2 = P3 = 0XFF; init_12864(); init_12864_dis();

Send_threelines(0); //语音播报 while(1) {

key(); //独立按键程序 if(key_can < 20) {

if(key_can == 1) { }

if(key_can == 2) { }

if(num == 1) //报第1个站 { }

if(num == 2) //报第2个站 {

write_string(1,0,\ 66路公交车 \ write_string(2,0,\ 蓝湾新城小区 \ write_string(3,0,\ (朱砂洞) \

26

if(num < 10) { }

num++;

if(num != 0)

num--;

write_string(1,0,\ 66路公交车 \ write_string(2,0,\ 南洛高速路口 \ write_string(3,0,\ (建设路) \ Send_threelines(1,0); //语音播报

河南城建学院本科毕业设计(论文) 附录C 程序

}

Send_threelines(2,0); //语音播报

if(num == 3) //报第3个站 { }

if(num == 4) //报第4个站 { }

if(num == 5) //报第5个站 { }

if(num == 6) //报第6个站 {

write_string(1,0,\ 66路公交车 \ write_string(2,0,\ 祥顺路口 \ write_string(3,0,\ \ Send_threelines(6,0); //语音播报 write_string(1,0,\ 66路公交车 \ write_string(2,0,\ 国土资源局 \ write_string(3,0,\ \ Send_threelines(5,0); //语音播报 write_string(1,0,\ 66路公交车 \ write_string(2,0,\ 教育局 \ write_string(3,0,\ \ Send_threelines(4,0); //语音播报 write_string(1,0,\ 66路公交车 \ write_string(2,0,\ 建设大厦 \ write_string(3,0,\ \ Send_threelines(3,0); //语音播报

27

河南城建学院本科毕业设计(论文) 附录C 程序

}

}

if(num == 7) //报第7个站 { }

if(num == 8) //报第8个站 { }

if(num == 9) //报第9个站 { }

if(num == 10) //报第10个站 { }

write_string(1,0,\ 66路公交车 \ write_string(2,0,\ 平顶山市卫校 \ write_string(3,0,\ \ Send_threelines(0x10,0); //语音播报 write_string(1,0,\ 66路公交车 \ write_string(2,0,\ 崇文路口 \ write_string(3,0,\ \ Send_threelines(9,0); //语音播报 write_string(1,0,\ 66路公交车 \ write_string(2,0,\ 湖光花园小区 \ write_string(3,0,\ \ Send_threelines(8,0); //语音播报 write_string(1,0,\ 66路公交车 \ write_string(2,0,\ 市政大厦北门 \ write_string(3,0,\ (祥云公园) \ Send_threelines(7,0); //语音播报

28

河南城建学院本科毕业设计(论文) 附录C 程序

29

河南城建学院本科毕业设计(论文) 附录D PCB

附录D PCB

30

本文来源:https://www.bwwdw.com/article/nctg.html

Top