单片机学习板的设计 - 图文 联系客服

发布时间 : 星期日 文章单片机学习板的设计 - 图文更新完毕开始阅读054391fd534de518964bcf84b9d528ea81c72fe8

摘 要

在现在这个电子芯片高速发展的年代,学生们熟练掌握单片机工作原理及其各模块的功能具有时代的意义。随着经济的发展和人们观念的日趋改变,人们越来越享受高智能自动化的生活。而在我们的日常生活中,单片机凭借着它简洁的操作、低廉的价格和广泛的用途占据着重要的地位。所以,单片机给了我们想要的生活。本论文详细介绍了该开发板的开发过程及相关硬件结构和软件设计。开发板以STC89C52单片机为核心控制器,板上资源主要包括数据采集处理模块、实时时钟模块、通信模块、液晶显示模块、USB转串口模块、8*8点阵模块等。针对各个硬件模块开发了相应的软件模块,包括各个控制驱动程序、A/D程序,串口通信程序、液晶显示程序,流水灯驱动程序等。开发板可以作为主控制模块安装于控制系统中执行控制任务,也可以用作实验板,完成单片机各类通用实验,操作简单,控制结果可见,性价比高,可以应用于高校、科研院所的实验室等场合,具有一定的实用价值和现实意义。设计的基于STC80C52单片机的开发板,该开发板具有成本低、体积小、可靠性高、功能齐全、低功耗设计、操作方便等特点。

关键词:芯片;开发板;单片机;液晶

Abstract

In the era of rapid development of modern electronic chip modules,students master the functions of the parts of MCU have the necessity of the times. With the development of our economy and the change of our view, people are want to enjoy a wonderful life ,which full of intelligence and automation. In our daily life, The MCU plays a more and more important role form many field for its easily operation,widely being used and inexpensive.So MCU being the product giving our life we like. This paper introduces the development process of the development board and related hardware and software design. Development board using STC89C52 as core controller, resources on-board include data acquisition and processing module, real time clock module, communication module, LCD module and stepper motor interface module USB-to-serial module, 8*8 lattice module. Design software module corresponding to each hardware module, including the driver and control programs, A/D programs, serial communication programs, liquid crystal display programs,water camp diver and so on. Development board can be used as the main control module installed in the control system to perform control tasks, also can be used as experimental board, complete all kinds of universal experiments of MCU, operated simply, control results can be seen,high cost performance, can be applied to universities, research institutes, laboratories and so on, has some practical value and practical significance. Design a development board based on STC89C51 MCU,the board has characteristics of low cost, small size, high reliability, full-featured, low-power design and easy to operate.

Key words: Chip modules;Development board;MCU;LCD

目 录

1 绪 论 ................................................... 1

1.1单片机的发展历程 ................................................... 1 1.2 单片机现在的应用状况 .............................................. 1 1.3制作单片机开发板的目的和意义 ....................................... 2 1.4 课题研究的内容 .................................................... 3

2 硬件电路设计 ............................................ 4

2.1硬件电路设计图框 ....................................................................................................... 4 2.2 C51单片机主控制模块 ............................................................................................ 6 2.3矩阵键盘模块 ............................................................................................................... 7 2.4 A/D电路模块 ............................................................................................................... 8 2.5 通信模块 .................................................................................................................... 11

2.5.1串口通信模块 ................................................ 11 2.5.2 USB转串口模块 .............................................. 12 2.6 实时时钟模块 ............................................................................................................ 13 2.7 显示模块 ................................................................................................................... 14

2.7.1 1602接口模块 ............................................... 14 2.7.2 12864接口模块 .............................................. 15 2.7.3 数码管显示模块 .............................................. 16 2.7.4 8*8点阵模块 ................................................ 18 2.7.5 流水灯模块 .................................................. 18 2.8 电源供电模块 ............................................................................................................ 19 2.9 其他模块 .................................................................................................................... 20

2.9.1 继电器模块 .................................................. 20 2.9.2 I2C总线 .................................................... 21 2.9.3 红外接收和发送以及蜂鸣器模块 ................................ 21 2.9.4 温度传感器和扩展接口模块 .................................... 23

3 PCB的制作 .............................................. 24

3.1 PCB制作流程图 ........................................................................................................ 24 3.2 电器法则检验和设置元器件封装名 ........................................................................ 25 3.3 生成网络表 ................................................................................................................ 25 3.4元器件的封装以及自制自己的封装库文件 ............................................................. 26 3.5 导入网络表 ................................................................................................................ 26 3.6 元器件的排列 ............................................................................................................ 27 3.7 布线 ............................................................................................................................ 28

4 软件调试 ............................................... 31

4.1 实时时钟显示模块 .................................................................................................... 31

4.1.1 DS1302的寄存器 ............................................. 32 4.1.2 DS1302时钟程序流程图 ....................................... 32 4.2 串口通信模块 ............................................................................................................ 33 4.3 流水灯模块 ................................................................................................................ 34

结论 ..................................................... 36 致谢 ..................................................... 37 参考文献 ................................................. 38 附 录 ................................................... 39