{"id":14680,"date":"2022-05-13T18:35:53","date_gmt":"2022-05-13T18:35:53","guid":{"rendered":"https:\/\/wolles-elektronikkiste.de\/eeprom-part-3-external-spi-eeproms"},"modified":"2023-12-01T20:08:52","modified_gmt":"2023-12-01T20:08:52","slug":"eeprom-part-3-external-spi-eeproms","status":"publish","type":"post","link":"https:\/\/wolles-elektronikkiste.de\/en\/eeprom-part-3-external-spi-eeproms","title":{"rendered":"EEPROM Part 3 &#8211; External SPI EEPROMs"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">About the article <\/h2>\n\n<p>With this third part, I conclude my series on EEPROMs. In the two previous parts I had focused on the internal EEPROMs of the AVR boards and the external, I2C-based EEPROMs. This post is now about the external, SPI-based EEPROMs.<\/p>\r\n<p>Why another separate article about SPI EEPROMs? Can the faster SPI transfer rate be leveraged at all with respect to the slow EEPROM write process? To anticipate: The high SPI speed is not so relevant. When transferring larger amounts of data in bulk (page write), however, it is noticeable that the 32-byte limitation of the I2C transfer is not present here. This allows you to use the entire page size of the EEPROM.<\/p>\r\n\n<h2 class=\"wp-block-heading\">Technical Characteristics<\/h2>\n\n<p>The SPI EEPROMs can be recognized by the fact that they have a 25 in their component name. The number (2<sup>n<\/sup>) after the letters indicates the memory size in kilobits. Here are a few examples:<\/p>\r\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/25_EEPROMs-1024x258.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"258\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/25_EEPROMs-1024x258.jpg\" alt=\"SPI EEPROMs: 25LC512 (512 kbit), 25LC640A (64 kbit), 25A512 (512 kbit)\" class=\"wp-image-14032\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/25_EEPROMs-1024x258.jpg 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/25_EEPROMs-300x76.jpg 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/25_EEPROMs-768x193.jpg 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/25_EEPROMs-1536x387.jpg 1536w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/25_EEPROMs-1320x333.jpg 1320w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/25_EEPROMs.jpg 1556w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">SPI EEPROMs: 25LC512 (512 kbit), 25LC640A (64 kbit), 25A512 (512 kbit)<\/figcaption><\/figure>\n\n<p>I will not go into the general basics of EEPROMs again. I have already written a lot about this in parts 1 and 2 of this series.<\/p>\r\n\n<h3 class=\"wp-block-heading\">Pinout<\/h3>\n\n<p>Typically, the SPI EEPROMs have the following pins:<\/p>\r\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/25xxyy.png\"><img loading=\"lazy\" decoding=\"async\" width=\"865\" height=\"589\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/25xxyy.png\" alt=\"Pinout of SPI EEPROMs\" class=\"wp-image-14026\" style=\"width:433px;height:295px\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/25xxyy.png 865w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/25xxyy-300x204.png 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/25xxyy-768x523.png 768w\" sizes=\"auto, (max-width: 865px) 100vw, 865px\" \/><\/a><figcaption class=\"wp-element-caption\">Pinout of SPI EEPROMs<\/figcaption><\/figure>\n<\/div>\n<ul>\r\n<li><strong>CS<\/strong>: Chip Select, active-low.<\/li>\r\n<li><strong>SO<\/strong>: Slave Out, to connect to MISO.<\/li>\r\n<li><strong>WP<\/strong>: Write Protect, active-low.\r\n<ul>\r\n<li>Works only in combination with the WPEN bit (unlike the 24 series)<\/li>\r\n<\/ul>\r\n<\/li>\r\n<li><strong>GND (VSS) \/ VCC<\/strong>: Power supply.\r\n<ul>\r\n<li>&#8220;LC\/C&#8221; variants tolerate up to 5.5 volts, &#8220;A&#8221; variants usually have a limit of 3 volts.<\/li>\r\n<\/ul>\r\n<\/li>\r\n<li><strong>Hold<\/strong>: Hold pin, active-low, pauses the data transfer.<\/li>\r\n<li><strong>SCK<\/strong>: SPI Clock, to connect to SCK.<\/li>\r\n<li><strong>SI<\/strong>: Slave input, to connect to MOSI.<\/li>\r\n<\/ul>\r\n\n<h3 class=\"wp-block-heading\">Connection to the microcontroller<\/h3>\n\n<p>As an example, I show how you connect the SPI-based EEPROM, provided it can tolerate 5 volts, with an Arduino Nano:<\/p>\r\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Wiring_25LC512_Arduino_Nano-1024x659.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"659\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Wiring_25LC512_Arduino_Nano-1024x659.png\" alt=\"Connection of SPI EEPROMs: 25LC512 hooked up to the Arduino Nano\" class=\"wp-image-14034\" style=\"width:768px;height:494px\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Wiring_25LC512_Arduino_Nano-1024x659.png 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Wiring_25LC512_Arduino_Nano-300x193.png 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Wiring_25LC512_Arduino_Nano-768x494.png 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Wiring_25LC512_Arduino_Nano.png 1270w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">A 25LC512 connected to an Arduino Nano<\/figcaption><\/figure>\n<\/div>\n<p>I use the HOLD-pin in only one example. Since probably few of you will use the feature, I connected it to VCC here. If you do not have enough pins available, you can also set the WP pin to HIGH. <\/p>\r\n\n<h3 class=\"wp-block-heading\">Page Writing<\/h3>\n\n<p>The memory of an EEPROM is divided into pages. The pages usually have a size of 16, 32, 64 or 128 bytes. You can find this value in the data sheet.<\/p>\r\n<p>Writing to EEPROMs is a very slow process. If you write a single byte to the EEPROM, you need the so-called &#8220;Write Cycle Time&#8221;, which is usually specified as 5 milliseconds. To speed up writing, the EEPROMs have a buffer memory the size of the pages. You can write this &#8220;in one go&#8221; (burst or bulk write). From this buffer memory, the individual memory addresses can be written to in parallel. This increases the write speed by a factor that is at most equal to the page size (in bytes).<\/p>\r\n<p>The boundaries of the pages are fixed, and you are not allowed to write beyond them in burst write. I discussed this quite intensively in the last post.<\/p>\r\n\n<h2 class=\"wp-block-heading\">Writing and reading SPI EEPROMs without library<\/h2>\n\n<p>Let&#8217;s get started. First, I&#8217;ll show you how to write to and read from SPI EEPROMs without a library. If you&#8217;re not interested, you can skip this section.<\/p>\r\n<p>In this simple example, we write two integer values to EEPROM addresses 4 and 6 and then read them out.<\/p>\r\n<p>I will not go into the basic SPI functions in this post. If necessary, you will find a brief introduction <a href=\"https:\/\/docs.arduino.cc\/tutorials\/generic\/introduction-to-the-serial-peripheral-interface\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\r\n<p>Here is the sketch:<\/p>\r\n\n<div class=\"scroll-paragraph-long\">\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"spi_eeprom_without_lib.ino\" data-enlighter-title=\"spi_eeprom_without_lib.ino\">#include &lt;SPI.h&gt;\r\n#define READ 0x03\r\n#define WRITE 0x02\r\n#define WREN 0x06  \/\/ write enable\r\n\r\nconst int csPin = 10;\r\nconst int wpPin = 9; \/\/ For this sketch you could also leave the wpPin unconnected\r\nconst int writeCycle = 5;\r\n\r\nvoid setup(){\r\n  pinMode(csPin, OUTPUT);\r\n  digitalWrite(csPin, HIGH);\r\n  pinMode(wpPin, OUTPUT);\r\n  digitalWrite(wpPin,HIGH);\r\n  SPI.begin();\r\n  Serial.begin(9600);\r\n \r\n  int intToWrite = 42;\r\n  eepromWriteInt(4, intToWrite);\r\n  intToWrite = -1111;\r\n  eepromWriteInt(6, intToWrite);\r\n  \r\n  int intToRead = 0;\r\n  intToRead = eepromReadInt(4);\r\n  Serial.print(\"intToRead (Address = 4): \");\r\n  Serial.println(intToRead);\r\n  intToRead = 0;\r\n  intToRead = eepromReadInt(6);\r\n  Serial.print(\"intToRead (Address = 6): \");\r\n  Serial.println(intToRead);\r\n}\r\n\r\nvoid loop(){}\r\n\r\nvoid eepromWriteEnable(){\r\n  digitalWrite(csPin, LOW);\r\n  SPI.transfer(WREN); \r\n  digitalWrite(csPin, HIGH);\r\n}\r\n\r\nvoid eepromWriteInt(int addr, int value){\r\n  eepromWriteEnable();\r\n  \/\/ If you want to change the SPI clock speed, uncomment the following line and adjust\r\n  \/\/SPI.beginTransaction(SPISettings(4000000, MSBFIRST, SPI_MODE0));\r\n  digitalWrite(csPin, LOW);\r\n  SPI.transfer(WRITE);\r\n  SPI.transfer((byte)(addr&gt;&gt;8));\r\n  SPI.transfer((byte)(addr&amp;0xFF));\r\n  SPI.transfer((byte)(value&gt;&gt;8));\r\n  SPI.transfer((byte)(value&amp;0xFF));\r\n  digitalWrite(csPin, HIGH);\r\n  \/\/SPI.endTransaction(); \/\/ Uncomment if you have uncommented SPI.beginTransaction()\r\n  delay(writeCycle);\r\n}\r\n\r\nint eepromReadInt(int addr){\r\n  byte MSB = 0;\r\n  byte LSB = 0;\r\n  int value = 0; \r\n  \/\/SPI.beginTransaction(SPISettings(4000000, MSBFIRST, SPI_MODE0));\r\n  digitalWrite(csPin, LOW);\r\n  SPI.transfer(READ); \r\n  SPI.transfer((byte)(addr&gt;&gt;8));\r\n  SPI.transfer((byte)(addr&amp;0xFF));\r\n  MSB = SPI.transfer(0x00);\r\n  LSB = SPI.transfer(0x00);\r\n  digitalWrite(csPin, HIGH);\r\n  \/\/SPI.endTransaction();\r\n  value = (int)((MSB&lt;&lt;8)|LSB);\r\n  return value;\r\n}<\/pre>\r\n<p>&nbsp;<\/p>\r\n<\/div>\r\n\n<p>And here is the expected output:<\/p>\r\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/output_spi_eeprom_without_lib.png\"><img loading=\"lazy\" decoding=\"async\" width=\"716\" height=\"112\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/output_spi_eeprom_without_lib.png\" alt=\"Output of spi_eeprom_without_lib.ino\" class=\"wp-image-14060\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/output_spi_eeprom_without_lib.png 716w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/output_spi_eeprom_without_lib-300x47.png 300w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/><\/a><figcaption class=\"wp-element-caption\">Output of spi_eeprom_without_lib.ino<\/figcaption><\/figure>\n\n<p>Just a few explanations:<\/p>\r\n<ul>\r\n<li>The SPI EEPOMs &#8220;understand&#8221; up to eleven different instructions. The sketch uses three of them:\r\n<ul>\r\n<li><strong>WREN<\/strong>&nbsp; (Write Enable): Sets the write enable bit in the status register of the EEPROM. After a successful write process, the bit is disabled.<\/li>\r\n<li><strong>WRITE<\/strong>: Initiates the write operation.<\/li>\r\n<li><strong>READ<\/strong>: Initiates the read operation.<\/li>\r\n<\/ul>\r\n<\/li>\r\n<li>After sending the data to be written, i.e. each time the chip select pin goes HIGH again, you must wait for the write cycle time.<\/li>\r\n<li>The sketch will not work if you split an integer so that it is written to two pages. Try it out: For example, if the page size of your SPI EEPROM is 128 bytes, then write an integer to the address 127. When reading, you get an incorrect value.<\/li>\r\n<\/ul>\r\n\n<p>This issue is not the only shortcoming of the sketch. If you use other variable types such as strings, floats, or arrays instead of integer values, you&#8217;ll need to adjust it accordingly. In addition, there are several features such as write protection and the hold function that have not yet been considered here. All this could be added &#8220;manually&#8221; to the sketch, but the easier way is to use a library.&nbsp;<\/p>\r\n\n<h2 class=\"wp-block-heading\">Library for SPI EEPROMs<\/h2>\n\n<p>My library EEPROM_SPI_WE can be found <a href=\"https:\/\/github.com\/wollewald\/EEPROM_SPI_WE\" target=\"_blank\" rel=\"noopener\">here<\/a> on GitHub, or you can install it via the library manager of the Arduino IDE. Using a few example sketches, I introduce its functions. The example sketches are part of the library, so you can also access them directly from the Arduino IDE.<\/p>\r\n\n<h3 class=\"wp-block-heading\">Reading and writing different types of variables<\/h3>\n\n<p>If you have connected your SPI-based EEPROM to the microcontroller of your choice, then take the following sketch and adjust the CS and WP pins if necessary. This sketch does not require the WP pin. You can leave it unconnected if you like.&nbsp; <\/p>\r\n<p><code>setPageSize()<\/code> will tell the library the page size of your SPI EEPROM. You can adjust the SPI clock rate using <code>setSPIClockSpeed()<\/code>. The default I have implemented is 8 MHz. However, there is a problem if your EEPROM is incompatible with 8 MHz. Therefore, you can also pass the desired SPI clock rate when creating the EEPROM_SPI_WE object.<\/p>\r\n<p>There are several options for creating the EEPROM_SPI_WE objects. If you want to use the two available SPI interfaces of an ESP32, then you can pass the SPI objects to the EEPROM_SPI_WE objects<\/p>\r\n\n<div class=\"scoll-paragraph-long\">\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"EEPROM_SPI_WE_basic_read_write.ino\" data-enlighter-title=\"EEPROM_SPI_WE_basic_read_write.ino\">#include &lt;SPI.h&gt;\r\n#include &lt;EEPROM_SPI_WE.h&gt;\r\nconst int csPin = 10; \/\/ Chip select pin\r\nconst int wpPin = 9;  \/\/ Write protect pin (optional)\r\n\r\n\/* There are different options to create your EEPROM_SPI_WE object:\r\n * EEPROM_SPI_WE myEEP = EEPROM_SPI_WE(csPin, wpPin, spiClockSpeed); \/\/ e.g. uint32t spiClockSpeed = 4000000\r\n * EEPROM_SPI_WE myEEP = EEPROM_SPI_WE(csPin, wpPin);\r\n * EEPROM_SPI_WE myEEP = EEPROM_SPI_WE(csPin); \r\n * EEPROM_SPI_WE myEEP = EEPROM_SPI_WE(&amp;SPI, csPin, wpPin, spiClockSpeed); \r\n * EEPROM_SPI_WE myEEP = EEPROM_SPI_WE(&amp;SPI, csPin, wpPin);  \r\n * EEPROM_SPI_WE myEEP = EEPROM_SPI_WE(&amp;SPI, csPin);  \r\n * If you don't define the wpPin and you connect it to GND or VCC,  \r\n * then protectStatusRegister() is the only function that won't work.\r\n * Passing the SPI object allows you, for example, to use both SPI \r\n * interfaces on the ESP32.\r\n *\/\r\n  EEPROM_SPI_WE myEEP = EEPROM_SPI_WE(csPin, wpPin);\r\n\r\nvoid setup(){\r\n  Serial.begin(9600);\r\n  if(myEEP.init()){\r\n    Serial.println(\"EEPROM connected\");\r\n  }\r\n  else{\r\n    Serial.println(\"EEPROM does not respond\");\r\n    while(1);\r\n  }\r\n  \/* You can change the SPI clock speed also after you have created your \r\n   * object. The default is 8 MHz. Check the data sheet which clock speed is \r\n   * allowed. The frequency limit migh also depend on the voltage. \r\n   *\/\r\n  \/\/myEEP.setSPIClockSpeed(4000000); \/\/ use AFTER init()!\r\n  \r\n  \/* Select the page size of your EEPROM.\r\n   * Choose EEPROM_PAGE_SIZE_xxx,  \r\n   * with xxx = 16, 32, 64, 128 or 256\r\n   *\/\r\n  myEEP.setPageSize(EEPROM_PAGE_SIZE_32);\r\n\r\n  byte byteToWrite = 42; \r\n  myEEP.write(10, byteToWrite);  \/\/ write a byte to EEPROM address 10\r\n  byte byteToRead = myEEP.read(10);\r\n  Serial.print(\"Byte read: \");\r\n  Serial.println(byteToRead);\r\n\r\n  int intToWrite = -4242; \r\n  int intToRead = 0;\r\n  myEEP.put(10, intToWrite); \/\/ write an integer to EEPROM address 10\r\n  myEEP.get(10, intToRead);\r\n  Serial.print(\"Integer read: \");\r\n  Serial.println(intToRead);\r\n\r\n  float floatToWrite = 42.42; \r\n  float floatToRead = 0.0; \r\n  myEEP.put(10, floatToWrite);\r\n  myEEP.get(10, floatToRead);\r\n  Serial.print(\"Float read: \");\r\n  Serial.println(floatToRead);\r\n\r\n  char charArrayToWrite[] = \"This is no poetry, I am just a simple char array\"; \r\n  myEEP.put(110, charArrayToWrite);  \/\/ write stringToWrite to address 110\r\n  char charArrayToRead[60] = \"\";  \/\/ reserve sufficient space \r\n  myEEP.get(110, charArrayToRead);\r\n  Serial.print(\"Char array read: \");\r\n  Serial.println(charArrayToRead);\r\n\r\n  String stringToWrite = \"Hello, I am a test string\";\r\n  unsigned int nextAddr = myEEP.putString(200, stringToWrite);   \/\/ String objects need a different put function\r\n  \r\n  String stringToRead = \"\";\r\n  myEEP.getString(200, stringToRead);\r\n  Serial.print(\"String read: \");\r\n  Serial.println(stringToRead);\r\n  Serial.print(\"Next free address: \");\r\n  Serial.println(nextAddr);\r\n\r\n  int intArrayToWrite[20];\r\n  int intArrayToRead[20];\r\n  for(unsigned int i=0; i&lt;(sizeof(intArrayToWrite)\/sizeof(int)); i++){\r\n    intArrayToWrite[i] = 10*i;\r\n  } \r\n  myEEP.put(250, intArrayToWrite);\r\n  myEEP.get(250, intArrayToRead);\r\n  for(unsigned int i=0; i&lt;(sizeof(intArrayToRead)\/sizeof(int)); i++){\r\n    Serial.print(\"intArrayToRead[\");\r\n    Serial.print(i);\r\n    Serial.print(\"]: \");\r\n    Serial.println(intArrayToRead[i]);\r\n  }  \r\n}\r\n  \r\nvoid loop(){}\r\n<\/pre>\r\n<p>\u00a0<\/p>\r\n<\/div>\r\n\n<p>The sketch provides the following output:<\/p>\r\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/05\/output_EEPROM_SPI_WE_basic_read_write-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"875\" height=\"390\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/05\/output_EEPROM_SPI_WE_basic_read_write-1.png\" alt=\"SPI EEPROMs: Output of EEPROM_SPI_WE_basic_read_write.ino\" class=\"wp-image-18058\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/05\/output_EEPROM_SPI_WE_basic_read_write-1.png 875w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/05\/output_EEPROM_SPI_WE_basic_read_write-1-300x134.png 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/05\/output_EEPROM_SPI_WE_basic_read_write-1-768x342.png 768w\" sizes=\"auto, (max-width: 875px) 100vw, 875px\" \/><\/a><figcaption class=\"wp-element-caption\">Output of EEPROM_SPI_WE_basic_read_write.ino<\/figcaption><\/figure>\n\n<p>Just a few explanations:<\/p>\r\n<ul>\r\n<li><code>write()<\/code> writes a variable of type &#8220;byte&#8221;.<\/li>\r\n<li>With <code>read()<\/code> you read a variable of type &#8220;byte&#8221;.<\/li>\r\n<li><code>put()<\/code> writes a variable to a specific (start) address.\r\n<ul>\r\n<li>The function is flexible regarding variable types.<\/li>\r\n<li>You don&#8217;t have to worry about the page sizes and limits. The library manages cross-page writing in the background.<\/li>\r\n<\/ul>\r\n<\/li>\r\n<li>With <code>get()<\/code> you can read different variable types from the EEPROM.<\/li>\r\n<li><code>putString()<\/code> \/ <code>getString()<\/code> are the put\/get equivalents for string objects.<\/li>\r\n<\/ul>\r\n\n<h3 class=\"wp-block-heading\">Using small EEPROMs<\/h3>\n\n<p>Small EEPROMs like the 25LC0x0 or ST950x0 series (with x = 1, 2, 4) are addressed differently than their larger siblings. In addition, the range of functions is smaller. If you use these EEPROMS, then you have to add a <code>setSmallEEPROM()<\/code> in the sketch. The library contains an example sketch.<\/p>\r\n\n<h3 class=\"wp-block-heading\">Speed up writing with continuousPut()<\/h3>\n\n<p>After a write() statement, a put() statement, or when the current page is full, you must wait for the write cycle to complete. The library does this in the background by querying the WIP bit (Write in Progress) in the status register of the EEPROM. This is slightly faster than using the <code>delay()<\/code> maximum write cycle time.<\/p>\r\n<p>Imagine you want to write the measured values of a sensor in high frequency to the EEPROM, and do this one by one with the put() instruction. The write cycle times will add up to considerable values. A remedy could be found by buffering the values in an array and then transferring the array to the EEPROM. Depending on the size of the array, you will consume a corresponding amount of RAM.<\/p>\r\n<p>I have therefore implemented a function <code>continuousPut()<\/code> that does not complete the write process. You have to initiate it with <code>continuousPutEnable()<\/code> and complete it with <code>continuousPutDisable()<\/code>. In between, you can execute as many <code>continuousPut()<\/code> instructions as you want. The write cycle time only comes into play when changing the page or when executing <code>continuousPutDisable()<\/code>.<\/p>\r\n<p>And now imagine that your sensor is also connected via SPI and via the same MISO, MOSI and SCK lines as the EEPROM. To switch between the EEPROM and the sensor, the microcontroller would have to switch the CS line to the EEPROM to HIGH. This would complete an ongoing write process and require a write cycle waiting time. This is where the HOLD-pin comes into play. On LOW, it pauses the write process and does not complete it.<\/p>\r\n<p>The following sketch explains the use of the functions and shows the time saved by <code>continuousPut()<\/code>:<\/p>\r\n\n<div class=\"scroll-paragraph-long\">\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"EEPROM_SPI_WE_continuous_put.ino\" data-enlighter-title=\"EEPROM_SPI_WE_continuous_put.ino\">#include &lt;SPI.h&gt;\r\n#include &lt;EEPROM_SPI_WE.h&gt;\r\nconst int csPin = 10; \/\/ Chip select pin\r\nconst int wpPin = 9;  \/\/ Write protect pin (optional)\r\nconst int holdPin = 5; \/\/ Hold pin, pauses SPI transaction if LOW\r\n\r\nEEPROM_SPI_WE myEEP = EEPROM_SPI_WE(csPin, wpPin);\r\n\r\nvoid setup(){\r\n  Serial.begin(9600);\r\n  pinMode(holdPin,OUTPUT);\r\n  digitalWrite(holdPin, HIGH);\r\n  if(myEEP.init()){\r\n    Serial.println(\"EEPROM connected\");\r\n  }\r\n  else{\r\n    Serial.println(\"EEPROM does not respond\");\r\n    while(1);\r\n  }\r\n  \/* You can change the SPI clock speed. The default of is 8 MHz *\/\r\n  \/\/myEEP.setSPIClockSpeed(4000000); \/\/ use AFTER init()!\r\n  \r\n  \/* Select the page size of your EEPROM.\r\n   * Choose EEPROM_PAGE_SIZE_xxx,  \r\n   * with xxx = 16, 32, 64, 128 or 256\r\n   *\/\r\n  myEEP.setPageSize(EEPROM_PAGE_SIZE_128);\r\n\r\n  unsigned int address = 0;\r\n  unsigned long writeDuration = 0;\r\n  unsigned long startTime = millis();\r\n\r\n  \/* Conventional way of writing: \r\n   * For each call of put() you have to wait the write cycle \r\n   * time (~4 ms).\r\n   *\/\r\n  myEEP.put(125,0);\r\n  myEEP.put(127, 1111);\r\n  myEEP.put(129, 2222);\r\n  myEEP.put(131, 3333);\r\n  myEEP.put(133, 4444);\r\n  myEEP.put(135, 5555);\r\n  myEEP.put(137, 6666);\r\n  myEEP.put(139, 7777);\r\n  myEEP.put(141, 8888);\r\n  myEEP.put(143, 9999);\r\n  writeDuration = millis() - startTime;\r\n  Serial.print(\"Time needed for discontinuous writing [ms]: \");\r\n  Serial.println(writeDuration); \r\n  \r\n  \/* Continuous writing:  \r\n   * You only need to wait the write cycle time when a page is \r\n   * completed and when calling continuousPutDisable().\r\n   * In this example the page is completed after writing to address 127.\r\n   *\/\r\n  address = 125;\r\n  startTime = millis();\r\n  myEEP.continuousPutEnable(address); \/\/ start address\r\n  myEEP.continuousPut(9999);\r\n  myEEP.continuousPut(8888);\r\n  myEEP.continuousPut(7777);\r\n  myEEP.continuousPut(6666);\r\n  myEEP.continuousPut(5555);\r\n  myEEP.continuousPut(4444);\r\n  myEEP.continuousPut(3333);\r\n  myEEP.continuousPut(2222);\r\n  myEEP.continuousPut(1111);\r\n  myEEP.continuousPut(0);\r\n  myEEP.continuousPutDisable();\r\n  writeDuration = millis() - startTime;\r\n  \r\n  Serial.print(\"Time needed for continuous writing incl. page change [ms]: \");\r\n  Serial.println(writeDuration);\r\n  \/* Just to check that writing worked fine: *\/\r\n  int intToRead;\r\n  address = 125;\r\n  for(unsigned int i=0; i&lt;10; i++){\r\n    myEEP.get(address, intToRead);\r\n    address += sizeof(int);\r\n    Serial.println(intToRead);\r\n  }\r\n \r\n  \/* Another continuous writing:  \r\n   * Here writing starts at address 0. If your page size is &gt;= 32 you will write\r\n   * everything into one page. So, only one write cycle waiting time is needed at \r\n   * the end. \r\n   *\/\r\n  address = 0;\r\n  startTime = millis();\r\n  myEEP.continuousPutEnable(address);\r\n  myEEP.continuousPut(0);\r\n  myEEP.continuousPut(1111);\r\n  myEEP.continuousPut(2222);\r\n  myEEP.continuousPut(3333);\r\n  myEEP.continuousPut(4444);\r\n  myEEP.continuousPut(5555);\r\n  myEEP.continuousPut(6666);\r\n  myEEP.continuousPut(7777);\r\n  myEEP.continuousPut(8888);\r\n  myEEP.continuousPut(9999);\r\n  myEEP.continuousPutDisable();\r\n  writeDuration = millis() - startTime;\r\n  Serial.print(\"Time needed for continuous writing without page change [ms]: \");\r\n  Serial.println(writeDuration); \r\n\r\n  \/* The next example shows how to use the hold pin *\/ \r\n  address = 0;\r\n  myEEP.continuousPutEnable(address);\r\n  myEEP.continuousPut(999);\r\n  myEEP.continuousPut(888);\r\n  myEEP.continuousPut(777);\r\n  myEEP.continuousPut(666);\r\n  digitalWrite(holdPin,LOW);\r\n  \/* With the hold pin low you can now use the SPI lines to control other \r\n     devices. The current SPI transaction with the EEPOM is just paused \r\n     (CS pin is still LOW). After the hold Pin is back to HIGH you can continue \r\n     the former transaction.\r\n   *\/\r\n  digitalWrite(holdPin,HIGH);\r\n  myEEP.continuousPut(555);\r\n  myEEP.continuousPut(444);\r\n  myEEP.continuousPutDisable();\r\n  \/* Just to show that writing worked fine: *\/\r\n  address = 0;\r\n  for(unsigned int i=0; i&lt;10; i++){\r\n    myEEP.get(address, intToRead);\r\n    address += sizeof(int);\r\n    Serial.println(intToRead);\r\n  } \r\n}\r\n  \r\nvoid loop(){}<\/pre>\r\n<p>&nbsp;<\/p>\r\n<\/div>\r\n\n<p>Here is the output:<\/p>\r\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Output_EEPROM_SPI_WE_continuous_put.png\"><img loading=\"lazy\" decoding=\"async\" width=\"938\" height=\"488\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Output_EEPROM_SPI_WE_continuous_put.png\" alt=\"Output of EEPROM_SPI_WE_continuous_put.ino\" class=\"wp-image-14069\" style=\"width:840px;height:437px\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Output_EEPROM_SPI_WE_continuous_put.png 938w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Output_EEPROM_SPI_WE_continuous_put-300x156.png 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Output_EEPROM_SPI_WE_continuous_put-768x400.png 768w\" sizes=\"auto, (max-width: 938px) 100vw, 938px\" \/><\/a><figcaption class=\"wp-element-caption\">Output of EEPROM_SPI_WE_continuous_put.ino<\/figcaption><\/figure>\n\n<h4 class=\"wp-block-heading\">Interpretation<\/h4>\n\n<p>The sketch contains four writing sequences. Since I choose the start address 125 in the first two writing sequences, there will definitely be a page change. For the third write sequence (start at address 0) there is no page change, unless you use an EEPROM with a page size of 16 bytes. The result:<\/p>\r\n<ul>\r\n<li>45 milliseconds for: 10 x put() + 2 write cycle times<\/li>\r\n<li>8 milliseconds for: 10 x continuousPut() + 2 write cycle times<\/li>\r\n<li>4 milliseconds for: 10 x continuousPut() + 1 write cycle time<\/li>\r\n<\/ul>\r\n\n<p>The last write sequence only shows how to use the hold pin.&nbsp;<\/p>\r\n\n<h3 class=\"wp-block-heading\">Sleep mode and write protection <\/h3>\n\n<p>With the following sketch, I want to show how to send the EEPROM to sleep mode and how to write protect its memory or status register.<\/p>\r\n<ul>\r\n<li><code>deepPowerDown()<\/code> initiates the deep sleep of the SPI EEPROM.\r\n<ul>\r\n<li>The sketch shows that the EEPROM cannot be read in deep sleep.<\/li>\r\n<\/ul>\r\n<\/li>\r\n<li><code>powerUpAndReadID()<\/code> wakes up the EEPROM and provides its ID.<\/li>\r\n<li><code>writeProtect(parameter)<\/code> enables the write protection of the EEPROM.\r\n<ul>\r\n<li>You can protect it completely, only the upper half of the address space or the upper quarter.<\/li>\r\n<li>The parameter <code>PROTECT_NONE<\/code> disables the write protection.<\/li>\r\n<li>Setting the WP-pin to LOW alone does not enable write protection. In <strong>addition<\/strong>, the WPEN bit (Write Protect Enable Bit) must be set in the status register.<\/li>\r\n<\/ul>\r\n<\/li>\r\n<li><code>protectStatusRegister(true\/false);<\/code> enables read-only protection for the status register, but this only applies to the WPEN bit and the bits for setting the address space to be protected. <\/li>\r\n<\/ul>\r\n<p>It&#8217;s a bit confusing to understand what <code>protectStatusRegister()<\/code> exactly does it. I hope the following sketch makes it a bit clearer.<\/p>\r\n\n<div class=\"scroll-paragraph-long\">\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"EEPROM_SPI_WE_sleep_and_protect.ino\" data-enlighter-title=\"EEPROM_SPI_WE_sleep_and_protect.ino\">#include &lt;SPI.h&gt;\r\n#include &lt;EEPROM_SPI_WE.h&gt;\r\nconst int csPin = 10; \/\/ Chip select pin\r\nconst int wpPin = 9;  \/\/ Write protect pin (needed for this example sketch)\r\n\r\n\/* There are different options to create your EEPROM_SPI_WE object:\r\n * EEPROM_SPI_WE myEEP = EEPROM_SPI_WE(csPin, wpPin);\r\n * EEPROM_SPI_WE myEEP = EEPROM_SPI_WE(csPin); \r\n * EEPROM_SPI_WE myEEP = EEPROM_SPI_WE(&amp;SPI, csPin, wpPin);  \r\n * EEPROM_SPI_WE myEEP = EEPROM_SPI_WE(&amp;SPI, csPin);  \r\n * If you don't define the wpPin and you connect it to GND or VCC,  \r\n * then protectStatusRegister() is the only function that won't work.\r\n * Passing the SPI object allows you, for example, to use both SPI \r\n * interfaces on the ESP32.\r\n *\/\r\n  EEPROM_SPI_WE myEEP = EEPROM_SPI_WE(csPin, wpPin);\r\n\r\nvoid setup(){\r\n  Serial.begin(9600);\r\n  if(myEEP.init()){\r\n    Serial.println(\"EEPROM connected\");\r\n  }\r\n  else{\r\n    Serial.println(\"EEPROM does not respond\");\r\n    while(1);\r\n  }\r\n  \/* You can change the SPI clock speed. The default of is 8 MHz *\/\r\n  \/\/myEEP.setSPIClockSpeed(4000000); \/\/ use AFTER init()!\r\n  \r\n  \/* Select the page size of your EEPROM.\r\n   * Choose EEPROM_PAGE_SIZE_xxx,  \r\n   * with xxx = 16, 32, 64, 128 or 256\r\n   *\/\r\n  myEEP.setPageSize(EEPROM_PAGE_SIZE_128);\r\n\r\n  int testInt = 42;\r\n  myEEP.put(50, testInt);\r\n  Serial.print(\"testInt: \");\r\n  Serial.println(testInt);\r\n  Serial.println(\"Going in deep power down mode...\");\r\n  myEEP.deepPowerDown();\r\n  Serial.println(\"Trying to read testInt... \");\r\n  myEEP.get(50, testInt);\r\n  Serial.print(\"testInt: \");\r\n  Serial.println(testInt);\r\n  Serial.println(\"Releasing from deep power down  mode...\");\r\n  byte id = myEEP.powerUpAndReadID();\r\n  Serial.print(\"testInt: \");\r\n  myEEP.get(50, testInt);\r\n  Serial.println(testInt);\r\n  Serial.print(\"Device ID: 0x\");\r\n  Serial.println(id, HEX);\r\n  Serial.println(\"\");\r\n\r\n\/* You can write protect the device. The following options are available:\r\n * PROTECT_ALL              Complete write protection;\r\n * PROTECT_UPPER_QUARTER    Protect the upper quarter; \r\n * PROTECT_UPPER_HALF       Protect the upper half;\r\n * PROTECT_NONE             No write protection\r\n *\/\r\n  myEEP.writeProtect(PROTECT_ALL);\r\n  Serial.println(\"Protecting Device, trying to overwrite testInt...\");\r\n  myEEP.put(50, 4321);\r\n  myEEP.writeProtect(PROTECT_NONE);\r\n  Serial.print(\"testInt: \");\r\n  myEEP.get(50, testInt);\r\n  Serial.println(testInt);\r\n  Serial.println(\"Protection removed, trying to overwrite testInt again...\");\r\n  myEEP.put(50, 4321);\r\n  myEEP.get(50, testInt);\r\n  Serial.print(\"testInt: \");\r\n  Serial.println(testInt);\r\n  Serial.println(\"\");\r\n\r\n  Serial.println(\"Protecting status register...\");\r\n  myEEP.protectStatusRegister(true);  \/\/protects the non-volatile bits of status register\r\n  Serial.println(\"Trying to protect device...\");\r\n  myEEP.writeProtect(PROTECT_ALL);\r\n  Serial.println(\"Now overwriting testInt...\");\r\n  myEEP.put(50, 1234);\r\n  myEEP.get(50, testInt);\r\n  Serial.print(\"testInt: \");\r\n  Serial.println(testInt);\r\n  Serial.println(\"Status register protection prevented changing the device protection!\");\r\n  myEEP.protectStatusRegister(false);\r\n}\r\n  \r\nvoid loop(){}<\/pre>\r\n<p>&nbsp;<\/p>\r\n<\/div>\r\n\n<p>Here is the output:<\/p>\r\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/output_EEPROM_SPI_WE_sleep_and_protect.png\"><img loading=\"lazy\" decoding=\"async\" width=\"868\" height=\"457\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/output_EEPROM_SPI_WE_sleep_and_protect.png\" alt=\"Output of EEPROM_SPI_WE_sleep_and_protect.ino\" class=\"wp-image-14073\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/output_EEPROM_SPI_WE_sleep_and_protect.png 868w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/output_EEPROM_SPI_WE_sleep_and_protect-300x158.png 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/output_EEPROM_SPI_WE_sleep_and_protect-768x404.png 768w\" sizes=\"auto, (max-width: 868px) 100vw, 868px\" \/><\/a><figcaption class=\"wp-element-caption\">Output of EEPROM_SPI_WE_sleep_and_protect.ino<\/figcaption><\/figure>\n\n<p>Despite calling <code>myEEP.writeProtect(PROTECT_ALL)<\/code>, testInt can be overwritten at the end of the sketch because the status register was previously write-protected.&nbsp;<\/p>\r\n\n<h3 class=\"wp-block-heading\">Erase functions<\/h3>\n\n<p>The larger SPI EEPROMs have erase functions. If in doubt, check the data sheet to see if this applies to your EEPROM &#8211; or try out the next sketch.<\/p>\r\n<ul>\r\n<li><code>erasePage(address)<\/code> deletes the page in which &#8220;address&#8221; is located. Which address you specify within the page does not matter.<\/li>\r\n<li><code>eraseSector(address)<\/code> deletes the sector where the address is located. For example, the 25LC512 has 4 sectors.<\/li>\r\n<li><code>eraseCompleteEEPROM()<\/code> does what the name suggests: the entire EEPROM is deleted.<\/li>\r\n<\/ul>\r\n<p>What does &#8220;delete&#8221; actually mean? There is always a value at any address. That is why the term is somewhat misleading. For the functions described here, 255 (0xFF) is written to each memory address to be erased. If you read an integer value from a deleted memory, you will get 0xFFFF = -1.<\/p>\r\n\n<div class=\"scroll-paragraph-long\">\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"EEPROM_SPI_WE_erase.ino\" data-enlighter-title=\"EEPROM_SPI_WE_erase.ino\">#include &lt;SPI.h&gt;\r\n#include &lt;EEPROM_SPI_WE.h&gt;\r\nconst int csPin = 10; \/\/ Chip select pin\r\nconst int wpPin = 9;  \/\/ Write protect pin (optional)\r\n\r\n\/* There are different options to create your EEPROM_SPI_WE object:\r\n * EEPROM_SPI_WE myEEP = EEPROM_SPI_WE(csPin, wpPin);\r\n * EEPROM_SPI_WE myEEP = EEPROM_SPI_WE(csPin); \r\n * EEPROM_SPI_WE myEEP = EEPROM_SPI_WE(&amp;SPI, csPin, wpPin);  \r\n * EEPROM_SPI_WE myEEP = EEPROM_SPI_WE(&amp;SPI, csPin);  \r\n * If you don't define the wpPin and you connect it to GND or VCC,  \r\n * then protectStatusRegister() is the only function that won't work.\r\n * Passing the SPI object allows you, for example, to use both SPI \r\n * interfaces on the ESP32.\r\n *\/\r\n  EEPROM_SPI_WE myEEP = EEPROM_SPI_WE(csPin, wpPin);\r\n\r\nvoid setup(){\r\n  Serial.begin(9600);\r\n  if(myEEP.init()){\r\n    Serial.println(\"EEPROM connected\");\r\n  }\r\n  else{\r\n    Serial.println(\"EEPROM does not respond\");\r\n    while(1);\r\n  }\r\n  \/* You can change the SPI clock speed. The default of is 8 MHz *\/\r\n  \/\/myEEP.setSPIClockSpeed(4000000); \/\/ use AFTER init()!\r\n  \r\n  \/* Select the page size of your EEPROM.\r\n   * Choose EEPROM_PAGE_SIZE_xxx,  \r\n   * with xxx = 16, 32, 64, 128 or 256\r\n   *\/\r\n  myEEP.setPageSize(EEPROM_PAGE_SIZE_128);\r\n\r\n  int testInt = 42;\r\n  myEEP.put(10, testInt);\r\n  myEEP.get(10, testInt);\r\n  Serial.print(\"testInt: \");\r\n  Serial.println(testInt);\r\n  Serial.println(\"Erasing page....\");\r\n  myEEP.erasePage(3);  \/\/ choose any address within the page you want to erase\r\n  myEEP.get(10, testInt);\r\n  Serial.print(\"testInt: \");\r\n  Serial.println(testInt);\r\n  Serial.println(\"\");\r\n\r\n  testInt = 42;\r\n  myEEP.put(10, testInt);\r\n  myEEP.get(10, testInt);\r\n  Serial.print(\"testInt: \");\r\n  Serial.println(testInt);\r\n  Serial.println(\"Erasing sector....\");\r\n  myEEP.eraseSector(7); \/\/ choose any address within the sector you want to erase\r\n  myEEP.get(10, testInt);\r\n  Serial.print(\"testInt: \");\r\n  Serial.println(testInt);\r\n  Serial.println(\"\");\r\n  \r\n  testInt = 42;\r\n  myEEP.put(10, testInt);\r\n  myEEP.get(10, testInt);\r\n  Serial.print(\"testInt: \");\r\n  Serial.println(testInt);\r\n  Serial.println(\"Erasing complete EEPROM....\");\r\n  myEEP.eraseCompleteEEPROM();\r\n  myEEP.get(10, testInt);\r\n  Serial.print(\"testInt: \");\r\n  Serial.println(testInt);\r\n\r\n  Serial.print(\"testInt, MSB: \");\r\n  Serial.println(myEEP.read(10), BIN);\r\n  Serial.print(\"testInt, LSB: \");\r\n  Serial.println(myEEP.read(11), BIN);\r\n  Serial.println(\"Erasing means writing 0xFF to all addresses\"); \r\n}\r\n  \r\nvoid loop(){}<\/pre>\r\n<p>&nbsp;<\/p>\r\n<\/div>\r\n\n<p>Here is the output:<\/p>\r\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/output_EEPROM_SPI_WE_erase.png\"><img loading=\"lazy\" decoding=\"async\" width=\"746\" height=\"373\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/output_EEPROM_SPI_WE_erase.png\" alt=\"Deleting SPI EEPROMS - Output of EEPROM_SPI_WE_erase.ino\" class=\"wp-image-14077\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/output_EEPROM_SPI_WE_erase.png 746w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/output_EEPROM_SPI_WE_erase-300x150.png 300w\" sizes=\"auto, (max-width: 746px) 100vw, 746px\" \/><\/a><figcaption class=\"wp-element-caption\">Output of EEPROM_SPI_WE_erase.ino<\/figcaption><\/figure>\n\n<h2 class=\"wp-block-heading\">Reference &#8211; SPI EEPROMs internal<\/h2>\n\n<p>This section is intended for those who are particularly interested but do not feel like reading the data sheet.<\/p>\r\n\n<h3 class=\"wp-block-heading\">Instruction Set<\/h3>\n\n<p>The SPI EEPROMs have a rather limited set of functions (instructions):<\/p>\r\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Instruction_Set-1024x437.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"437\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Instruction_Set-1024x437.png\" alt=\"SPI EEPROMs Instruction Set\" class=\"wp-image-14087\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Instruction_Set-1024x437.png 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Instruction_Set-300x128.png 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Instruction_Set-768x328.png 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Instruction_Set.png 1191w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">SPI EEPROMs Instruction Set<\/figcaption><\/figure>\n\n<p>Not every EEPROM has implemented all of these features. This is especially true for the erase functions.<\/p>\r\n\n<h3 class=\"wp-block-heading\">Status register<\/h3>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Status_Reg-1024x122.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"122\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Status_Reg-1024x122.png\" alt=\"Status register of SPI EEPROMs\" class=\"wp-image-14083\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Status_Reg-1024x122.png 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Status_Reg-300x36.png 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Status_Reg-768x91.png 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Status_Reg-1320x157.png 1320w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Status_Reg.png 1373w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Status register of SPI EEPROMs<\/figcaption><\/figure>\n\n<p>The status register is the only register of the SPI EEPROM. The WPEN bit (Write Protection Enable) and the two BP bits (Block Protection) are not volatile, i.e. the values are retained even after a disconnection from the supply voltage. However, I have set my library so that all bits are set to zero on restart.<\/p>\r\n<p>If you want to write to the EEPROM, you have to set the WEL bit (Write Enable Latch). It is deleted after a successful write or delete operation, a restart or by the WRDI instruction.<\/p>\r\n<p>The BP bits have the following effect (in combination with WPEN):<\/p>\r\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Protection-1024x273.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"273\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Protection-1024x273.png\" alt=\"Effect of the Block Protection Bits of the SPI EEPROMs\" class=\"wp-image-14081\" style=\"width:840px;height:223px\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Protection-1024x273.png 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Protection-300x80.png 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Protection-768x205.png 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Protection.png 1049w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Effect of block protection bits<\/figcaption><\/figure>\n\n<h3 class=\"wp-block-heading\">Write protection<\/h3>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Write_Protection-1024x213.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"213\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Write_Protection-1024x213.png\" alt=\"SPI EEPROMs: Write-protection for the EEPROM and its status register\" class=\"wp-image-14085\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Write_Protection-1024x213.png 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Write_Protection-300x62.png 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Write_Protection-768x160.png 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Write_Protection-1320x275.png 1320w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/Write_Protection.png 1442w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Write protection for the EEPROM and its status register<\/figcaption><\/figure>\n\n<p>The table above describes the effect of the WEL bit, WPEN bit, and WP pin on read-only protection for the EEPROM and its status register.<\/p>\r\n\n<h2 class=\"wp-block-heading\">Acknowledgement <\/h2>\n\n<p>I copied the variable handling of the put() and get() function from the great Sparkfun library <a href=\"https:\/\/github.com\/sparkfun\/SparkFun_External_EEPROM_Arduino_Library\" target=\"_blank\" rel=\"noopener\">SparkFun_External_EEPROM_Arduino_Library<\/a> for I2C EEPROMs. I have introduced this library in my last post.<\/p>\r\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Compared to I2C-based EEPROMs, writing data to SPI EEPROMs is faster, especially for bulk uploads. I explain how this works and will introduce my library for the SPI based EEPROMs. <\/p>\n","protected":false},"author":1,"featured_media":14022,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[565],"tags":[1725,1773,1774,1777,558,1422,1749,1503,1776,1778,1775],"class_list":["post-14680","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-other-parts","tag-eeprom-en","tag-eeprom_spi_we-en","tag-erase","tag-hold-en","tag-library-en-2","tag-library-en-4","tag-page-write-en","tag-spi-en","tag-wp-en","tag-wren-en","tag-write-protection"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>EEPROM Part 3 - External SPI EEPROMs &#8226; Wolles Elektronikkiste<\/title>\n<meta name=\"description\" content=\"Compared to I2C-based EEPROMs, writing data to SPI EEPROMs is faster, especially for bulk uploads. I present my library for the SPI based EEPROMs.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wolles-elektronikkiste.de\/en\/eeprom-part-3-external-spi-eeproms\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"EEPROM Part 3 - External SPI EEPROMs &#8226; Wolles Elektronikkiste\" \/>\n<meta property=\"og:description\" content=\"Compared to I2C-based EEPROMs, writing data to SPI EEPROMs is faster, especially for bulk uploads. I present my library for the SPI based EEPROMs.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wolles-elektronikkiste.de\/en\/eeprom-part-3-external-spi-eeproms\" \/>\n<meta property=\"og:site_name\" content=\"Wolles Elektronikkiste\" \/>\n<meta property=\"article:published_time\" content=\"2022-05-13T18:35:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T20:08:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/EEPROM_SPI_Post.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"1200\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Wolfgang Ewald\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Wolfgang Ewald\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"20 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/eeprom-part-3-external-spi-eeproms#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/eeprom-part-3-external-spi-eeproms\"},\"author\":{\"name\":\"Wolfgang Ewald\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\"},\"headline\":\"EEPROM Part 3 &#8211; External SPI EEPROMs\",\"datePublished\":\"2022-05-13T18:35:53+00:00\",\"dateModified\":\"2023-12-01T20:08:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/eeprom-part-3-external-spi-eeproms\"},\"wordCount\":2068,\"commentCount\":8,\"publisher\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\"},\"image\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/eeprom-part-3-external-spi-eeproms#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/EEPROM_SPI_Post.png\",\"keywords\":[\"EEPROM\",\"EEPROM_SPI_WE\",\"erase\",\"hold\",\"Library\",\"library\",\"Page Write\",\"SPI\",\"WP\",\"WREN\",\"write protection\"],\"articleSection\":[\"Other parts\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/eeprom-part-3-external-spi-eeproms#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/eeprom-part-3-external-spi-eeproms\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/eeprom-part-3-external-spi-eeproms\",\"name\":\"EEPROM Part 3 - External SPI EEPROMs &#8226; Wolles Elektronikkiste\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/eeprom-part-3-external-spi-eeproms#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/eeprom-part-3-external-spi-eeproms#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/EEPROM_SPI_Post.png\",\"datePublished\":\"2022-05-13T18:35:53+00:00\",\"dateModified\":\"2023-12-01T20:08:52+00:00\",\"description\":\"Compared to I2C-based EEPROMs, writing data to SPI EEPROMs is faster, especially for bulk uploads. I present my library for the SPI based EEPROMs.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/eeprom-part-3-external-spi-eeproms#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/eeprom-part-3-external-spi-eeproms\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/eeprom-part-3-external-spi-eeproms#primaryimage\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/EEPROM_SPI_Post.png\",\"contentUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/EEPROM_SPI_Post.png\",\"width\":1200,\"height\":1200},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/eeprom-part-3-external-spi-eeproms#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"EEPROM Part 3 &#8211; External SPI EEPROMs\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#website\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\",\"name\":\"Wolles Elektronikkiste\",\"description\":\"Die wunderbare Welt der Elektronik\",\"publisher\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\",\"name\":\"Wolfgang Ewald\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\",\"contentUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\",\"width\":512,\"height\":512,\"caption\":\"Wolfgang Ewald\"},\"logo\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"EEPROM Part 3 - External SPI EEPROMs &#8226; Wolles Elektronikkiste","description":"Compared to I2C-based EEPROMs, writing data to SPI EEPROMs is faster, especially for bulk uploads. I present my library for the SPI based EEPROMs.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wolles-elektronikkiste.de\/en\/eeprom-part-3-external-spi-eeproms","og_locale":"en_US","og_type":"article","og_title":"EEPROM Part 3 - External SPI EEPROMs &#8226; Wolles Elektronikkiste","og_description":"Compared to I2C-based EEPROMs, writing data to SPI EEPROMs is faster, especially for bulk uploads. I present my library for the SPI based EEPROMs.","og_url":"https:\/\/wolles-elektronikkiste.de\/en\/eeprom-part-3-external-spi-eeproms","og_site_name":"Wolles Elektronikkiste","article_published_time":"2022-05-13T18:35:53+00:00","article_modified_time":"2023-12-01T20:08:52+00:00","og_image":[{"width":1200,"height":1200,"url":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/EEPROM_SPI_Post.png","type":"image\/png"}],"author":"Wolfgang Ewald","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Wolfgang Ewald","Est. reading time":"20 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wolles-elektronikkiste.de\/en\/eeprom-part-3-external-spi-eeproms#article","isPartOf":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/eeprom-part-3-external-spi-eeproms"},"author":{"name":"Wolfgang Ewald","@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46"},"headline":"EEPROM Part 3 &#8211; External SPI EEPROMs","datePublished":"2022-05-13T18:35:53+00:00","dateModified":"2023-12-01T20:08:52+00:00","mainEntityOfPage":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/eeprom-part-3-external-spi-eeproms"},"wordCount":2068,"commentCount":8,"publisher":{"@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46"},"image":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/eeprom-part-3-external-spi-eeproms#primaryimage"},"thumbnailUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/EEPROM_SPI_Post.png","keywords":["EEPROM","EEPROM_SPI_WE","erase","hold","Library","library","Page Write","SPI","WP","WREN","write protection"],"articleSection":["Other parts"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/wolles-elektronikkiste.de\/en\/eeprom-part-3-external-spi-eeproms#respond"]}]},{"@type":"WebPage","@id":"https:\/\/wolles-elektronikkiste.de\/en\/eeprom-part-3-external-spi-eeproms","url":"https:\/\/wolles-elektronikkiste.de\/en\/eeprom-part-3-external-spi-eeproms","name":"EEPROM Part 3 - External SPI EEPROMs &#8226; Wolles Elektronikkiste","isPartOf":{"@id":"https:\/\/wolles-elektronikkiste.de\/en#website"},"primaryImageOfPage":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/eeprom-part-3-external-spi-eeproms#primaryimage"},"image":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/eeprom-part-3-external-spi-eeproms#primaryimage"},"thumbnailUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/EEPROM_SPI_Post.png","datePublished":"2022-05-13T18:35:53+00:00","dateModified":"2023-12-01T20:08:52+00:00","description":"Compared to I2C-based EEPROMs, writing data to SPI EEPROMs is faster, especially for bulk uploads. I present my library for the SPI based EEPROMs.","breadcrumb":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/eeprom-part-3-external-spi-eeproms#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wolles-elektronikkiste.de\/en\/eeprom-part-3-external-spi-eeproms"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wolles-elektronikkiste.de\/en\/eeprom-part-3-external-spi-eeproms#primaryimage","url":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/EEPROM_SPI_Post.png","contentUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2022\/03\/EEPROM_SPI_Post.png","width":1200,"height":1200},{"@type":"BreadcrumbList","@id":"https:\/\/wolles-elektronikkiste.de\/en\/eeprom-part-3-external-spi-eeproms#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https:\/\/wolles-elektronikkiste.de\/en"},{"@type":"ListItem","position":2,"name":"EEPROM Part 3 &#8211; External SPI EEPROMs"}]},{"@type":"WebSite","@id":"https:\/\/wolles-elektronikkiste.de\/en#website","url":"https:\/\/wolles-elektronikkiste.de\/en","name":"Wolles Elektronikkiste","description":"Die wunderbare Welt der Elektronik","publisher":{"@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wolles-elektronikkiste.de\/en?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46","name":"Wolfgang Ewald","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png","url":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png","contentUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png","width":512,"height":512,"caption":"Wolfgang Ewald"},"logo":{"@id":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png"}}]}},"_links":{"self":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/posts\/14680","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/comments?post=14680"}],"version-history":[{"count":0,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/posts\/14680\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/media\/14022"}],"wp:attachment":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/media?parent=14680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/categories?post=14680"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/tags?post=14680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}