Giter VIP home page Giter VIP logo

Comments (6)

mikaelpatel avatar mikaelpatel commented on July 30, 2024

@mataide Thanks for your interest in this project. If I understand you correctly you are assuming that the library can detect if a device is present? Is that what you are looking for? The size is provided by the class constructor. There is no check that a device is present. Obviously this could be done by for instance reading and writing the first and last byte.

from arduino-spi.

mataide avatar mataide commented on July 30, 2024

Thanks Mikael, but you missunderstood what I am asking for.

I dont know if my external SRAM is working, probably not. Because with the 23LC1024 connected, your library says that I have sram.SIZE = 131072 and if I remove the 23LC1024 I still have the same amount of SRAM sram.SIZE = 131072.

So what I am trying to do is trying to make sure that the external SRAM is working.

What I need is:

I need to stream a very big JSON with a library called https://github.com/bblanchon/ArduinoJson, however the default SRAM from Arduino Mega isnt enough.

So I just bought the SRAM 23LC1024 to expand the Arduino SRAM and parse the JSON.

from arduino-spi.

mikaelpatel avatar mikaelpatel commented on July 30, 2024

@mataide To make sure that you have connected the SPI SRAM correctly you can use the benchmark sketch or read and write some bytes on the memory.

Please remember that the SPI SRAM does not automatically increase the SRAM on the MPU. That is something very different. You must write code to transfer the data from MPU SRAM to SPI SRAM.

Good luck with your project.

from arduino-spi.

mataide avatar mataide commented on July 30, 2024

@mikaelpatel Thanks,

Can you provide an example of Output in Arduino Monitor that I can have sure that my external memory is working?

Also I should use USE_SOFTWARE_SPI? Because for Mega I am using:
Software::SPI<BOARD::D51, BOARD::D50, BOARD::D52> spi;

Best Regards,

from arduino-spi.

mikaelpatel avatar mikaelpatel commented on July 30, 2024

@mataide If you run the benchmark example https://github.com/mikaelpatel/Arduino-Storage/blob/master/examples/Benchmarks/MC23LCXXX/MC23LCXXX.ino it will verify that the read/write was correct. It will also give the performance. With USE_SOFTWARE_SPI:

spi.FREQ(MHz) = 8
sram.SIZE(kbyte) = 128

write(N, us, us/byte, kbyte/s)
1, 84, 84.00, 11.90
10, 196, 19.60, 51.02
100, 1360, 13.60, 73.53
1000, 13020, 13.02, 76.80

read(N, us, us/byte, kbyte/s)
1, 84, 84.00, 11.90
10, 204, 20.40, 49.02
100, 1348, 13.48, 74.18
1000, 12840, 12.84, 77.88

And with Hardware::SPI

spi.FREQ(MHz) = 8
sram.SIZE(kbyte) = 128

write(N, us, us/byte, kbyte/s)
1, 24, 24.00, 41.67
10, 40, 4.00, 250.00
100, 168, 1.68, 595.24
1000, 1468, 1.47, 681.20

read(N, us, us/byte, kbyte/s)
1, 24, 24.00, 41.67
10, 40, 4.00, 250.00
100, 156, 1.56, 641.03
1000, 1352, 1.35, 739.64

During the read the values are checked against what was written. You get a message if that fails:
https://github.com/mikaelpatel/Arduino-Storage/blob/master/examples/Benchmarks/MC23LCXXX/MC23LCXXX.ino#L83

from arduino-spi.

mikaelpatel avatar mikaelpatel commented on July 30, 2024

@mataide I am closing this issue as it is not really a bug report or feature request.

from arduino-spi.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.