What is RAM?

By
RAM, random access memory, is used to write and read data values as a program runs. RAM is volatile: if you remove the power supply its contents are lost. Any variables used in a program are allocated from RAM. The time to retrieve information from RAM does not depend upon the location of the information because RAM is not sequential, hence the term random access.


Most small microcontrollers provide very little RAM which forces you to write applications that use RAM wisely. Manipulating large data structures and using pointers, re-entrant or recursive functions use large amounts of RAM and are techniques which are generally avoided on microcontrollers.


Some C instructions which are rarely used on larger platforms are more commonly used in C programs for microcontrollers. One example is the goto instruction reviled by traditional C programmers. While goto is rarely used on larger platforms, in embedded system programming it can sometimes be used to save RAM.

0 comments:

Post a Comment

If you have any questions or droughts feel free to ask here.