OSA : Speed characteristics

Here is an information to determine the time required by OSA to switch from one task to another for different chips under different compilers and priority modes.

How to use this table? First you have to find your compiler and your priority mode in table and get the value. Then this value should be multiplied by nomber of active tasks and then multiplied by time per instruction cycle.

Compiler PRIORITY_DISABLED PRIORITY_NORMAL PRIORITY_EXTENDED

PIC10 (PIC12)
Hi-tech PICC 54*N 84*N -

PIC16 (PIC12)
HT-PICC STD 49*N 80*N 123*N
HT-PICC PRO (PIC1xF1xxx) 39*N 64*N 80*N
microC PRO 74*N 119*N 224*N
CCS PICC 62*N 107*N 167*N

PIC18
HT-PICC18 STD 45*N 70*N 85*N
MPLAB C18 55*N 96*N 117*N
microC PRO 73*N 99*N 187*N
CCS PICC 49*N 88*N 101*N

PIC24 (dsPIC)
MPLAB C30 60*N 87*N 113*N

AVR
WinAVR 108*N 172*N 190*N
IAR 100*N 148*N 177*N

STM8
Cosmic 35*N 58*N 71*N
IAR 93*N 118*N 238*N
Raisonance 61*N 80*N 120*N

N - namber of active tasks

An example 1 of determination Source data:

The needed value for our compiler, priority mode and compiler is 123*N. The average time of switching between tasks (time from OS_Yield() execution in one task to other task get the control) is:

t = 123 * 4 * 200ns = 492 * 200ns = 98.4 us

An example 2 of determination Source data:

The needed value for our compiler, priority mode and compiler is 58*N. The average time of switching between tasks is:

t = 58 * 8 * 62.5ns = 464 * 62.5ns = 29 us