{"id":162,"date":"2014-04-15T14:14:24","date_gmt":"2014-04-15T14:14:24","guid":{"rendered":"https:\/\/arduino-developer.com\/arduino\/?p=162"},"modified":"2014-09-26T18:01:00","modified_gmt":"2014-09-26T18:01:00","slug":"eeprom-library","status":"publish","type":"post","link":"https:\/\/arduino-developer.com\/arduino\/programming\/memory\/eeprom\/eeprom-library","title":{"rendered":"EEPROM Library"},"content":{"rendered":"<p>\nThe Arduino&nbsp;microcontrollers have non volatile&nbsp;EEPROM memory built in. The <a href=\"http:\/\/arduino.cc\/en\/Reference\/EEPROM\">EEPROM library<\/a> allows you to read and write those bytes.\n<\/p>\n<p>\nEEPROM Sizes:\n<\/p>\n<p style=\"margin-left: 40px;\">\n1024 bytes\n<\/p>\n<p style=\"margin-left: 80px;\">\nATmega328\n<\/p>\n<p style=\"margin-left: 40px;\">\n512 bytes\n<\/p>\n<p style=\"margin-left: 80px;\">\nATmega168<br \/>\nATmega8\n<\/p>\n<p style=\"margin-left: 40px;\">\n4KB (4096 bytes)\n<\/p>\n<p style=\"margin-left: 80px;\">\nATmega1280<br \/>\nATmega2560.&nbsp;\n<\/p>\n<h4>\nUsing The Library<br \/>\n<\/h4>\n<p>\nNote that you read and write one byte at a time &#8211; there is not an array read and write function.\n<\/p>\n<p>\nDefault eeprom&nbsp;values are 0xFF.\n<\/p>\n<pre>\r\n<code>\r\n#include &lt;EEPROM.h&gt;\r\n\r\n  BYTE value;\r\n  BYTE address;\r\n\r\n  address = 0\r\n  EEPROM.write(address++, 0x50);\r\n  EEPROM.write(address++, 0x51);\r\n\r\n  address = 0\r\n  value = EEPROM.read(address++);\r\n  value = EEPROM.read(address++);\r\n<\/code><\/pre>\n<p>\n&nbsp;\n<\/p>\n<p>\n&nbsp;\n<\/p>\n<p>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Arduino&nbsp;microcontrollers have non volatile&nbsp;EEPROM memory built in. The EEPROM library allows you to read and write those bytes. EEPROM Sizes: 1024 bytes ATmega328 512 bytes ATmega168 ATmega8 4KB (4096 bytes) ATmega1280 ATmega2560.&nbsp; Using The Library Note that you read and write one byte at a time &#8211; there is not an array read and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"class_list":["post-162","post","type-post","status-publish","format-standard","hentry","category-eeprom"],"_links":{"self":[{"href":"https:\/\/arduino-developer.com\/arduino\/wp-json\/wp\/v2\/posts\/162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arduino-developer.com\/arduino\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/arduino-developer.com\/arduino\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/arduino-developer.com\/arduino\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/arduino-developer.com\/arduino\/wp-json\/wp\/v2\/comments?post=162"}],"version-history":[{"count":4,"href":"https:\/\/arduino-developer.com\/arduino\/wp-json\/wp\/v2\/posts\/162\/revisions"}],"predecessor-version":[{"id":166,"href":"https:\/\/arduino-developer.com\/arduino\/wp-json\/wp\/v2\/posts\/162\/revisions\/166"}],"wp:attachment":[{"href":"https:\/\/arduino-developer.com\/arduino\/wp-json\/wp\/v2\/media?parent=162"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/arduino-developer.com\/arduino\/wp-json\/wp\/v2\/categories?post=162"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/arduino-developer.com\/arduino\/wp-json\/wp\/v2\/tags?post=162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}