Em 13/7/2011 04:26, Michael Watterson escreveu: > Resent with TAG > > On 12/07/2011 22:38, Robert Berger wrote: >> I'm playing with the idea of porting FreeRTOS 7.0.1 to a PIC18LF45K22 >> with MPLAB and friends as my time permits. >> >> I know that this architecture is suboptimal for a RTOS, but was >> wondering if someone has done something similar already or if someone >> would be interested in a joint porting effort. >> > Very sub-optimal. I looked at this. The 16F/18F is not the the right=20 > family for such a project. Indeed it works very well. It depends on your tick rate. I think that around 5% of CPU time consumption for 1ms ticks at 10MIPS is good enough. I created several PIC18 projects with FreeRTOS, some very real-time intensive and all them worked perfectly. > I think someone did "sort of" get it on an 18F. > > [EDIT: I see it is now working on 18F, good] For several years now :) > What you need is a simpler scheme using timer interrupt and all the=20 > tasks called in turn via semaphores and the main program loop. My=20 > approach works for 10F/12F/16F and 18F. It's not an actual OS, but a=20 > simple framework. This sort of stuff is good also. I use something similar a lot too. Note: FreeRTOS offers co-routines also. > Introduction > http://www.techtir.ie/node/1003432 > > Article > http://www.techtir.ie/software/jal/multitasking > > comments > http://www.techtir.ie/node/1003431 > > > FreeRTOS is good project. But not the way to go for 18F. > > There is a way to do "true" Multitasking on 18F family, Olin has=20 > discussed this and I've discussed it with Kyle, the author of current=20 > JAL compiler. There is even a "Task" construct in JAL, but it's not much= =20 > use. > > Basically the lack of decent configurable stack, abillity to have stack=20 > frames and manipulate SP and Stack is the problem. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .