基于单片机的多级菜单实现方法改进  被引量:9

Improved method of multilevel menu realization based on SCM

在线阅读下载全文

作  者:宋晓辉[1] 叶桦[1] 丁昊[1] 

机构地区:[1]东南大学自动化学院,南京210096

出  处:《东南大学学报(自然科学版)》2007年第A01期66-70,共5页Journal of Southeast University:Natural Science Edition

摘  要:介绍了一种在C语言环境下,基于单片机的多级菜单实现方法.该方法从菜单的功能结构出发,在程序设计中做了几点改进.首先对菜单数据项和功能函数各自进行独立设计,通过在数据结构中增加按键有效标志、字符串指针、存储器地址以及与复用相关的元素,实现了两者源代码空间的有效分离,从而大大提高了程序的可维护性;其次引入菜单项复用的思想,简化了程序结构.该设计的多级菜单在自动售货机的服务模式的实际应用表明,此改进方法使菜单设计变得更为简单方便,软件通用性更高,维护更容易.A new method of designing multilevel menus applied in single-chip micro computer (SCM) systems by C language is introduced. Taking function structure of menu as a starting point, the method made several improvements in software design. Firstly, menu data items and menu function were designed separately. Eefficient breakaway between their codes space was implemented by increasing key-pressed sign, string pointer, memory address and elements correlative with reuse, and thus the maintainability of software was enhanced greatly; Secondly, the introduction of menu data items' reuse made the software structure simple. A practical application of the designed menu to service mode of the vending machine indicates that the design of multilevel menus by this method is much simpler and easier, with higher interconvertibility and maintainability.

关 键 词:单片机 C语言 多级菜单 函数指针 

分 类 号:TP273[自动化与计算机技术—检测技术与自动化装置]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象