Skip to content

SRAMBytes

Arnd edited this page Dec 2, 2016 · 3 revisions

The public SRAMBytes variable is an unsigned 16-bit number that is filled at class instantiation and should not be changed outside of the class.

During class instantiation the actual size of the memory is determined by exploiting the memory wrap-around functionality when writing past the physical end of memory. The value set in SRAMBytes is as follows for the specific models:

  • 23x640 (64kbit) 8192 Bytes
  • 23x256 (256kbit) 32768 Bytes
  • 23x512 (512kbit) 65536 Bytes
  • 23x1024 (1024kbit) 131072 Bytes
  • 23LCV512 (512kbit) 65536 Bytes
  • 23LCV1024 (1024kbit) 131072 Bytes

###Example

const uint8_t CS_PIN = 8;   // define the CS/SS Pin used for SPI and attached to the Microchip memory
MicrochipSRAM sram(CS_PIN); // Instantiate the class
uint16_t availableMemory = sram.SRAMBytes;
Serial.print("Available memory is ");
Serial.print(availableMemory/1024);
Serial.println(" Kb.");`

Overview

Overview
Installation
Class Instantiation

Public Functions

get()
put()
clearMemory()
fillMemory()

Public Variables

SRAMBytes

Example Program

sram_read_write_test

Clone this wiki locally