I recently received some 23LC1024 chips. They are 5V 1Mbit spi sram chips that I am using with an Arduino 328p. I found a library online that is pretty good Google Code Archive - Long-term storage for Google Code Project Hosting. (which I modified for 24 bit addressing). This library is nice in that it lets you address the memory as if it were an array, like myarray[address]=#, however, I was wondering is there another programming technique that I could use to work with the sram as a pointer? Could I overload operators in the library to simulate a pointer type interface? I have read that other Atmel chips have the ability to address external memory as if it were internal, but it doesn't look like this is an option with the 328p. Am I wrong, is it possible to use the XYZ registers to address the memory like a pointer?
Pointers and arrays are nearly interchangeable. Perhaps instead of explaining how you want to do something (using pointers), you should explain what the problem is that you are trying to solve.
You should also fix your original post and properly post the link so that it actually works.
Addressmod Capability To Create User Defined Address Spaces In Any Kind Of Memory Device
Part of the IEEE Embedded C standard (ISO/IEC TR 18037), addressmod allows you to create custom qualifiers to create variables in any kind of memory device. The identifier can be used with any data types, including structures, unions, arrays, and pointers. Review the following example, which uses addressmod to create variables that are located in external memory:
From CCS compiler page. It works (bug in latest versions). Would be great to have this feature with arduino as well. .
I am trying to use the sram with the uip network stack, which uses an a pointer to an internal sram array to compose and parse packets. I would like to use external sram instead.
Pito,
Thanks for the info, sounds interesting, the examples are what I am looking for, but I am not sure how to implement that. Yes, I agree, that would be great to have in the Arduino environment.