專注電子技術(shù)學(xué)習(xí)與研究
當(dāng)前位置:單片機教程網(wǎng) >> MCU設(shè)計實例 >> 瀏覽文章

單片機操作系統(tǒng)RTX51原理分析與移植

作者:佚名   來源:本站原創(chuàng)   點擊數(shù):  更新時間:2007年08月25日   【字體:

一.課題要求:

仔細分析單片機操作系統(tǒng)RTX51的原理,將其移植到單片機實驗平臺上,并要求編寫一個簡短的程序來驗證其運行的正確性(比如,編寫兩個具有顯示不一樣內(nèi)容的任務(wù))。

二.RTX51原理

注釋:由于英文原文會比較好,所以我沒有翻譯過來(不過也寫了部分的翻譯),直接提取出來一些英文,總結(jié)在一起。

1.       進程管理( Task Management )

1)       進程類型( Classes of Tasks )

RTX-51 recognizes two classes of tasks:

1.       Fast tasks

n       Contain especially short responses and interrupt disable times.

n       Contain a separate register bank and a separate stack area (register banks 1, 2 and 3).(Figure 1)

n       Contain the highest task priority (priority 3) and can therefore interrupt standard tasks.

n       All contain the same priority and can therefore not be mutually interrupted.

n       Can be interrupted by c51 interrupt functions.

n       A maximum of three fast tasks can be active in the system.

 

2.       Standard tasks

n       Require somewhat more time for the task switching compared to fast tasks.

n       Share a common register bank and a common stack area (register bank 0).

n       The current contents of registers and stack are stored in the external (XDATA) memory during a task change.

n       Can be interrupted by fast tasks.

n       Can interrupt themselves mutually.

n       Can be interrupt by c51 interrupt functions.

n       A maximum 16 standard tasks can be active in the system.

 

 

關(guān)閉窗口