<?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 23:08:30 -0800</pubDate>
				<lastBuildDate>Thu, 08 Jan 2009 23:08:30 -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>Begineer need help about GPIO, PLEASE</title>
<link>http://www.8051projects.net/forum-t10966.html</link>
<description><![CDATA[I'm new in arm, i don't quite understand about in the IOPIN...<br />for example,<br />#define	  LED	 1&lt;&lt;24<br />#define   KEY1	1&lt;&lt;16<br /><br />int  main(void)<br />{  <br />	 unsigned int key = 0;<br />	<br />	PINSEL0 = 0;		    <br />   	PINSEL1 = 0;<br /><br />	IO0DIR = LED;<br />	IO0SET = 0x1010000; //set both P0.24 &amp; P0.16 to high<br /><br />	while(1)	<br />   	{  <br />	    key = IO0PIN;<br />            if(key==?) //key is pressed, will be "0"<br />            ...<br />            ...<br />   	}<br />}<br /><br />i got a button and a led connected to P0.16 and P0.24, and i would like to read the status of the button in order to turn a led. but what value actually i need to put in the question mark??<br />don't know if i miss understand the concept..... <br />thank you]]></description>
<pubDate>Sat, 19 Jul 2008 07:15:32 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t10966.html</guid>
</item>
						<item>
						<title>Re: Begineer need help about GPIO, PLEASE</title>
<link>http://www.8051projects.net/forum-t10966.html</link>
<description><![CDATA[its like this.<br />.<br /><div class='code_box'>CODE:</div><div class='code_highlight' style='unicode-bidi: embed; direction: ltr'><div class="c" style="font-family: monospace;"><span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>key&<span style="color: #66cc66;">&#40;</span>key1<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><br />&nbsp; &nbsp;<span style="color: #808080; font-style: italic;">//not pressed</span><br /><span style="color: #66cc66;">&#125;</span><br /><span style="color: #b1b100;">else</span><span style="color: #66cc66;">&#123;</span><br />&nbsp; &nbsp;<span style="color: #808080; font-style: italic;">//Pressed</span><br /><span style="color: #66cc66;">&#125;</span><br />&nbsp;</div></div>]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Sat, 19 Jul 2008 08:28:29 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t10966.html</guid>
</item>
						<item>
						<title>Re: Begineer need help about GPIO, PLEASE</title>
<link>http://www.8051projects.net/forum-t10966.html</link>
<description><![CDATA[thank you, but i still confuse about it. if it is IO0SET = 0x1010000, so IO0PIN will read back 0x1010000?? also i don't quite understand the use of "key&amp;(key1)"<br /><br />if IO0PIN really read back 0x1010000, and "&amp;" with key1 it becomes key1 that means the button is not pressed. if the button is pressed, it becomes 0.<br /><br />don't know if i make it wrong, thank you <img src='http://www.8051projects.net/e107_images/emotes/yahoo/7.gif' alt='' style='vertical-align:middle; border:0' />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Sat, 19 Jul 2008 21:36:47 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t10966.html</guid>
</item>
						<item>
						<title>Re: Begineer need help about GPIO, PLEASE</title>
<link>http://www.8051projects.net/forum-t10966.html</link>
<description><![CDATA[you can try like this.. and hope it explians itself..<br /><div class='code_box'>CODE:</div><div class='code_highlight' style='unicode-bidi: embed; direction: ltr'><div class="c" style="font-family: monospace;"><br /><span style="color: #339933;">#define LED 1&lt;&lt;24</span><br /><span style="color: #339933;">#define KEY1 1&lt;&lt;16</span><br /><br /><span style="color: #993333;">int</span> main<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">void</span><span style="color: #66cc66;">&#41;</span><br /><span style="color: #66cc66;">&#123;</span><br /><span style="color: #993333;">unsigned</span> <span style="color: #993333;">int</span> key = <span style="color: #cc66cc;">0</span>;<br /><br />PINSEL0 = <span style="color: #cc66cc;">0</span>;<br />PINSEL1 = <span style="color: #cc66cc;">0</span>;<br /><br />IO0DIR = LED; <span style="color: #808080; font-style: italic;">// shyam: LED pin set as output.. other pins default to input</span><br />&nbsp;<br />IO0SET = 0x1010000; <span style="color: #808080; font-style: italic;">//set both P0.24 &amp; P0.16 to high</span><br /><br /><span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><br /><span style="color: #66cc66;">&#123;</span><br />key = IO0PIN;<br /><span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>key&key1<span style="color: #66cc66;">&#41;</span>==key1<span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">//key is pressed, will be &quot;0&quot;</span><br />...<br />...<br /><span style="color: #66cc66;">&#125;</span><br /><span style="color: #66cc66;">&#125;</span><br />&nbsp;</div></div><br />now while only the led pin is set as output pin..it will efffect ony the led not the key1<br /><br />so if u want the key1 to be effective high u will have to do<br /><br />IODIR1 = Key1| Led1;<br />IOSET1 = Key1;<br /><br /><br />//and then again make key as input <br />IODIR1 = Led1;<br /><br /><br />hope that clears  abit of your doubts...<br /><br /> <img src='http://www.8051projects.net/e107_images/emotes/yahoo/103.gif' alt='' style='vertical-align:middle; border:0' />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Sun, 20 Jul 2008 22:41:28 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t10966.html</guid>
</item>
				</channel>
				</rss>