. . . .
4.2.2 键盘扫描子程序...............................................................................................................34
4.2.3 计算键值子程序...............................................................................................................35
4.2.4 键盘调节显示子程序.......................................................................................................36
N..................................................................................................................................................................36
Y..................................................................................................................................................................36
N..................................................................................................................................................................36
N..................................................................................................................................................................37
Y..................................................................................................................................................................37
N..................................................................................................................................................................37
Y Y..............................................................................................................................................................37
N Y..............................................................................................................................................................37
N Y..............................................................................................................................................................37
N Y..............................................................................................................................................................37
N..................................................................................................................................................................37
Y..................................................................................................................................................................37
N..................................................................................................................................................................37
4.2.5 时钟设计与显示...............................................................................................................37
第五章 调试过程与运行结果...................................................................................................................38
5.1 调试过程......................................................................................................................................38
程序设计过程中,键盘扫描部分与显示部分花时间比较长,经常出现按键功能无效、 LCD 显示
不稳定等情况,后来经过不断改进,添加或删除延时程序等,显示基本稳定,时间显示分钟也
基本稳定。最后整体程序编写成功,程序仿真也达到预想效果。...................................................38
(1) 停车场开始运行,显示稳定,绿灯亮,达到预期效果。..............................................................39
(2)时间可调,价格可调,有车进入,车位减一,进行记录。.....................................................39
(3)有车出库,车位加一,进行相应计费,运行正常。..................................................................41
(4)车位为零,绿灯灭,红灯亮,报警器响,运行正常。.............................................................41
5.2 运行结果......................................................................................................................................42
总 结...........................................................................................................................................................42
致................................................................................................................................................................43
参考文献....................................................................................................................................................44
附录一
程序清单................................................................................................................................45
附录二元件明细表............................................................................................................................59
元器件........................................................................................................................................................59
数量............................................................................................................................................................59
备注............................................................................................................................................................59
排阻............................................................................................................................................................59
1..................................................................................................................................................................59
5K................................................................................................................................................................59
按钮............................................................................................................................................................59
5..................................................................................................................................................................59
电阻............................................................................................................................................................59
1..................................................................................................................................................................59
5K................................................................................................................................................................59
独石电容....................................................................................................................................................59
2..................................................................................................................................................................59
30pF............................................................................................................................................................59
电解电容....................................................................................................................................................59
1..................................................................................................................................................................59
10uf 25V.....................................................................................................................................................59
51 单片机实验板.......................................................................................................................................59
1..................................................................................................................................................................59
AT89C51 芯片............................................................................................................................................59
1..................................................................................................................................................................59
3 / 62