<?xml version="1.0" encoding="utf-8"?>
				<!-- generator="e107" -->
				<!-- content type="Forum / topic" -->
				<rss  version="2.0">
				<channel>
				<title>8051 Microcontroller Projects AVR PIC Projects Tutorials Ebooks Libraries codes : Forum / topic</title>
				<link>http://www.8051projects.net/</link>
				<description>Learn to make simple microcontroller projects, pic, 8051, avr and arm projects. download 8051 projects, tutorials, libraries, sample codes. join the microcontroller discussion forum and ask doubts regarding electronics. the best source for 8051 over internet.</description>

<language>en-gb</language>
				<copyright><a rel="license" href="http://creativecommons.org/licenses/by-nc/2.5/in/" target="_blank"><img alt="Creative Commons License" width="80" height="15" style="border-width:0" src="http://i.creativecommons.org/l/by-nc/2.5/in/80x15.png" target="_blank" /></a>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc/2.5/in/" target="_blank">Creative Commons Attribution-Noncommercial 2.5 India License</a>.<a href='http://www.8051projects.net/disclaimer.htm' target='_blank' />Rickey's World Disclaimer</a></copyright>
				<managingEditor>Ajay Bhargav - contact@nospam.com</managingEditor>
				<webMaster>contact@nospam.com</webMaster>
				<pubDate>Mon, 01 Dec 2008 23:38:11 -0800</pubDate>
				<lastBuildDate>Mon, 01 Dec 2008 23:38:11 -0800</lastBuildDate>
				<docs>http://backend.userland.com/rss</docs>
				<generator>e107 (http://e107.org)</generator>
				<ttl>60</ttl>
				<textInput>
				<title>Search</title>
				<description>Search 8051 Microcontroller Projects AVR PIC Projects Tutorials Ebooks Libraries codes</description>
				<name>query</name>
				<link>http://www.8051projects.net/search.php</link>
				</textInput>
						<item>
						<title>How to program EEPROM correctly? SAved but recall FAILED</title>
<link>http://www.8051projects.net/forum-t9579.html</link>
<description><![CDATA[Hi,<br />Ajay, this is my last problem, i already solved the INput problems,<br />for pic12f629, to enable the GPIO 4,5 , you must configure the Internal Clock and other config, as below.<br /> __CONFIG   	_CP_OFF &amp; _MCLRE_OFF &amp; _WDT_OFF &amp; _INTRC_OSC_NOCLKOUT &amp; _BODEN_OFF &amp; _CPD_OFF &_PWRTE_OFF<br /><br />This does not been told in the datasheet.<br /><br />By the way, my new problem is i saved my data (0x01) into eeprom address 0x01, when i recall the data it does not recall the same data but something different from it and sometimes i can save the data and recall correctly but sometimes not.<br />What is the problem? is the setting or code problems? i already DOUBLExDouble check it in the DATASHEET for few hours and look for solutions on internet, i still cant recall correctly, PLEASe HELP.I write the data correctly...everytime, when i check in the EEDATA register b4 i reset the MPLAB SIM and rerun again.<br />Code Below, PIC12F629 ,<br />WRITE code from me,<br /><div class='code_asm'>CODE:</div><div class='code_highlight' style='unicode-bidi: embed; direction: ltr'><div class="asm" style="font-family: monospace;">ORIGINAL_PWM <span style="color: #0000ff;">EQU</span> 0x21<br />TEMP <span style="color: #0000ff;">EQU</span> 0x22<br />WRITE:&nbsp; <span style="color: #00007f; font-weight:bold;">BSF</span>&nbsp; &nbsp; &nbsp;STATUS,<span style="color: #ff0000;">5</span><span style="color: #adadad; font-style: italic;">; switch to bank 1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; MOVLW&nbsp; &nbsp;0x01<span style="color: #adadad; font-style: italic;">; go to addr 0x01</span><br />&nbsp; &nbsp; &nbsp; &nbsp; MOVWF&nbsp; &nbsp;EEADR<span style="color: #adadad; font-style: italic;">;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; MOVF&nbsp; &nbsp; ORIGINAL_PWM,w&nbsp; <span style="color: #adadad; font-style: italic;">; (ORIGINAL_PWM = 0x01)</span><br />&nbsp; &nbsp; &nbsp; &nbsp; MOVWF&nbsp; &nbsp;EEDATA<span style="color: #adadad; font-style: italic;">; write 0x01 to EEDATA</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">BSF</span>&nbsp; &nbsp; &nbsp;EECON1,WREN<span style="color: #adadad; font-style: italic;">; &lt; follow the datasheet write process</span><br />&nbsp; &nbsp; &nbsp; &nbsp; BCF&nbsp; &nbsp; &nbsp;INTCON,GIE&nbsp; &nbsp; &nbsp; <span style="color: #adadad; font-style: italic;">;&lt;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; MOVLW&nbsp; &nbsp;H<span style="color: #7f007f;">'0055'</span>&nbsp;<span style="color: #adadad; font-style: italic;">;&lt;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; MOVWF&nbsp; &nbsp;EECON2&nbsp; <span style="color: #adadad; font-style: italic;">;&lt;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; MOVLW&nbsp; &nbsp;H<span style="color: #7f007f;">'00AA'</span> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #adadad; font-style: italic;">;&lt;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; MOVWF&nbsp; &nbsp;EECON2&nbsp; <span style="color: #adadad; font-style: italic;">;&lt;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">BSF</span>&nbsp; &nbsp; &nbsp;EECON1,WR&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #adadad; font-style: italic;">;&lt;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">BSF</span>&nbsp; &nbsp; &nbsp;INTCON,GIE&nbsp; &nbsp; &nbsp; <span style="color: #adadad; font-style: italic;">;&lt;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; BCF&nbsp; &nbsp; &nbsp;STATUS,<span style="color: #ff0000;">5</span><span style="color: #adadad; font-style: italic;">; switch to bank 0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; RETURN<br /><br />READ:&nbsp; &nbsp;<span style="color: #00007f; font-weight:bold;">BSF</span>&nbsp; &nbsp; &nbsp;STATUS,<span style="color: #ff0000;">5</span><span style="color: #adadad; font-style: italic;">; switch to bank 1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; MOVLW&nbsp; &nbsp;0x01<span style="color: #adadad; font-style: italic;">; goto addr 0x01 in eeprom</span><br />&nbsp; &nbsp; &nbsp; &nbsp; MOVWF&nbsp; &nbsp;EEADR<span style="color: #adadad; font-style: italic;">;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00007f; font-weight:bold;">BSF</span>&nbsp; &nbsp; &nbsp;EECON1,RD&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #adadad; font-style: italic;">; read previously saved data 0x01</span><br />&nbsp; &nbsp; &nbsp; &nbsp; MOVF&nbsp; &nbsp; EEDATA,w&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #adadad; font-style: italic;">; move 0x01 to w</span><br />&nbsp; &nbsp; &nbsp; &nbsp; MOVWF&nbsp; &nbsp;TEMP<span style="color: #adadad; font-style: italic;">; (TEMP register ) move 0x01 to TEMP</span><br />&nbsp; &nbsp; &nbsp; &nbsp; BCF&nbsp; &nbsp; &nbsp;STATUS,<span style="color: #ff0000;">5</span><span style="color: #adadad; font-style: italic;">; switch bank 0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; RETURN</div></div><br /><br /><br />Thanks for your help....mmy last problem...]]></description>
<pubDate>Fri, 16 May 2008 01:03:05 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t9579.html</guid>
</item>
						<item>
						<title>Re: How to program EEPROM correctly? SAved but recall FAILED</title>
<link>http://www.8051projects.net/forum-t9579.html</link>
<description><![CDATA[after you set WR bit in EECON1 register you need to poll that bit till the writing is finished. Do not confuse writing in flash with writing to EEPROM.<br /><br />When you write in flash, cpu stalls itself till writing is finished so no need to poll in that case, whereas in case of EEPROM, you need to poll the WR bit in EECON1 register. Try again.. <br /><br />use test bit instruction for checking WR bit. Please ask if you still feel any problem working on it.]]></description>
<author>Ajay&lt;contact@nospam.com&gt;</author>
<pubDate>Fri, 16 May 2008 23:06:08 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t9579.html</guid>
</item>
						<item>
						<title>Re: How to program EEPROM correctly? SAved but recall FAILED</title>
<link>http://www.8051projects.net/forum-t9579.html</link>
<description><![CDATA[thank you very much Ajay...<br /><br />i made a statement like this,<br /><br />btfsc EECON1, WR;<br />goto $-1 ;<br /><br />it looks fine... but the main problem still is the MPLAB SIM, when i simulate it in ANIMATION mode, its just keep looping...and u know wat, but i go to the RUN mode, everything just works fine and the EEPROM is saving the data n recall. Hope it will work fine in the PIC after i program it tomorrow, lets c how tomorrow. Thanks for your help.]]></description>
<author>nicholastyc&lt;thamyc_2000@nospam.com&gt;</author>
<pubDate>Mon, 19 May 2008 01:38:25 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t9579.html</guid>
</item>
						<item>
						<title>Re: How to program EEPROM correctly? SAved but recall FAILED</title>
<link>http://www.8051projects.net/forum-t9579.html</link>
<description><![CDATA[hi Ajay, wat is poll the WR bit means?<br />i m a newbie here...<br /><br />please explain in asm or meaning of poll the WR bit..<br /><br />thanks!!]]></description>
<author>nicholastyc&lt;thamyc_2000@nospam.com&gt;</author>
<pubDate>Sun, 18 May 2008 18:35:02 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t9579.html</guid>
</item>
						<item>
						<title>Re: How to program EEPROM correctly? SAved but recall FAILED</title>
<link>http://www.8051projects.net/forum-t9579.html</link>
<description><![CDATA[polling means waiting...<br />it can be done something like this...<br /><br /><div class='code_asm'>CODE:</div><div class='code_highlight' style='unicode-bidi: embed; direction: ltr'><div class="asm" style="font-family: monospace;"><span style="color: #00007f; font-weight:bold;">wait</span>:<br />&nbsp; &nbsp; &nbsp; &nbsp; btfsc EECON1,WR //skip the next statement <span style="color: #0000ff;">if</span> the <span style="color: #0000ff;">bit</span> is cleared<br />&nbsp; &nbsp; &nbsp; &nbsp; bra <span style="color: #00007f; font-weight:bold;">wait</span> &nbsp;//jump back <span style="color: #00007f; font-weight:bold;">and</span> check again<br />&nbsp; &nbsp; &nbsp; &nbsp; return &nbsp;//return when <span style="color: #0000ff;">bit</span> is cleared.<br />&nbsp;</div></div>]]></description>
<author>Ajay&lt;contact@nospam.com&gt;</author>
<pubDate>Mon, 19 May 2008 00:41:13 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t9579.html</guid>
</item>
						<item>
						<title>Re: How to program EEPROM correctly? SAved but recall FAILED</title>
<link>http://www.8051projects.net/forum-t9579.html</link>
<description><![CDATA[try using label instead of $-1<br /><br />I hope it will work..]]></description>
<author>Ajay&lt;contact@nospam.com&gt;</author>
<pubDate>Mon, 19 May 2008 20:22:01 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t9579.html</guid>
</item>
				</channel>
				</rss>