<?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>2008 Rickey's World</copyright>
				<managingEditor>contact@nospam.com (Ajay Bhargav)</managingEditor>
				<webMaster>contact@nospam.com (Ajay Bhargav)</webMaster>
				<pubDate>Thu, 08 Jan 2009 20:26:32 -0800</pubDate>
				<lastBuildDate>Thu, 08 Jan 2009 20:26:32 -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>Count Down Counter</title>
<link>http://www.8051projects.net/forum-t622.html</link>
<description><![CDATA[Hi all, I'm newbie in microcontroller and try to write a code for 4 digit count down counter with AT89S51. <br /><br />Here are portion of the code.<br /><br />count_down: <br />mov a,count1 <br />dec a <br />mov count1,a <br />cjne a,#-1,exit_count <br />mov count1,#9 <br />mov a,count2 <br />dec a <br />mov count2,a <br />cjne a,#-1,exit_count <br />mov count2,#9 <br />mov a,count3 <br />dec a <br />mov count3,a <br />cjne a,#-1,exit_count <br />mov count3,#9 <br />mov a,count4 <br />dec a <br />mov count4,a <br />cjne a,#-1,exit_count <br />mov count4,#0 <br /><br />exit_count: <br />ret <br /><br />The problem were if I put in following value, count1 = 0, count2 = 0, count3 = 1 and count4 = 0, it dosn't display correctly as everytime the 'dec' command was execute it fill in number 9 to previous count varible. <br /><br />How to fix this problem ?. One more thing, at the end of count down, it doesn't display 0000, instead it display 9990.<br /><br />Thanks all.<br />SGH<br />]]></description>
<pubDate>Wed, 28 Mar 2007 22:02:41 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t622.html</guid>
</item>
						<item>
						<title>Re: Count Down Counter</title>
<link>http://www.8051projects.net/forum-t622.html</link>
<description><![CDATA[Well making a down counter is little tricky, i mean.. its not like simple decrement you need to check and wait till all zero and then exit.<br />cjne a,#-1,exit_count<br />mov count1,#9<br /><br />this will surely make count 1 = 9 coz, after you dec count1 it will become -1 from 0. so according to statement, cjne(compare and jump if not equal) it will exit only if its not equal, but here its equal so, it will execute the next statement, so 9 is loaded in count1. so u are getting that result.<br /><br />I made a program, but i want you to try it first, so giving you hint, you need to decrement the last digit, untill it become zero and when it become zero decrement the second digit, keep on doing this, utill u end up with all zeros!<br />i hope you got some idea, how to implement it, there are lot of compare jumps to be made i think, try it, if you don't get result, i will help you <img src='http://www.8051projects.net/e107_images/emotes/yahoo/1.gif' alt='' style='vertical-align:middle; border:0' />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Thu, 29 Mar 2007 05:17:25 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t622.html</guid>
</item>
						<item>
						<title>Re: Count Down Counter</title>
<link>http://www.8051projects.net/forum-t622.html</link>
<description><![CDATA[Rickey, thanks for the hint. I'll try to rewrite the code.]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Thu, 29 Mar 2007 19:12:59 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t622.html</guid>
</item>
						<item>
						<title>Re: Count Down Counter</title>
<link>http://www.8051projects.net/forum-t622.html</link>
<description><![CDATA[I'm still trying to rewrite the code. I solved one problem but create another problem in the code.<br /><br />So my progress in this code is slow. It is ok for me as this is part of the learning process.<br /><br /><br />SGH]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Sat, 21 Apr 2007 08:56:32 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t622.html</guid>
</item>
						<item>
						<title>Re: Count Down Counter</title>
<link>http://www.8051projects.net/forum-t622.html</link>
<description><![CDATA[good keep trying.. you will reach to the target soon <img src='http://www.8051projects.net/e107_images/emotes/yahoo/1.gif' alt='' style='vertical-align:middle; border:0' /> <br />for any assistance i am here.]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Sat, 21 Apr 2007 10:55:48 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t622.html</guid>
</item>
						<item>
						<title>Re: Count Down Counter</title>
<link>http://www.8051projects.net/forum-t622.html</link>
<description><![CDATA[Rickey,<br /><br />More hints please.<br /><br />Thanks,<br />SGH]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Wed, 30 May 2007 20:37:10 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t622.html</guid>
</item>
						<item>
						<title>Re: Count Down Counter</title>
<link>http://www.8051projects.net/forum-t622.html</link>
<description><![CDATA[you first tell me what you've done.. so i can tell you.. next..]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Wed, 30 May 2007 22:53:00 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t622.html</guid>
</item>
				</channel>
				</rss>