SCM is a small computer, a large computer is not necessary data storage system, SCM has the same, and often integrated with the CPU, more compact and flexible. Until the early 1990s, domestic easy to get the microcontroller is 8031: without a memory chip, to work, but also must add RAM and ROM, microcontroller became 3 pieces of machine. Now different, big and small is 51, is AVR is STC, there are 430, PIC and so on, all say their own good, but no one dare to say “I don’t want memory”.

Data memory RAM

This is a block of memory that can access data at any time, that is, memory that can read (fetch) and write (store), or RAM for short.

The RAM used in the single chip microcomputer now belongs to static RAM or SRAM, which is different from the memory strip used by the computer. As long as you write the data to the SRAM and power it up or don’t erase it, the data will remain there.

Computers use dynamic RAM, which has to be constantly refreshed to save data. Because the single chip processing information is much smaller than the computer, so it has less RAM: from completely without, with 128, 256,… 1K, 2K, 4K, much less than ROM. Because in fact RAM is only used as a temporary storage of data, unless the image processing needs to store a large amount of data. Generally for the implementation of simple tasks of the single chip microcomputer, there are so much is enough, if it is not enough can only take additional SRAM to expand.

In order to access the 8-bit binary number of a RAM unit, of course, as with ROM, it must be identified by the “address” of its specific location. If a microcontroller has 1K (1024) RAM, its address also ranges from 0000 to 1024, or 0000H to 03FFH in hexadecimal numbers. Visible, and the ROM address is the same.

The purpose of RAM in the single chip microcomputer, RAM is mainly to store temporary data. For example, the microcontroller temperature measurement, measuring 1 times per second, display the average value of 1 minute (updated once a minute) : We first through the sensor, amplifying circuit and A/D conversion, the proportional to the temperature of the analog into A binary number, then 1 per second into the digital quantity through the input port order MCU RAM, then they two sum to the calculation of the average, the final numerical display, and then write the 60 storage unit all 0 to remove old data, The next time the cycle repeats itself.