~~NOTOC~~ ====== 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: - **min** (minimal services set) * priorities are OFF * allowed: binary semaphores, flags, messages - **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 - **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**: - 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; - all test were compiled with maximum optimization; - in addition OSA requares RAM for task deskriptors; - there is a base size of descriptor in table. It can be greater if: * task timer used (##[[en:osa:ref:appendix:configuration|OS_ENABLE_TTIMER]]##) - by ##[[en:osa:ref:appendix:configuration|OS_TTIMER_SIZE]]## bytes (default 2); * chips with ROM > 64K requires another 2 bytes per task for saving higher addresses; * when using ##[[en:osa:ref:appendix:configuration|OS_PRIORITY_EXTENDED]]## mode, each task requires another 2 bytes; - memory usage can be reduced by disabling priority and by using one byte timers (see ##[[en:osa:ref:appendix:configuration|OSAcfg.h]]##).