codewarrior的使用 下载本文

图6-50 确立目标

关闭“True-Time Simulator & Real-Time Debug”工具界面,在主界面中重新按下“Debug”,进入“True-Time Simulator & Real-Time Debug”调试界面。

选择Component->Open?,如图6-51所示。

图6-51 选择Visualizationtool

选择Visualizationtool,如图,点击OK,如图6-52所示。

图6-52添加元件

点击右键,选择Properties,如图6-53所示。

图6-53 编辑属性

设置:

Refresh Mode : Periodical Refresh Time (100ms) : 3

点击右键,选择Add New Instrument -> Bar,在界面下放置虚拟元件 点击右键,选择Add New Instrument -> 7Segment Display,在界面下放置虚拟元件

点击右键,选择Add New Instrument -> Switch,在界面下放置虚拟元件 双击Bar,如图6-54所示

设置:

Kind of Port : Memory Port to Display : 0x3e 关闭窗口。

双击7Segment Display 设置:

Kind of Port : Memory Port to Display : 0x86 关闭窗口。

设置:

Kind of Port : Memory Port to Display : 0x3c Bitnumber to Display: 7 关闭窗口。

图 6-54 BAR属性编辑 点击右键,取消选择Edit Mode。

在“True-Time Simulator & Real-Time Debug”调试界面,按下Sart/Continue,运行程序,在本示例中,Bar元件模拟电位器,开关的一次动作表示一次A/D转换,7Segment Display元件显示转换结果。

6.8.3在线编程

这一部分在第四章中6.6已经详细表述过了,这里就不再赘述。