OSA : Memory usage

These tables allow you to predict average ROM and RAM usage so that you can choose an appropriate microcontroller for your project.

min, ROM/RAM normal, ROM/RAM full, ROM/RAM Bytes per task*, RAM

PIC10 (PIC12)
Hi-tech PICC 153 / 11 250 / 14 363 / 14 2

PIC16 (PIC12)
HT-PICC STD 152 / 8 258 / 11 396 / 13 3
HT-PICC PRO (PIC1xF1xxx) 169 / 6 291 / 10 385 / 10 3
microC PRO 180 / 14 307 / 17 474 / 17 3
CCS PICC 254 / .. 399 / .. 573 / .. 3

PIC18
HT-PICC18 STD 336 / 7 548 / 10 982 / 16 3
MPLAB C18 598 / 7 862 / 10 1214 / 16 4
microC PRO 426 / 11 746 / 16 1136 / 17 3
CCS PICC 436 / .. 696 / .. 1046 / .. 3

PIC24 (dsPIC)
MPLAB C30 846 / 10 1065 / 16 1305 / 16 20

AVR
WinAVR 602 / 8 1030 / 13 1348 / 15 10
IAR 550 / 8 958 / 13 1108 / 15 5

STM8
Cosmic 462 / 8 729 / 13 974 / 15 5
IAR 664 / 8 1053 / 13 1388 / 15 13
Raisonance 434 / 8 709 / 13 918 / 15 5

* - see Note 4 below

Test modes:

  1. min (minimal services set)
    • priorities are OFF
    • allowed: binary semaphores, flags, messages
  2. normal (most usual services set)
    • priorities are ON
    • task timers are enabled
    • allowed: binary semaphores, flags, messages
    • waiting with exit on timeout services are enabled
  3. full (full services set, except user timers)
    • priorities are ON
    • task timers are enabled
    • allowed: binary semaphores, counting semaphores, flags, messages, queues
    • waiting with exit on timeout services are enabled
    • critical sections enabled

(All modes support services for switching context, waiting for events, controlling tasks, enabling/disabling interrupts)

Notes:

  1. ROM results:
    • size of ROM shown in machine words for PIC10, PIC12 and PIC16 and in bytes for other;
    • for MCC18 initialization code is included;
    • for MCC30 initialization code is included;
  2. all test were compiled with maximum optimization;
  3. in addition OSA requares RAM for task deskriptors;
  4. there is a base size of descriptor in table. It can be greater if:
  5. memory usage can be reduced by disabling priority and by using one byte timers (see OSAcfg.h).