The invention discloses a method for generating menu, the SCM system includes: creating a menu list; receiving menu type production instruction, and generate the corresponding menu in the menu list; according to the type of menu, controls the target device to generate run in the menu list; receiving the menu item to add menu items according to the instructions, and add menu table into target instruction program; the target program under the menu of the menu structure to generate the corresponding menu; the type and operation control menu structure corresponding to compile. By creating a list of menu, set out to generate the menu information they need, the need to generate the menu, the menu table added to the target program, according to the contents of the table menu generation menu structure, and the corresponding compiler generated menu. When the menu item of the menu is modified or transplanted, the position of the part which needs to be modified or transplanted can be accurately and quickly detected according to the menu structure.
【技術實現步驟摘要】
本專利技術涉及單片機系統
,特別是涉及一種用于單片機系統的菜單生成方法。
技術介紹
隨著科學技術的發展,集成電路技術已經被廣泛應用于工業控制領域。為人們的生活和工作提供了極大的便利。在集成電路中,單片機可以將計算機的各項功能集成于一體,以單片機為核心,再配合其他外部電路組成的控制系統稱為單片機系統。單片機系統的應用需要軟件和硬件相結合。傳統的單片機系統設計菜單時,均采用順序結構,即每增加一個菜單項都需要填加一段程序代碼,該方法的優點是容易上手,便于工作人員進行菜單項的添加操作,但是,若需要對程序代碼進行修改就非常麻煩,且很容易出錯。因此,如何在設計菜單時,保證對菜單項的對應程序代碼進行修改的便捷性和準確性,是本領域技術人員目前需要解決的技術問題。
技術實現思路
本專利技術的目的是提供一種用于單片機系統的菜單生成方法,可以在設計菜單時,保證對菜單項的對應程序代碼進行修改的便捷性和準確性。為解決上述技術問題,本專利技術提供了如下技術方案:一種用于單片機系統的菜單生成方法,包括:創建菜單表;接收菜單類型生成指令,并在所述菜單表中生成相應的菜單類型;根據各菜單類型,在所述菜單表中生成目標設備的運行控件;接收菜單項添加指令,并根據所述菜單項添加指令將所述菜單表加入到目標程序下;對所述目標程序下的所述菜單表進行分析,生成對應的菜單結構;對所述菜單結構對應的菜單類型和運行控件進行編譯。優選地,所述創建菜單表為創建一個WPS表或一個Excel表。優選地,所述接收菜單類型生成指令,并在所述菜單表中生成相應的菜單類型,包括:接收菜單類型生成指令;根據所述菜單類型生成指令, ...
【技術保護點】
一種用于單片機系統的菜單生成方法,其特征在于,包括:創建菜單表;接收菜單類型生成指令,并在所述菜單表中生成相應的菜單類型;根據各菜單類型,在所述菜單表中生成目標設備的運行控件;接收菜單項添加指令,并根據所述菜單項添加指令將所述菜單表加入到目標程序下;對所述目標程序下的所述菜單表進行分析,生成對應的菜單結構;對所述菜單結構對應的菜單類型和運行控件進行編譯。
【技術特征摘要】
1.一種用于單片機系統的菜單生成方法,其特征在于,包括:創建菜單表;接收菜單類型生成指令,并在所述菜單表中生成相應的菜單類型;根據各菜單類型,在所述菜單表中生成目標設備的運行控件;接收菜單項添加指令,并根據所述菜單項添加指令將所述菜單表加入到目標程序下;對所述目標程序下的所述菜單表進行分析,生成對應的菜單結構;對所述菜單結構對應的菜單類型和運行控件進行編譯。2.根據權利要求1所述的方法,其特征在于,所述創建菜單表為創建一個WPS表或一個Excel表。3.根據權利要求1或2所述的方法,其特征在于,所述接收菜單類型生成指令,并在所述菜單表中生成相應的菜單類型,包括:接收菜單類型生成指令;根據所述菜單類型生成指令,在所述菜單表中生成主菜單和若干子菜單。4.根據權利要求3所述的方法,其特征在于,所述根據各菜單類型,在所述菜單表中生成目標設備的運行控件,包括:根...
【專利技術屬性】
技術研發人員:王順強,
申請(專利權)人:重慶兆洲科技發展有限公司,
類型:發明
國別省市:重慶;50
還沒有人留言評論。發表了對其他瀏覽者有用的留言會獲得科技券。