目录
1 设计任务与要求.....................................................................................................................................1
1.1设计任务.......................................................................................................................................1
1.2设计要求.......................................................................................................................................1
2 设计方案................................................................................................................................................ 1
2.1 设计思路......................................................................................................................................1
2.2 器件介绍与作用..........................................................................................................................1
2.2.1 STC89C52RC简介........................................................................................................... 1
2.2.2 STC89C52RC参数........................................................................................................... 3
2.2.3 STC89C52RC特性........................................................................................................... 3
2.2.4 STC89C52RC单片机的P2口介绍...................................................................................4
2.2.5 LED灯介绍....................................................................................................................... 5
3 硬件电路设计.........................................................................................................................................6
3.1 原理图..........................................................................................................................................6
3.2 LED被点亮的原理...................................................................................................................... 7
4 软件设计................................................................................................................................................ 8
4.1设计流程.......................................................................................................................................8
4.2 源程序........................................................................................................................................17
5 调试过程.............................................................................................................................................. 18
5.1实物连接图.................................................................................................................................18
5.2调试.............................................................................................................................................19
5.3出现的问题.................................................................................................................................19
6 总结...................................................................................................................................................... 20
7 附录 MSC-51系列单片机指令表........................................................................................................21
参考文献................................................................................................................................................. 26
1 / 30