Font Size: a A A

Design Of Real Time Operating System Based On PIC24F MCU

Posted on:2010-08-29Degree:MasterType:Thesis
Country:ChinaCandidate:N ZhangFull Text:PDF
GTID:2178360278472403Subject:Detection Technology and Automation
Abstract/Summary:PDF Full Text Request
With the improvement of embedded system's performance, embedded application is becoming increasingly wide. Traditional foreground-background software architecture is no longer able to support the more and more complicated application requirement. A lot of problems, such as long response time of tasks, high coupling between modules and difficulty to reuse code, become more and more prominent. It makes the introduction of embedded system in Real-time Operating System become urgent.Based on the background, the paper designs and implements an Embedded Real-time Operating System based on PIC24F microcontroller. The system consists of the real-time kernel and tiny TCP/IP protocol stack.The real-time kernel chiefly includes the real-time multitask scheduling, inter-task synchronization and communication, interrupt administration and time administration. The multitask scheduler adopts preemptive strategy based on priority level, which can achieve microsecond response, to support the real-time embedded system to meet performance requirements. Inter-tasks use semaphore mechanism to achieve synchronization and exclusion, and use message and mail mechanisms to achieve communication. The real-time kernel also supports interrupt nesting, which can nest three times at most. The interrupt stack is independent of task stack. In addition, the kernel provides 10ms clock beat and software timer for users.In order to meet the communication requirements of the embedded system, the paper develops a tiny TCP/IP protocol stack based on RTL8019AS Ethernet chip by clipping and modifying the Microchip TCP/IP stack - MCHPStack. This stack consists of Ethernet driver, ARP, IP, ICMP and TCP protocols. And this stack is easy to integrate with the embedded system to realize the Ethernet data transmission.At last, based on the analysis of the embedded system, a reasonable testing project is designed to evaluate this system's real-time performance. The results show that the designed embedded real-time operating system has ideally real-time performance to meet the needs of practical applications. At present, this system has been successfully used in the energy management system in the business district of Shouguang, Shandong Province, which shows the good stability and reliability of this system.
Keywords/Search Tags:PIC24F, Microcontroller, Embedded System, Real-time Operating System, TCP/IP protocol stack
PDF Full Text Request
Related items