没有合适的资源?快使用搜索试试~ 我知道了~
基于单片机的微型PLC的研究毕业设计.doc
0 下载量 109 浏览量
2023-07-09
11:15:16
上传
评论
收藏 1.78MB DOC 举报
温馨提示
试读
48页
基于单片机的微型PLC的研究毕业设计.doc
资源推荐
资源详情
资源评论
本科毕业设计(论文)
基于单片机的微型 PLC 的研究
攀枝花学院本科毕业设计(论文) 摘 要
I
摘 要
可编程逻辑控制器(PLC),是一种为工业控制特别设计的专用计算机。
因为它易于设计和编程,运行可预估,甚至在恶劣的环境下还可以保持正常
的工作,所以广泛运用于工业控制。
本课题在分析主流 PLC 的体系结构、工作原理的基础上,设计了一个基
于单片机的微型 PLC,目的是在小型控制系统中能够代替小型 PLC,实现更加
灵活的应用方案并在保证可靠性的基础上大大降低成本。
本课题设计的系统在硬件设计上参照 PLC 的体系结构,在单片机的基础
上扩展了丰富的外围设备,实现了 PLC 的大部分功能模块,包括中央处理器
(CPU)、电源模块、振荡电路、复位电路、数字量 I/O、串口通信等,并设
计了专门的输入输出点处理电路,使系统具有良好的抗干扰特性和驱动能力。
软件设计上分为实验部分和实际运用部分。实验部分是用 C 语言与汇编语言
编写的,测试了 PLC 控制板的可行性。实际运用部分为了使编程简单通过 GX
Developer 编程软件编写梯形图,再通过 PMW-HEX 转换软件将其转换为单片
机语言,再通过 STC_ISP 软件将其下载到基于 STC90C52 单片机的微型 PLC 控
制板上。
基于单片机的微型 PLC 的设计,提供了更灵活的软、硬件方案,并大大
降低了控制系统的成本,具有较高的实用价值。
关键词 微型 PLC,单片机,GX Developer,PMW-HEX,STC90C52
攀枝花学院本科毕业设计(论文) ABSTRACT
II
ABSTRACT
Programmable logic controller (PLC), is a special-purpose computer for
industrial control design.Because it is easy to design and programming, running
can be estimated, even in the worst of circumstances can also maintain normal
working, so widely used in industrial control.
Analysis of this issue in the mainstream of PLC system structure, working
principle and on the basis of common instructions, design based on single-chip
micro-PLC, is aimed at small to replace small PLC in the control system, for more
flexible application on the basis of the programme and in ensuring the reliability
of significantly reducing costs.
This topics design of system in hardware design Shang reference PLC of
system structure, in single tablets machine of Foundation Shang extended has rich
of perimeter device, implementation has PLC of most function module, including
central processing unit (CPU), and power module, and oscillation circuit, and
reset circuit, and digital volume I/O, and serial communications,, and design has
specifically of entered output points processing circuit, makes system has good of
anti-interference characteristics and drive ability.Micro-PLC based on single-chip
design, providing a more flexible software and hardware solutions, and
dramatically reduce the cost of control system, has a high practical
value.Experimental part and the practical application of software design is divided
into sections.Experimental section is written in c and assembler, test the feasibility
of the PLC control panel.Practical application of part to make programming
simpler by GX Developer software writing ladder, then PWM-HEX language
conversion software to convert it to a single-chip, then through the STC_ISP
software to download it to a STC90C52 based on a single-chip micro-PLC control
panels.
Key words micro-PLC, singlechip,GX Developer,PWM-HEX , STC89C52
攀枝花学院本科毕业设计(论文) 目录
1
目 录
摘 要..............................................................................................................................I
ABSTRACT .......................................................................................................................II
1 绪论 ............................................................................................................................3
1.1 课题的背景 ............................................................................................................3
1.2 课题研究的意义 .....................................................................................................3
1.3 课题研究的内容 .....................................................................................................4
1.4 本章小结................................................................................................................4
2 系统硬件设计 ............................................................................................................5
2.1 硬件设计总述.........................................................................................................5
2.2 单片机最小系统 .....................................................................................................6
2.2.1 振荡电路.........................................................................................................7
2.2.2 复位电路.........................................................................................................7
2.3 电源设计................................................................................................................8
2.4 输入电路................................................................................................................9
2.5 输出电路..............................................................................................................11
2.6 串口通信电路.......................................................................................................13
3 实验软件设计..........................................................................................................................15
3.1 系统程序结构......................................................................................................................15
3.2 系统主程序..........................................................................................................................16
3.3 初始化程序..........................................................................................................................17
3.4 输入程序..............................................................................................................................18
3.5 输出程序..............................................................................................................................20
3.6 定时器程序..........................................................................................................................21
3.6.1 定时器的定义..............................................................................................................22
3.6.2 定时中断服务程序......................................................................................................22
3.6.3 定时器逻辑指令程序..................................................................................................26
3.6.4 定时器初始化..............................................................................................................29
3.7 计数程序 ............................................................................................................................29
3.7.1 计数器的定义.............................................................................................................29
3.7.2 计数器程序的实现.....................................................................................................30
攀枝花学院本科毕业设计(论文) 目录
2
3.7.3 计数器初始化.............................................................................................................32
3.8 例子实验 ............................................................................................................................32
4 实际运用软件..........................................................................................................................35
4.1 实际运用软件的总述..........................................................................................................35
4.2 GX Developer 软件 ............................................................................................................35
4.3 PMW-HEX 转换软件 ..............................................................................................................37
4.4 STC_ISP 通信软件的下载 ..................................................................................................39
4.5 实例......................................................................................................................................40
总结.................................................................................................................................................41
参考文献 .......................................................................................................................................42
附录 A:系统原理图..................................................................................................................43
附录 B:实物图...........................................................................................................................44
致 谢 ..............................................................................................................................................45
剩余47页未读,继续阅读
资源评论
matlab大师
- 粉丝: 2442
- 资源: 9万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功