![Keil RTX51 Скачать руководство пользователя страница 48](http://html1.mh-extra.com/html/keil/rtx51/rtx51_manual_3913946048.webp)
48
Application Examples
6
Enter the following commands at the DOS prompt to compile and link RTX_EX2.
C51 RTX_EX2.C DEBUG OBJECTEXTEND
BL51 RTX_EX2.OBJ RTX51TINY
When RTX_EX2 is compiled and linked, you can test it using DS51. Type
DS51 RTX_EX2
to run DS51 and load RTX_EX2. When DS51 is loaded, type the following commands at
the DS51 command prompt.
WS counter0
WS counter1
WS counter2
WS counter3
G
This will set watchpoints for the four task counter variables and will begin execution of
RTX_EX2. RTX_EX2 increments the four counters as follows:
counter0
incremented every 5 RTX51 timer ticks
counter1
incremented every 10 RTX51 timer ticks
counter2
incremented as fast as possible (this task gets most of the available
CPU’s time)
counter3
incremented for every overflow of
counter2
Enter
CTRL+C
to halt execution of RTX_EX1 and enter
F3
to display status informa-
tion for the four tasks defined in this program.
+------------------------------------------------------------------------+
¦ Task ID ¦ Start ¦ State ¦ Wait for Event ¦ Signal ¦ Timer ¦ Stack ¦
¦----------+-------+---------+------------------+--------+-------+-------¦
¦ 0 ¦ 000EH ¦ WAITING ¦ TIMEOUT ¦ 0 ¦ 5 ¦ 28H ¦
¦ 1 ¦ 0032H ¦ WAITING ¦ TIMEOUT ¦ 0 ¦ 10 ¦ 2AH ¦
¦ 2 ¦ 0047H ¦ RUNNING ¦ ¦ 0 ¦ 196 ¦ 2CH ¦
¦ 3 ¦ 005DH ¦ WAITING ¦ SIGNAL ¦ 0 ¦ 196 ¦ FDH ¦
+------------------------------------------------------------------------+
RTX_EX2 uses the
os_wait
function to wait for events. The event that each task is wait-
ing for is shown in the displayed task list shown above.
Содержание RTX51
Страница 4: ......
Страница 6: ......
Страница 20: ......
Страница 24: ......
Страница 39: ...RTX Tiny 39 4...
Страница 40: ......
Страница 44: ...44 RTX51 Tiny Specifications 5...
Страница 68: ...RTX51 TINY REAL TIME OPERATING SYSTEM User s Guide 2 95...