Skip to main content

Questions tagged [sram]

Volatile memory used by Arduino programs for storing variables and other data at runtime.

Filter by
Sorted by
Tagged with
0 votes
0 answers
28 views

How do I enable CONFIG_SPIRAM_SUPPORT for ESP32 S3 on Arduino?

I'm trying to use PSRAM with the TFT_eSPI library, but it fails because CONFIG_SPIRAM_SUPPORT isn't defined. In Arduino -> Tools -> PSRAM I selected OPI PSRAM as the board manufacturer (the ...
Dakkaron's user avatar
  • 229
-1 votes
1 answer
73 views

Help reducing dynamic memory usage with LoRa library

I have combined code that reads heart rate and SPO2 then sends the data using LoRaWAN. Using these 2 libraries that work well by themselves LoraWAN lib | MAX30102 lib. My board is an Arduino Pro or ...
Inversionist's user avatar
0 votes
1 answer
128 views

Does the bootloader use some SRAM?

I want to use all SRAM of an Arduino by writing the code in assembly. But does the bootloader use some SRAM while the program is running, and if the answer is yes would changing that data lead to ...
markoj's user avatar
  • 43
2 votes
2 answers
447 views

How can i reduce my global variable use? Attiny85

I'm trying to compile my code but i keep exceeding my global variable memory by 12%. Is there anything i can do in my code to further reduce RAM usage? Or do i have to do modifications to the ...
Boyfinn's user avatar
  • 245
1 vote
0 answers
63 views

Sending data to server

I have an SD card have a very big file (1M character). i try to load it into memory in terms of 4K character array ( The maximum I could do using Arduino Mega). but this take almost 250 call to the ...
Antoun's user avatar
  • 11
2 votes
2 answers
94 views

RAM cost of entering functions

A friend has told me I shouldn't rely on functions because, during execution, they occupy a significant amount of RAM. Is that true or, if it isn't, what's the maximum suggested level of function ...
none none's user avatar
  • 233
3 votes
2 answers
260 views

Writing a 1Mb bitmap to an SDcard with only 96kB RAM

My goal is to have an Arduino Due (96 KB RAM) write a +-1MB bitmap to an SD card. I have an array of a several coordinates on my Arduino Due and I would like to generate the bitmap where all the ...
Sven Onderbeke's user avatar
2 votes
1 answer
295 views

Connect SDRAM to STM32

Well, first of all hello to everything and thanks for reading my question. I am designing a board with STM32F730R8T6 MCU, and I want to connect MT48LC16M16A2P-6A to it which is 4MB SDRAM chip. The ...
Valentino Zaffrani's user avatar
0 votes
1 answer
541 views

External RAM (23LC1024) and external Flash (W25Q64JVSSIQ) with Sparkfun SAMD21

i'm trying to extend the capabilities of the Sparkfun SAMD21. My question is, which pins do I have to share? I mean, I understand that MISO, MOSI and SCK are shared, but CS connects each to a ...
Valentino Zaffrani's user avatar
0 votes
2 answers
1k views

Using ESP32 Cam internal RAM

I am new to the ESP32 series of boards.I powered up my ESP32 Cam board using the Vcc pin supplying about 7.4V using two 18650 batteries only to find out later that was a completely incorrect way to ...
AfiJaabb's user avatar
  • 219
1 vote
1 answer
102 views

String(int) function stopping the Arduino

Well I am trying make an application with arduino leonardo and GSM Shield. There are conditions if, else if, else .. etc if (smsMetni.indexOf("DURUM") != -1) { Serial.println("SMS ...
mehmet's user avatar
  • 287
1 vote
2 answers
4k views

Serial printing from flash memory (F() macro, PROGMEM, sprintf_P, SPTR)

I have been testing various techniques on an Arduino Uno for serial printing from flash memory instead of RAM. At the same time, I have been using the freeMemory() function from Adafruit. I created a ...
NickG's user avatar
  • 163
3 votes
2 answers
2k views

Is there a way to add external RAM (let's say 100 MB or 200 MB) in this audio buffer mixing context?

I'm coding a music sampler device: for fast playback / minimal latency (only a few milliseconds), it's better to have all audio .wav samples we want to use in RAM, so that when some of them are ...
Basj's user avatar
  • 428
0 votes
1 answer
205 views

LDC paired with Arduino locks up and freezes. Out of SPRAM?

I am making an alarm clock using a 4x20 lcd display, rtc, and Arduino Pro Mini 3.3v. I have implemented a menu system for setting the time/date that blinks the text on the lcd display to indicate that ...
cr5519's user avatar
  • 23
1 vote
1 answer
773 views

How is it possible to access the CPU registers using memory addresses?

The following is taken from ATmega328-328P Data sheet. According to this, I can access all the 32 registers in CPU using memory addresses. For example: unsigned char *register = 0x0; will access ...
xnight's user avatar
  • 11
1 vote
1 answer
940 views

Is SRAM erased when putting Arduino into sleep_mode_pwr_down?

Question In the interest of reducing power consumption, I am putting the Arduino into sleep mode between taking sensor readings. However, the data from readings are stored in arrays, and must not be ...
Triz's user avatar
  • 13
4 votes
2 answers
1k views

Locally declared variable takes up global variable space in dynamic memory/SRAM

I'm trying to make my Arduino Uno control the air conditioner by recording the raw IR signal of several of the AC remotes temperatures using AnalysisIR. However these IR codes are quite long (array ...
ihish52's user avatar
  • 41
2 votes
1 answer
3k views

Does the StringObject.reserve() function prevent memory fragmentation/leaks?

I'm currently writing and testing a professional Arduino application, I'm aware of the dangers of using the String class, so I began to implement C-style strings in some places, but it's just way ...
Jorge Gonçalves's user avatar
1 vote
0 answers
82 views

Compiling SRAM intensive code from Raspberry Pi 3

I am using an Arduino Uno R3 to control my Christmas lights (a strand of 665 WS2812B LEDs). I am using the Pololu library that can be found here: https://github.com/pololu/pololu-led-strip-arduino ...
Alphy13's user avatar
  • 147
0 votes
1 answer
258 views

Arduino due temperature reading shows random temperatures

I am using an Arduino Due board to read three temperatures from three separate smt160-30 digital sensors but the program is behaving very randomly. the code I am using is one I got from arduino ...
Meysam Afghani's user avatar
0 votes
1 answer
1k views

Store 3-dimensional char array in program memory with PROGMEM

I'm running a sketch whith a quite big, constant three dimensional char array (or simply, a table of strings). As this takes lots of RAM I'd like to store it in programm memory in order to keep the ...
tr01's user avatar
  • 117
0 votes
1 answer
907 views

Space needed for local String variable

I tried to run this code on my Arduino Uno clone (which has no function so far and is a shortend version of my programm): String rules [16][5] ={ {"B0 B5", "", "", "cs S0", "", }, [...] }; ...
tr01's user avatar
  • 117
2 votes
3 answers
752 views

Is it possible to configure FRAM memory for use as stack and heap?

I'm using the Adafruit I2C FRAM breakout board with my Nano and it works as advertised, but every time I write a variable to this thing I have to use library function calls with addressing. This makes ...
LegitimateWorkUser's user avatar
-1 votes
1 answer
1k views

How to store/get MIDI SystemExclusive data?

In the MIDI library from the Arduino (FourtySeven MIDI library), there exist a function to get the length and bytes of a System Exclusive message: Functions getSysExArray() template<class ...
Michel Keijzers's user avatar
0 votes
2 answers
353 views

Is it ok to declare variables inside timer interrupts?

I am building a real time audio application using the Arduino DUE. This application needs big arrays like: uint16_t sDelayBuffer0[46000]; The Due has only 96kb of RAM available so this array just ...
user1584421's user avatar
  • 1,405
2 votes
0 answers
418 views

Time to read/write memory on the DUE

I am onto a project where a need more memory. I saw the 23LC1024 chips are very popular with the Arduino DUE. A very helpful person told me he did some timing tests on the 23LC1024 and a page read/...
user1584421's user avatar
  • 1,405
5 votes
3 answers
1k views

Sizeof variables and Due's RAM

I set out to see how much space some arrays have. I used this test code bool state = false; uint16_t BuffA[46000]; uint16_t BuffB[20000]; uint16_t BuffC[20000]; uint16_t all = 0; void setup(){ ...
user1584421's user avatar
  • 1,405
0 votes
1 answer
106 views

Current available SRAM? [duplicate]

I've reached the limit on available SRAM memory. I need to "cut down" some variables, but I actually don't know how far I need to go with it. Is there a way on measuring current available memory on ...
madneon's user avatar
  • 225
2 votes
2 answers
819 views

Can I make existing libraries use external SRAM for the Arduino

I am running out of memory on my Arduino due to the libraries I am using. After I have included all the libraries I need then there is very little in the way of free memory for my own code. If hook ...
SpeedOfSpin's user avatar
1 vote
3 answers
1k views

Arduino constant vs Microchip PIC constant

2.2 THE BASICS OF C PROGRAMMING LANGUAGE book is has like this, CONSTANTS A constant is a number or a character having fixed value that cannot be changed during program execution. Unlike variables, ...
user119o's user avatar
  • 225
1 vote
1 answer
1k views

Executing machine code at runtime Uno

I want to create a small single threaded os for my arduino.The first thing I want to do is to allow my arduino to read a section from flash/eeprom and execute it. I have some question regarding the ...
sergiu reznicencu's user avatar
-1 votes
2 answers
1k views

What shift register would I need for input OR output?

Background: A few days ago I received a 23LC1024 1Mbit SRAM chip, which works like a charm. However, before I ordered that one, I ordered a LP621024D-70LL which also is a 1 Mbit SRAM but in DIP32 ...
Michel Keijzers's user avatar
1 vote
2 answers
3k views

Which library to use for 23LC1024 SRAM 1 Mbit

I noticed there are quite some libraries for the 23LC1024 SRAM 1 Mbit memory: SpiRam Extended library SpiRam library Direct SPI ? I tried 1 and 3 so far. What I noticed was that to read 1 byte took ...
Michel Keijzers's user avatar
0 votes
1 answer
225 views

Resistors/capacitor used in connecting 23LC1024 SRAM 1 Mbit

Yesterday I received by 23LC1024 SRAM with 1 Mbit memory. I tried to search for some libraries and ways how to connect it. So I searched around on internet first for the connections and saw some ...
Michel Keijzers's user avatar
2 votes
0 answers
71 views

Interfacing with TC5564APL-15 paralell static ram [closed]

I've found a Z80 processor and a TC5564APL-15 8K static ram chips, and I want to test the RAM chip, because it's really old and I'm not sure that it's not damaged. I do not have any experience with ...
Uncle Dino's user avatar
-1 votes
1 answer
59 views

Arduino Mega and LP621024D70LL

I'm intending to try a LP621024D70LL (128 KB SRAM memory, 32 pins) on an Arduino Mega. However, I now see there is no library for it ... I wonder how hard it is to access it? I can miss 32 digital ...
Michel Keijzers's user avatar
2 votes
1 answer
196 views

Local variable usage in SRAM not counted

I use the following code to print the currently used SRAM space: // this function will return the number of bytes currently free in RAM // written by David A. Mellis // based on code by Rob Faludi ...
Michel Keijzers's user avatar
1 vote
1 answer
3k views

Global memory reduction when using SPI/SD

I want to use an SD card and when including the library both SPI.h and SD.h are included. Also later I want to use an external SRAM chip (probably using SPI.h as well). However, without the SRAM chip ...
Michel Keijzers's user avatar
0 votes
1 answer
103 views

Question about configuration EEPROM or Flash

I want to make an external (not related to Arduino) computer application that creates a big 'setup file' (like max. 64 KB). This setup file contains lookup tables (which are configurable and the ...
Michel Keijzers's user avatar
1 vote
2 answers
190 views

Confusion with storage of declared variables and volatile

I read that volatile is used when we want to store variables in SRAM. But aren't all the variables in a code are stored in SRAM anyway? And what makes it an advantage sometimes for variables(like ...
floppy380's user avatar
  • 245
0 votes
1 answer
391 views

Explanantion of Addressing

I'm new Arduino user and I'm trying out a SPI protocol to interface a SRAM, specifically, the 23LCV512. I have found the instructables steps to interface a SRAM using the SPI bus on an Arduino UNO ...
Turing101's user avatar
2 votes
2 answers
952 views

Arduino Due SRAM

I'm trying to create an array in Arduino Due and when the array exceeds the size of 32768 integer elements the compiler (Atmel Studio) complains. I read that Arduino Due SRAM size is 96K in 2 banks....
user avatar
4 votes
3 answers
6k views

Is there any way I can connect the RAM of a computer to Arduino?

I was thinking about a way to reuse the RAM of my old computer on my Arduino board. I was thinking about some peojects using neural networks, and more RAM would let the Arduino use more neurons. So ...
SrJaimito's user avatar
  • 141
1 vote
1 answer
833 views

Atmega2560 + weather station freezing

i made a weather station which is build on a ATmega2560 mini pro, Esp8266 module which communicate with atmega on serial1 which sends values to thingspeak, an TSL2561, 2.4 tft lcd, BMP180, DHT22 and a ...
Andrei's user avatar
  • 11
2 votes
1 answer
136 views

Inherent delay running EEPROM.read()

I'm using EEPROM to store long term data for use in sketches (thanks to DarthRubik for the guidance). I store stuff like a location ("Garden") and a device name ("Greenhouse Monitor 02") plus ...
acpilot's user avatar
  • 653
1 vote
2 answers
867 views

Forensic security of Arduino (SRAM)

Pardon the double post, but I'm not getting much traction with this question over at arduino.cc so I'm looking for answers here now. Original post: http://forum.arduino.cc/index.php?topic=391698.0 ...
Matt Borja's user avatar
1 vote
2 answers
254 views

Possible to determine at runtime whether a pointer is declared PROGMEM?

Is it possible to determine at runtime whether a pointer points to PROGMEM'ed values or regular values? This would give some flexibility when writing code that handles both.
Ana's user avatar
  • 480
5 votes
3 answers
2k views

Array + Serial Monitor Problem

I've written a Arduino sketch that converts an analogue voltage to a temperature using a lookup table - code below. I've recently changed my LUT to include more values but ever since that my Serial ...
EoinScully's user avatar
6 votes
2 answers
1k views

Why is my SRAM so quickly filled? There are not more than 60 bytes

I have just gone through all my code. At max I use 60 bytes. I have done everything in order to minimize its usage - I even store booleans as bits, not bytes! What could be happening here? The only ...
SlowerPhoton's user avatar
2 votes
1 answer
1k views

Saving byte array in PROGMEM instead of SRAM

For an ethernet project I do, I need to store the Ethernet Shield's MAC address. I store it like that: byte mac[] = { 0x90, 0xA2, 0xDA, 0x0F, 0xE1, 0x85 }; That works OK, but in my project I need ...
Ido Daniel's user avatar