> > Hi, > > I am doing a project on Microchip's 17c42a microcontroller.=A0 I will be > needing a scaled down RTOS which can schedule different tasks.=A0 The RTOS > will be interrupted by various hardware interrupts and timers.=A0 I am= > having > difficulty in implementing/designing the task scheduling and also task > preemption. > > CAN somebody give me some pointers to the trickery of impelmenting this. > > I am using the C compiler MPLAB-C.=A0 ( I could also program in Assembly if > that's what is required). > > THANX IN ADVANCE. > > Tejpal. Tejpal, We've just finished having this discussion a couple of weeks ago. Frankly it cannot be done easily. This is due to the fact that the system stack isn't mapped into a user accessible address space. So the typical mechanism, stack swapping, isn't available. There were several good ideas mostly based around state machines, that you can utilize. Can someone repost the archive URL so that Tejpal can look it up? Hope this helps, BAJ