<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://mat.midlight.eu/index.php?action=history&amp;feed=atom&amp;title=EEPROM_Wear_Leveling_%28AVR101%29</id>
	<title>EEPROM Wear Leveling (AVR101) - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://mat.midlight.eu/index.php?action=history&amp;feed=atom&amp;title=EEPROM_Wear_Leveling_%28AVR101%29"/>
	<link rel="alternate" type="text/html" href="https://mat.midlight.eu/index.php?title=EEPROM_Wear_Leveling_(AVR101)&amp;action=history"/>
	<updated>2026-05-01T09:37:12Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in ProjectWiki</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://mat.midlight.eu/index.php?title=EEPROM_Wear_Leveling_(AVR101)&amp;diff=103&amp;oldid=prev</id>
		<title>Mat: /* Overview */</title>
		<link rel="alternate" type="text/html" href="https://mat.midlight.eu/index.php?title=EEPROM_Wear_Leveling_(AVR101)&amp;diff=103&amp;oldid=prev"/>
		<updated>2013-02-26T00:45:26Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Overview&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;de&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Version vom 26. Februar 2013, 00:45 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Zeile 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Overview ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Overview ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is an implementation of the algorithm described in the [http://www.atmel.com/Images/doc2526.pdf Appnote AVR101] by Atmel. Its purpose is to increase the write cycles for parameters in EEPROM.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is an implementation of the algorithm described in the [http://www.atmel.com/Images/doc2526.pdf Appnote AVR101] by Atmel. Its purpose is to increase the write cycles for parameters &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;stored &lt;/ins&gt;in EEPROM.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To achieve this, there are two ring buffers for each parameter: a status buffer, which keeps track of the last written index and the parameter buffer itself.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To achieve this, there are two ring buffers for each parameter: a status buffer, which keeps track of the last written index and the parameter buffer itself.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mat</name></author>
		
	</entry>
	<entry>
		<id>https://mat.midlight.eu/index.php?title=EEPROM_Wear_Leveling_(AVR101)&amp;diff=102&amp;oldid=prev</id>
		<title>Mat am 24. Februar 2013 um 16:49 Uhr</title>
		<link rel="alternate" type="text/html" href="https://mat.midlight.eu/index.php?title=EEPROM_Wear_Leveling_(AVR101)&amp;diff=102&amp;oldid=prev"/>
		<updated>2013-02-24T16:49:02Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;de&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Version vom 24. Februar 2013, 16:49 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l77&quot; &gt;Zeile 77:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 77:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Wearlevel_write 0&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Wearlevel_write 0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Print &amp;quot;WRITE 0&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Print &amp;quot;WRITE 0&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;End&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;End&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Random_values:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160;  Testbyte = Rnd(255)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160;  Testword = Rnd(65535)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160;  Testsingle = Testword&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160;  Testsingle = Testsingle / 1000&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160;  Testword = Rnd(65535)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Return&lt;/ins&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Download ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Download ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[http://www.braunecker.at/downloads/wear_leveling_1_0.zip Download]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[http://www.braunecker.at/downloads/wear_leveling_1_0.zip Download]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mat</name></author>
		
	</entry>
	<entry>
		<id>https://mat.midlight.eu/index.php?title=EEPROM_Wear_Leveling_(AVR101)&amp;diff=101&amp;oldid=prev</id>
		<title>Mat: Created page with &quot;== Overview == This is an implementation of the algorithm described in the [http://www.atmel.com/Images/doc2526.pdf Appnote AVR101] by Atmel. Its purpose is to increase the write...&quot;</title>
		<link rel="alternate" type="text/html" href="https://mat.midlight.eu/index.php?title=EEPROM_Wear_Leveling_(AVR101)&amp;diff=101&amp;oldid=prev"/>
		<updated>2013-02-24T16:41:27Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Overview == This is an implementation of the algorithm described in the [http://www.atmel.com/Images/doc2526.pdf Appnote AVR101] by Atmel. Its purpose is to increase the write...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Overview ==&lt;br /&gt;
This is an implementation of the algorithm described in the [http://www.atmel.com/Images/doc2526.pdf Appnote AVR101] by Atmel. Its purpose is to increase the write cycles for parameters in EEPROM.&lt;br /&gt;
&lt;br /&gt;
To achieve this, there are two ring buffers for each parameter: a status buffer, which keeps track of the last written index and the parameter buffer itself.&lt;br /&gt;
Because the write cycles are distributed over several EEPROM cells, the life time is increased.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
Include the library at the top of your program:&lt;br /&gt;
&amp;lt;pre&amp;gt;Const Wearlevel_count = [PARAMETER COUNT]                    ' number of parameters to store in eeprom (default: 1)&lt;br /&gt;
' ring buffer size (estimated life time: 100.000 cell write cycles * wearlevel depth)&lt;br /&gt;
'Const Wearlevel_depth = [BUFFER_SIZE]                       ' uncomment to define the buffer sizes (default: 8)&lt;br /&gt;
'Const Wearlevel_start = [EEPROM_START]                      ' uncomment to set EEPROM start address (default: 1)&lt;br /&gt;
$include &amp;quot;wear_leveling.inc&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Define the parameters stored in EEPROM and link them to a SRAM variable:&lt;br /&gt;
&amp;lt;pre&amp;gt;Dim My_parameter As [TYPE]&lt;br /&gt;
Wearlevel_pointer([PARAMETER_ID]) = Varptr(My_parameter)     ' address of variable in SRAM&lt;br /&gt;
Wearlevel_size([PARAMETER_ID]) = [TYPE_SIZE]                 ' byte size of the variable data type&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Load all parameters stored in EEPROM:&lt;br /&gt;
&amp;lt;pre&amp;gt;Wearlevel_read 0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Load specific parameter with ID:&lt;br /&gt;
&amp;lt;pre&amp;gt;Wearlevel_read [PARAMETER_ID]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save all parameters to EEPROM:&lt;br /&gt;
&amp;lt;pre&amp;gt;Wearlevel_write 0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Save specific parameter with ID:&lt;br /&gt;
&amp;lt;pre&amp;gt;Wearlevel_write [PARAMETER_ID]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sample ==&lt;br /&gt;
&amp;lt;pre&amp;gt;$regfile = &amp;quot;m32def.dat&amp;quot;&lt;br /&gt;
$crystal = 16000000&lt;br /&gt;
$baud = 57600&lt;br /&gt;
$framesize = 48&lt;br /&gt;
&lt;br /&gt;
Const Wearlevel_count = 3                                   ' number of parameters to store in eeprom (default: 1)&lt;br /&gt;
' ring buffer size (estimated life time: 100.000 cell write cycles * wearlevel depth)&lt;br /&gt;
'Const Wearlevel_depth = 10                                  ' uncomment to define the buffer sizes (default: 8)&lt;br /&gt;
'Const Wearlevel_start = 20                                  ' uncomment to set EEPROM start address (default: 1)&lt;br /&gt;
$include &amp;quot;wear_leveling.inc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
' define the parameters&lt;br /&gt;
Dim Testbyte As Byte&lt;br /&gt;
Wearlevel_pointer(1) = Varptr(testbyte)                     ' address of variable in SRAM&lt;br /&gt;
Wearlevel_size(1) = 1                                       ' byte size of the variable data type&lt;br /&gt;
&lt;br /&gt;
Dim Testword As Word&lt;br /&gt;
Wearlevel_pointer(2) = Varptr(testword)&lt;br /&gt;
Wearlevel_size(2) = 2&lt;br /&gt;
&lt;br /&gt;
Dim Testsingle As Single&lt;br /&gt;
Wearlevel_pointer(3) = Varptr(testsingle)&lt;br /&gt;
Wearlevel_size(3) = 4&lt;br /&gt;
&lt;br /&gt;
' load all parameter values stored in EEPROM (ID = 0), called usually during the initialisation&lt;br /&gt;
Wearlevel_read 0&lt;br /&gt;
Print &amp;quot;READ 0: [1] &amp;quot; ; Testbyte ; &amp;quot;, [2] &amp;quot; ; Testword ; &amp;quot;, [3] &amp;quot; ; Testsingle&lt;br /&gt;
&lt;br /&gt;
' assign some random values&lt;br /&gt;
Gosub Random_values&lt;br /&gt;
Print &amp;quot;RANDOM: [1] &amp;quot; ; Testbyte ; &amp;quot;, [2] &amp;quot; ; Testword ; &amp;quot;, [3] &amp;quot; ; Testsingle&lt;br /&gt;
&lt;br /&gt;
' just save paramter 2 (Testword)&lt;br /&gt;
Wearlevel_write 2&lt;br /&gt;
Print &amp;quot;WRITE 2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
' load all again&lt;br /&gt;
Wearlevel_read 0&lt;br /&gt;
Print &amp;quot;READ 0: [1] &amp;quot; ; Testbyte ; &amp;quot;, [2] &amp;quot; ; Testword ; &amp;quot;, [3] &amp;quot; ; Testsingle&lt;br /&gt;
&lt;br /&gt;
' new random values&lt;br /&gt;
Gosub Random_values&lt;br /&gt;
Print &amp;quot;RANDOM: [1] &amp;quot; ; Testbyte ; &amp;quot;, [2] &amp;quot; ; Testword ; &amp;quot;, [3] &amp;quot; ; Testsingle&lt;br /&gt;
' save all parameters (ID = 0)&lt;br /&gt;
Wearlevel_write 0&lt;br /&gt;
Print &amp;quot;WRITE 0&amp;quot;&lt;br /&gt;
End&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
[http://www.braunecker.at/downloads/wear_leveling_1_0.zip Download]&lt;/div&gt;</summary>
		<author><name>Mat</name></author>
		
	</entry>
</feed>