<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Kommentare zu: Bitweises Auslesen eines PORTs</title>
	<atom:link href="http://et-tutorials.de/1991/bitweises-auslesen-eines-ports/feed/" rel="self" type="application/rss+xml" />
	<link>http://et-tutorials.de/1991/bitweises-auslesen-eines-ports/</link>
	<description>Eletrotechnik verstehen durch Video Tutorials</description>
	<lastBuildDate>Sun, 13 May 2012 07:00:14 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>Von: Wolfgang Bengfort</title>
		<link>http://et-tutorials.de/1991/bitweises-auslesen-eines-ports/comment-page-1/#comment-2440</link>
		<dc:creator>Wolfgang Bengfort</dc:creator>
		<pubDate>Sun, 18 Dec 2011 10:39:58 +0000</pubDate>
		<guid isPermaLink="false">http://et-tutorials.de/?p=1991#comment-2440</guid>
		<description>Hallo samer,
sehr gut. 
Dieses Thema wird in den kommenden Folgen besprochen.</description>
		<content:encoded><![CDATA[<p>Hallo samer,<br />
sehr gut.<br />
Dieses Thema wird in den kommenden Folgen besprochen.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: samer</title>
		<link>http://et-tutorials.de/1991/bitweises-auslesen-eines-ports/comment-page-1/#comment-2439</link>
		<dc:creator>samer</dc:creator>
		<pubDate>Sun, 18 Dec 2011 05:19:04 +0000</pubDate>
		<guid isPermaLink="false">http://et-tutorials.de/?p=1991#comment-2439</guid>
		<description>Hallo Wolfgang,
Ich kann nicht zwei Bits gleichzeitig setzen um zu sehen wie das Programm drauf reagiert.
In jeder If-Schleife wird  ja das entsprechende  Bit auf Null gesestzt. Was muss ich tun damit es klappt??</description>
		<content:encoded><![CDATA[<p>Hallo Wolfgang,<br />
Ich kann nicht zwei Bits gleichzeitig setzen um zu sehen wie das Programm drauf reagiert.<br />
In jeder If-Schleife wird  ja das entsprechende  Bit auf Null gesestzt. Was muss ich tun damit es klappt??</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Wolfgang Bengfort</title>
		<link>http://et-tutorials.de/1991/bitweises-auslesen-eines-ports/comment-page-1/#comment-2388</link>
		<dc:creator>Wolfgang Bengfort</dc:creator>
		<pubDate>Tue, 22 Nov 2011 14:33:39 +0000</pubDate>
		<guid isPermaLink="false">http://et-tutorials.de/?p=1991#comment-2388</guid>
		<description>P1 &amp;= 0xFE;
bedeutet
P1 = P1 &amp; 0xFE;
Das ist nur eine andere, kürzere Schreibweise.
Ich habe das in einem der früheren Videos  einmal erläutert.
Ich hoffe, das hilft beim Verständnis.</description>
		<content:encoded><![CDATA[<p>P1 &#038;= 0xFE;<br />
bedeutet<br />
P1 = P1 &#038; 0xFE;<br />
Das ist nur eine andere, kürzere Schreibweise.<br />
Ich habe das in einem der früheren Videos  einmal erläutert.<br />
Ich hoffe, das hilft beim Verständnis.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: jan</title>
		<link>http://et-tutorials.de/1991/bitweises-auslesen-eines-ports/comment-page-1/#comment-2387</link>
		<dc:creator>jan</dc:creator>
		<pubDate>Tue, 22 Nov 2011 12:44:42 +0000</pubDate>
		<guid isPermaLink="false">http://et-tutorials.de/?p=1991#comment-2387</guid>
		<description>sry ich meinte natürlich 
FE
FD
FB
F7
EF
DF
BF
7F
trotzdem kein erfolg :/ 
gleiches Problem</description>
		<content:encoded><![CDATA[<p>sry ich meinte natürlich<br />
FE<br />
FD<br />
FB<br />
F7<br />
EF<br />
DF<br />
BF<br />
7F<br />
trotzdem kein erfolg :/<br />
gleiches Problem</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: jan</title>
		<link>http://et-tutorials.de/1991/bitweises-auslesen-eines-ports/comment-page-1/#comment-2386</link>
		<dc:creator>jan</dc:creator>
		<pubDate>Tue, 22 Nov 2011 12:29:55 +0000</pubDate>
		<guid isPermaLink="false">http://et-tutorials.de/?p=1991#comment-2386</guid>
		<description>Wofrü genau steht das &quot;&amp;=&quot; bei der Bit freigabe?
das habe ich nicht ganz verstanden.
Und ich denke ich habe alles richtig, doch wenn ich das Programm starten will sagt er mir:
&quot;*** error 65: access violation at C:0x0000 : no &#039;execute/read&#039; permission&quot;

hier mal der code:

void main (void) {

int Betrag;
char c;
/*------------------------------------------------
Setup the serial port for 1200 baud at 16MHz.
------------------------------------------------*/
#ifndef MONITOR51
    SCON  = 0x50;		        /* SCON: mode 1, 8-bit UART, enable rcvr      */
    TMOD &#124;= 0x20;               /* TMOD: timer 1, mode 2, 8-bit reload        */
    TH1   = 221;                /* TH1:  reload value for 1200 baud @ 16MHz   */
    TR1   = 1;                  /* TR1:  timer 1 run                          */
    TI    = 1;                  /* TI:   set TI to send first char of UART    */
#endif


Betrag=0;
P1=0;
printf(&quot;Ihr Guthaben beträgt: 0 cent&quot;);
while (1) {

if (P1&amp;0x01)
 {
 printf(&quot;Guthaben: %d cent\n&quot;,Betrag+=1);
 P1&amp;=0xFE;
 }

if (P1&amp;0x02)
 {
 printf(&quot;Guthaben: %d cent\n&quot;,Betrag+=2);
 P1&amp;=0xFD;
 }

if (P1&amp;0x04)
 {
 printf(&quot;Guthaben: %d cent\n&quot;,Betrag+=5);
P1&amp;=0xFC;
}

if (P1&amp;0x08)
 {
 printf(&quot;Guthaben: %d cent\n&quot;,Betrag+=10);
P1&amp;=0xFB;
}


if (P1&amp;0x16)
 {
 printf(&quot;Guthaben: %d cent\n&quot;,Betrag+=20);
P1&amp;=0xEF;
}

 
if (P1&amp;0x32)
{
 printf(&quot;Guthaben: %d cent\n&quot;,Betrag+=50);
P1&amp;=0xDF;
}

 
if (P1&amp;0x64)
{
 printf(&quot;Guthaben: %d cent\n&quot;,Betrag+=100);
P1&amp;=0xCF;
}

 
if (P1&amp;128)
 {
 printf(&quot;Guthaben: %d cent\n&quot;,Betrag+=200);
P1&amp;=0xBF;
}

c=getchar();			 
 switch (c)
 {
 case &#039;k&#039;:
 if (Betrag&lt;30)
 {
 printf(&quot;affee kostet 30 Cent\n&quot;);
 printf(&quot;Restbetrag: %d Cent\n&quot;, Betrag);
 printf(&quot;Bitte werfen Sie (mindestens) %d Cent ein\n&quot;,30-Betrag);
 c=0;
 break;
 }
 printf(&quot;\nSie haben Kaffee gewählt\n&quot;);
 printf(&quot;Restbetrag: %d Cent\n&quot;, Betrag-=30);
 c=0;
 break;

 case &#039;e&#039;:
 if (Betrag&lt;40)
 {
 printf(&quot;spresso kostet 40 Cent\n&quot;);
 printf(&quot;Restbetrag: %d Cent\n&quot;, Betrag);
 printf(&quot;Bitte werfen Sie (mindestens) %d Cent ein\n&quot;,40-Betrag);
 break;
 }
 printf(&quot;\nSie haben Espresso gewählt\n&quot;);
 printf(&quot;Restbetrag: %d Cent\n&quot;, Betrag-=40);
 c=0;

 break;
 case &#039;c&#039;:
 if (Betrag&lt;50)
 {
 printf(&quot;appuchino kostet 50 Cent\n&quot;);
 printf(&quot;Restbetrag: %d Cent\n&quot;, Betrag);
 printf(&quot;Bitte werfen Sie (mindestens) %d Cent ein\n&quot;,50-Betrag);

 break;
 }
 printf(&quot;\nSie haben Cappuchino gewählt\n&quot;);
 printf(&quot;Restbetrag: %d Cent\n&quot;, Betrag-=50);
 c=0;
 break;
 

 case &#039;r&#039;:
 if (Betrag==Betrag)
 {
 printf(&quot;ückgabe\nIhr Geld wird Ihnen ausgegeben\n&quot;,Betrag-=Betrag);
 printf(&quot;Guthaben: %d\n&quot;,Betrag);
 break;
  }
   }
		}
		}</description>
		<content:encoded><![CDATA[<p>Wofrü genau steht das &#8220;&amp;=&#8221; bei der Bit freigabe?<br />
das habe ich nicht ganz verstanden.<br />
Und ich denke ich habe alles richtig, doch wenn ich das Programm starten will sagt er mir:<br />
&#8220;*** error 65: access violation at C:0&#215;0000 : no &#8216;execute/read&#8217; permission&#8221;</p>
<p>hier mal der code:</p>
<p>void main (void) {</p>
<p>int Betrag;<br />
char c;<br />
/*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Setup the serial port for 1200 baud at 16MHz.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*/<br />
#ifndef MONITOR51<br />
    SCON  = 0&#215;50;		        /* SCON: mode 1, 8-bit UART, enable rcvr      */<br />
    TMOD |= 0&#215;20;               /* TMOD: timer 1, mode 2, 8-bit reload        */<br />
    TH1   = 221;                /* TH1:  reload value for 1200 baud @ 16MHz   */<br />
    TR1   = 1;                  /* TR1:  timer 1 run                          */<br />
    TI    = 1;                  /* TI:   set TI to send first char of UART    */<br />
#endif</p>
<p>Betrag=0;<br />
P1=0;<br />
printf(&#8220;Ihr Guthaben beträgt: 0 cent&#8221;);<br />
while (1) {</p>
<p>if (P1&amp;0&#215;01)<br />
 {<br />
 printf(&#8220;Guthaben: %d cent\n&#8221;,Betrag+=1);<br />
 P1&amp;=0xFE;<br />
 }</p>
<p>if (P1&amp;0&#215;02)<br />
 {<br />
 printf(&#8220;Guthaben: %d cent\n&#8221;,Betrag+=2);<br />
 P1&amp;=0xFD;<br />
 }</p>
<p>if (P1&amp;0&#215;04)<br />
 {<br />
 printf(&#8220;Guthaben: %d cent\n&#8221;,Betrag+=5);<br />
P1&amp;=0xFC;<br />
}</p>
<p>if (P1&amp;0&#215;08)<br />
 {<br />
 printf(&#8220;Guthaben: %d cent\n&#8221;,Betrag+=10);<br />
P1&amp;=0xFB;<br />
}</p>
<p>if (P1&amp;0&#215;16)<br />
 {<br />
 printf(&#8220;Guthaben: %d cent\n&#8221;,Betrag+=20);<br />
P1&amp;=0xEF;<br />
}</p>
<p>if (P1&amp;0&#215;32)<br />
{<br />
 printf(&#8220;Guthaben: %d cent\n&#8221;,Betrag+=50);<br />
P1&amp;=0xDF;<br />
}</p>
<p>if (P1&amp;0&#215;64)<br />
{<br />
 printf(&#8220;Guthaben: %d cent\n&#8221;,Betrag+=100);<br />
P1&amp;=0xCF;<br />
}</p>
<p>if (P1&amp;128)<br />
 {<br />
 printf(&#8220;Guthaben: %d cent\n&#8221;,Betrag+=200);<br />
P1&amp;=0xBF;<br />
}</p>
<p>c=getchar();<br />
 switch (c)<br />
 {<br />
 case &#8216;k&#8217;:<br />
 if (Betrag&lt;30)<br />
 {<br />
 printf(&quot;affee kostet 30 Cent\n&quot;);<br />
 printf(&quot;Restbetrag: %d Cent\n&quot;, Betrag);<br />
 printf(&quot;Bitte werfen Sie (mindestens) %d Cent ein\n&quot;,30-Betrag);<br />
 c=0;<br />
 break;<br />
 }<br />
 printf(&quot;\nSie haben Kaffee gewählt\n&quot;);<br />
 printf(&quot;Restbetrag: %d Cent\n&quot;, Betrag-=30);<br />
 c=0;<br />
 break;</p>
<p> case &#039;e&#039;:<br />
 if (Betrag&lt;40)<br />
 {<br />
 printf(&quot;spresso kostet 40 Cent\n&quot;);<br />
 printf(&quot;Restbetrag: %d Cent\n&quot;, Betrag);<br />
 printf(&quot;Bitte werfen Sie (mindestens) %d Cent ein\n&quot;,40-Betrag);<br />
 break;<br />
 }<br />
 printf(&quot;\nSie haben Espresso gewählt\n&quot;);<br />
 printf(&quot;Restbetrag: %d Cent\n&quot;, Betrag-=40);<br />
 c=0;</p>
<p> break;<br />
 case &#039;c&#039;:<br />
 if (Betrag&lt;50)<br />
 {<br />
 printf(&quot;appuchino kostet 50 Cent\n&quot;);<br />
 printf(&quot;Restbetrag: %d Cent\n&quot;, Betrag);<br />
 printf(&quot;Bitte werfen Sie (mindestens) %d Cent ein\n&quot;,50-Betrag);</p>
<p> break;<br />
 }<br />
 printf(&quot;\nSie haben Cappuchino gewählt\n&quot;);<br />
 printf(&quot;Restbetrag: %d Cent\n&quot;, Betrag-=50);<br />
 c=0;<br />
 break;</p>
<p> case &#039;r&#039;:<br />
 if (Betrag==Betrag)<br />
 {<br />
 printf(&quot;ückgabe\nIhr Geld wird Ihnen ausgegeben\n&quot;,Betrag-=Betrag);<br />
 printf(&quot;Guthaben: %d\n&quot;,Betrag);<br />
 break;<br />
  }<br />
   }<br />
		}<br />
		}</p>
]]></content:encoded>
	</item>
</channel>
</rss>

