<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pl-pl">
<link rel="self" type="application/atom+xml" href="https://forum.atnel.pl/feed.php?f=4&amp;t=17139&amp;mode" />

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2016-12-26T10:53:04+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=4&amp;t=17139&amp;mode</id>
<entry>
<author><name><![CDATA[Nef.ID]]></name></author>
<updated>2016-12-26T10:53:04+01:00</updated>
<published>2016-12-26T10:53:04+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=17139&amp;p=178239#p178239</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=17139&amp;p=178239#p178239"/>
<title type="html"><![CDATA[Re: EEPROM w Atmega32 nie pamięta po resecie.]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=17139&amp;p=178239#p178239"><![CDATA[
Brawo Daro69, jesteś bardzo spostrzegawczy. No patrz, ja na to patrzyłem, a nie widziałem.<br /><br />Ale zrobiłem literówkę! Oczywiście, że masz rację.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=8366">Nef.ID</a> — 26 gru 2016, o 10:53</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Daro69]]></name></author>
<updated>2016-12-26T01:44:21+01:00</updated>
<published>2016-12-26T01:44:21+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=17139&amp;p=178232#p178232</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=17139&amp;p=178232#p178232"/>
<title type="html"><![CDATA[Re: EEPROM w Atmega32 nie pamięta po resecie.]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=17139&amp;p=178232#p178232"><![CDATA[
no nie jestem pewien,<br /><br />chodzi mi o zakomentowane.  <img src="https://forum.atnel.pl/images/smilies/icon_e_confused.gif" alt=":?" title="Boi się" /> <br /><div class="quotetitle">Nef.ID napisał(a):</div><div class="quotecontent"><br />uint8_t stan_odczyt(void){<br />        copy_ram_to_eem(); // &lt;--- ?  &quot;copy_eem_to_ram();&quot;<br />        return ram_nr[0];<br />}<br /></div><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=11549">Daro69</a> — 26 gru 2016, o 01:44</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Nef.ID]]></name></author>
<updated>2016-12-26T00:54:46+01:00</updated>
<published>2016-12-26T00:54:46+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=17139&amp;p=178228#p178228</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=17139&amp;p=178228#p178228"/>
<title type="html"><![CDATA[Re: EEPROM w Atmega32 nie pamięta po resecie.]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=17139&amp;p=178228#p178228"><![CDATA[
Kolego maghost, EESAVE chroni eeprom przy wgrywaniu wsadu do procka, ale tu nie mówimy o tej sytuacji.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=8366">Nef.ID</a> — 26 gru 2016, o 00:54</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[maghost]]></name></author>
<updated>2016-12-26T00:37:26+01:00</updated>
<published>2016-12-26T00:37:26+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=17139&amp;p=178227#p178227</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=17139&amp;p=178227#p178227"/>
<title type="html"><![CDATA[Re: EEPROM w Atmega32 nie pamięta po resecie.]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=17139&amp;p=178227#p178227"><![CDATA[
Kolego, poczytaj w dokumentacji Atmega32 - bit EESAVE<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=14940">maghost</a> — 26 gru 2016, o 00:37</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Nef.ID]]></name></author>
<updated>2016-12-25T22:37:21+01:00</updated>
<published>2016-12-25T22:37:21+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=17139&amp;p=178224#p178224</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=17139&amp;p=178224#p178224"/>
<title type="html"><![CDATA[EEPROM w Atmega32 nie pamięta po resecie.]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=17139&amp;p=178224#p178224"><![CDATA[
Zapisuję jeden bajt w eeprom, a następnie odczytuję go. Jest OK. Zapisał się, bo go odczytuję.<br /><br />Dlaczego więc nie ma go w eepromie, gdy zrobię reset lub wyłączę i włączę zasilanie?<br />Jak sprawdzam:<br />[syntax=c]enum {_disabled, _enabled};<br />if( 6 == command &amp;&amp; !key_time ) {<br />lcd_cls();<br />lcd_locate(0,0);<br />uint8_t buf = stan_odczyt();<br />if ( buf == _enabled ) lcd_char('E');<br />if ( buf == _disabled ) lcd_char('F');<br />}[/syntax]<br />Funkcje:<br />[syntax=c]#include &lt;avr/eeprom.h&gt;<br /><br />#include &quot;eeprom.h&quot;<br /><br /><br />char eem_nr&#91;1&#93; EEMEM;<br />char ram_nr&#91;1&#93;;<br /><br />void copy_eem_to_ram(void){<br />eeprom_read_block(&amp;ram_nr, &amp;eem_nr, sizeof(ram_nr));<br />}<br /><br />void copy_ram_to_eem(void){<br />eeprom_write_block(&amp;ram_nr, &amp;eem_nr, sizeof(ram_nr));<br />}<br /><br />void stan_zapis(uint8_t stan){<br />ram_nr&#91;0&#93;= stan;<br />copy_ram_to_eem();<br />}<br /><br />uint8_t stan_odczyt(void){<br />copy_ram_to_eem();<br />return ram_nr&#91;0&#93;;<br />}[/syntax]<br />Zapisuję:<br />[syntax=c]stan_zapis(1);[/syntax]<br />Przed resetem jest zapisane i odczytane - na LED-debugger  &quot;E&quot;, po reset zawsze &quot;F&quot;.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=8366">Nef.ID</a> — 25 gru 2016, o 22:37</p><hr />
]]></content>
</entry>
</feed>