Computer Sciences Dept.

CCS RTOS

Description

This was a personal project done using the CCS compiler. While the CCS realtime operating system was cooperative, this operating system strove to be preemptive. Due to issues with the PIC microcontrollers, this was only written for the PIC18 and required a significant amount of wrapper code.

Challenges

The biggest challenge with writting a preenptive OS on the PIC18 microcontroller is that the controllers don't have hardware stacks so I had to implement one in software. As mentioned above, this required the user to requres memory space on the software stack for storing reentrent variables. Each process got it's own space on the stack. The operating system kept track of which process was currently in context and when the timer interrupt went off it would perform a context switch by pushing all of the required registers onto the software stack and reinstating the next processors register values and returning.

 
Computer Sciences | UW Home