LEANSLICE red_ball.gif (129 bytes)



Version 1.1

  • Lean Multitasking using Code Slicing
  • Very compact implementation
  • High performance and precise timing
  • Static implementation
  • Offer the advantages of state machines

The LEANSLICE feature is available on the EXTENDED compiler editions at NO EXTRA COST.

LEANSLICE outperforms other multitasking system. A task switch is done at 10-15 instruction cycles. Ordinary time slicing systems may need over 100 instruction cycles to do the same.  Within this time LEANSLICE is able to schedule around 5-8 tasks.

The STATIC implementation makes LEANSLICE predictive and suitable for timing critical tasks.


  • Multitasking support is integrated into the compiler for an efficient implementation
  • The implementation is fully static, with no dynamic lists to maintain
  • No multitasking kernel that consumes code
  • Interrupt is not used, and can thus be dedicated for application usage
  • Small multitasking code overhead for each task
  • Very fast task switch: 10-15 instruction cycles
  • Round robin scheduling is default
  • Full custom task scheduling is possible to enhance performance, define priorities, or design a hierarchy of tasks that are scheduled on demand
  • A state can be defined at each task switching point, allowing state information to be read outside the task for debugging or error recovery
  • Task switch is performed only at well defined program code points which makes it easy to protect critical program regions
  • User definable delay function for precise timing using multiple software timers
  • Tasks can be stopped and started individually, restarted, suspended and resumed
  • Libraries for timers, events, semaphores, binary semaphores and mailboxes

LEANSLICE sample code can be inspected at the example page.

LEANSLICE Advantages

  • save code writing and state book-keeping
  • get more readable code
  • suited for all PICmicro and similar devices
  • write tasks that operate independently or cooperate
  • take advantage of the compact implementation
  • use compact and efficient libraries for message passing, events, semaphores, binary semaphores and delays
  • get the best of both approaches: the efficiency of state machines combined with easy task code writing


LEANSLICE manual and DEMO compilers. The PDF manual provides the FULL details of the LEANSLICE concept. Try the demo compilers to experiment with LEANSLICE multitasking. The compilers are 32 bit console applications that can be started from the command line or from many IDE applications (MPLAB). No special installation is required.

End line