Go Down

Topic: What is the 1KB SRAM used for? (Read 1 time) previous topic - next topic


Hi all. I'm just a newbee. I'm just curious what the 1KB SRAM is used for. Is it reserved for system and can it be used by user programs? BTW is there any functions that can allocate the flash ram for program? :D
Serial LCD keypad panel,phi_prompt user interface library,SDI-12 USB Adapter


the sram is the volatile part , to store the variable , system buffers etc .
The users program is stored in the flash non-volatile memory.


That's right, Flash is used for program storage, and RAM is used for global variables, local variables and temporaries (i.e. the stack).  There's also EEPROM. which can be used with special EEPROM read/write functions for non-volatile data (but not program) storage.


Thanks guys. I finally remembered a chart I saw in a book some 15 years ago about sram and dram. Sram is like a ball in one of two boxes marked as 1 and 0. Dram is like a ball on a slope, the high end marked as 1 and low end marked as 0, so dram needs to be refreshed regularly. I also remembered both are volitile.
Serial LCD keypad panel,phi_prompt user interface library,SDI-12 USB Adapter


OK, glad that the explanations made sense.

As for SRAM and DRAM, both are used for data storage, but they do indeed work in different ways.  The Arduino has no DRAM at all, just SRAM.  A desktop PC has DRAM for storage of data and program code.

This is because a DRAM cell (one bit of memory) can be made smaller than an SRAM cell.  So, for high-density memory (PC RAM in the form of DIMMs), DRAM is better.  SRAM cells are larger, but for a tiny amount like the 1k in the Arduino, that does not matter.  SRAM has the advantage that it needs no refresh, which is important for applications like microcontrollers.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131