<?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: Programmierung eines Kaffeeautomaten – Teil 2</title>
	<atom:link href="http://et-tutorials.de/1537/programmierung-eines-kaffeeautomaten-%e2%80%93-teil-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://et-tutorials.de/1537/programmierung-eines-kaffeeautomaten-%e2%80%93-teil-2/</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/1537/programmierung-eines-kaffeeautomaten-%e2%80%93-teil-2/comment-page-1/#comment-2573</link>
		<dc:creator>Wolfgang Bengfort</dc:creator>
		<pubDate>Mon, 09 Apr 2012 14:38:30 +0000</pubDate>
		<guid isPermaLink="false">http://et-tutorials.de/?p=1537#comment-2573</guid>
		<description>Ich habe eben eine Email von Chris erhalten, dass genau da das Problem war.
Sollte also noch jemand das Problem haben: Bitte die Hochkommata manuell setzen.</description>
		<content:encoded><![CDATA[<p>Ich habe eben eine Email von Chris erhalten, dass genau da das Problem war.<br />
Sollte also noch jemand das Problem haben: Bitte die Hochkommata manuell setzen.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Wolfgang Bengfort</title>
		<link>http://et-tutorials.de/1537/programmierung-eines-kaffeeautomaten-%e2%80%93-teil-2/comment-page-1/#comment-2572</link>
		<dc:creator>Wolfgang Bengfort</dc:creator>
		<pubDate>Mon, 09 Apr 2012 09:58:44 +0000</pubDate>
		<guid isPermaLink="false">http://et-tutorials.de/?p=1537#comment-2572</guid>
		<description>Hallo Chris,
es sieht so aus,als wenn bei em Kopieren des Codes einige Sonderzeichen, wie etwa das &quot; nicht korrekt kopiert werden.

Gib die Hochkommata einmal per Tastatur ein, dann sollte es gehen.</description>
		<content:encoded><![CDATA[<p>Hallo Chris,<br />
es sieht so aus,als wenn bei em Kopieren des Codes einige Sonderzeichen, wie etwa das &#8221; nicht korrekt kopiert werden.</p>
<p>Gib die Hochkommata einmal per Tastatur ein, dann sollte es gehen.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Chris</title>
		<link>http://et-tutorials.de/1537/programmierung-eines-kaffeeautomaten-%e2%80%93-teil-2/comment-page-1/#comment-2571</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Sun, 08 Apr 2012 23:23:28 +0000</pubDate>
		<guid isPermaLink="false">http://et-tutorials.de/?p=1537#comment-2571</guid>
		<description>Hi,
Ich hab das oben gezeigte Programm kopiert und wollte es ausprobieren jedoch kommt ständig nur diese Fehlermeldung:
Rebuild target &#039;Simulator&#039;
compiling HELLO.C...
HELLO.C(42): error C100: unprintable character 0x93 skipped
HELLO.C(42): error C202: &#039;Los&#039;: undefined identifier
HELLO.C(42): error C141: syntax error near &#039;gehts&#039;
HELLO.C(42): error C100: unprintable character 0x94 skipped
HELLO.C(49): error C100: unprintable character 0x93 skipped
HELLO.C(49): error C141: syntax error near &#039;:&#039;
HELLO.C(49): error C100: unprintable character 0x94 skipped
HELLO.C(49): error C141: syntax error near &#039;)&#039;
HELLO.C(54): error C100: unprintable character 0x93 skipped
HELLO.C(54): error C141: syntax error near &#039;:&#039;
HELLO.C(54): error C100: unprintable character 0x94 skipped
HELLO.C(54): error C141: syntax error near &#039;)&#039;
HELLO.C(59): error C100: unprintable character 0x93 skipped
HELLO.C(59): error C141: syntax error near &#039;:&#039;
HELLO.C(59): error C100: unprintable character 0x94 skipped
HELLO.C(59): error C141: syntax error near &#039;)&#039;
HELLO.C(64): error C100: unprintable character 0x93 skipped
HELLO.C(64): error C141: syntax error near &#039;:&#039;
HELLO.C(64): error C100: unprintable character 0x94 skipped
HELLO.C(64): error C141: syntax error near &#039;)&#039;
HELLO.C(69): error C100: unprintable character 0x93 skipped
HELLO.C(69): error C141: syntax error near &#039;:&#039;
HELLO.C(69): error C100: unprintable character 0x94 skipped
HELLO.C(69): error C141: syntax error near &#039;)&#039;
HELLO.C(74): error C100: unprintable character 0x93 skipped
HELLO.C(74): error C141: syntax error near &#039;:&#039;
HELLO.C(74): error C100: unprintable character 0x94 skipped
HELLO.C(74): error C141: syntax error near &#039;)&#039;
HELLO.C(79): error C100: unprintable character 0x93 skipped
HELLO.C(79): error C141: syntax error near &#039;:&#039;
HELLO.C(79): error C100: unprintable character 0x94 skipped
HELLO.C(79): error C141: syntax error near &#039;)&#039;
HELLO.C(84): error C100: unprintable character 0x93 skipped
HELLO.C(84): error C141: syntax error near &#039;:&#039;
HELLO.C(84): error C100: unprintable character 0x94 skipped
HELLO.C(84): error C141: syntax error near &#039;)&#039;
HELLO.C(89): error C100: unprintable character 0x93 skipped
HELLO.C(89): error C141: syntax error near &#039;\&#039;
Target not created

&quot;Mein&quot; Programm sieht wie folgt aus:

#include                 /* special function register declarations   */
                                  /* for the intended 8051 derivative         */

#include                 /* prototype declarations for I/O functions */


#ifdef MONITOR51                         /* Debugging with Monitor-51 needs   */
char code reserve [3] _at_ 0x23;         /* space for serial interrupt if     */
#endif                                   /* Stop Exection with Serial Intr.   */
                                         /* is enabled                        */


/*------------------------------------------------
The main C function.  Program execution starts
here after stack initialization.
------------------------------------------------*/
void main (void) {
   int Betrag;
/*------------------------------------------------
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

/*------------------------------------------------
Note that an embedded program never exits (because
there is no operating system to return to).  It
must loop and execute forever.
------------------------------------------------*/
 				    P1=0;
    printf(“Los gehts..”);

    while(1){

    switch (P1)
    {
    case 1:
    printf(“Betrag: %d Cent”, Betrag+=1);
    P1=0;
    break;

    case 2:
    printf(“Betrag: %d Cent”, Betrag+=2);
    P1=0;
    break;

    case 4:
    printf(“Betrag: %d Cent”, Betrag+=5);
    P1=0;
    break;

    case 8:
    printf(“Betrag: %d Cent”, Betrag+=10);
    P1=0;
    break;

    case 16:
    printf(“Betrag: %d Cent”, Betrag+=20);
    P1=0;
    break;

    case 32:
    printf(“Betrag: %d Cent”, Betrag+=50);
    P1=0;
    break;

    case 64:
    printf(“Betrag: %d Cent”, Betrag+=100);
    P1=0;
    break;

    case 128:
    printf(“Betrag: %d Cent”, Betrag+=200);
    P1=0;
    break;

    }
    printf(“\n”);
    getchar();  // damit das Programm hier wartet
	}
	}

Ich weis echt nicht woran es liegen könnte?
Würde mich freuen wenn Sie mir bei meinem Problem helfen könnten</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Ich hab das oben gezeigte Programm kopiert und wollte es ausprobieren jedoch kommt ständig nur diese Fehlermeldung:<br />
Rebuild target &#8216;Simulator&#8217;<br />
compiling HELLO.C&#8230;<br />
HELLO.C(42): error C100: unprintable character 0&#215;93 skipped<br />
HELLO.C(42): error C202: &#8216;Los&#8217;: undefined identifier<br />
HELLO.C(42): error C141: syntax error near &#8216;gehts&#8217;<br />
HELLO.C(42): error C100: unprintable character 0&#215;94 skipped<br />
HELLO.C(49): error C100: unprintable character 0&#215;93 skipped<br />
HELLO.C(49): error C141: syntax error near &#8216;:&#8217;<br />
HELLO.C(49): error C100: unprintable character 0&#215;94 skipped<br />
HELLO.C(49): error C141: syntax error near &#8216;)&#8217;<br />
HELLO.C(54): error C100: unprintable character 0&#215;93 skipped<br />
HELLO.C(54): error C141: syntax error near &#8216;:&#8217;<br />
HELLO.C(54): error C100: unprintable character 0&#215;94 skipped<br />
HELLO.C(54): error C141: syntax error near &#8216;)&#8217;<br />
HELLO.C(59): error C100: unprintable character 0&#215;93 skipped<br />
HELLO.C(59): error C141: syntax error near &#8216;:&#8217;<br />
HELLO.C(59): error C100: unprintable character 0&#215;94 skipped<br />
HELLO.C(59): error C141: syntax error near &#8216;)&#8217;<br />
HELLO.C(64): error C100: unprintable character 0&#215;93 skipped<br />
HELLO.C(64): error C141: syntax error near &#8216;:&#8217;<br />
HELLO.C(64): error C100: unprintable character 0&#215;94 skipped<br />
HELLO.C(64): error C141: syntax error near &#8216;)&#8217;<br />
HELLO.C(69): error C100: unprintable character 0&#215;93 skipped<br />
HELLO.C(69): error C141: syntax error near &#8216;:&#8217;<br />
HELLO.C(69): error C100: unprintable character 0&#215;94 skipped<br />
HELLO.C(69): error C141: syntax error near &#8216;)&#8217;<br />
HELLO.C(74): error C100: unprintable character 0&#215;93 skipped<br />
HELLO.C(74): error C141: syntax error near &#8216;:&#8217;<br />
HELLO.C(74): error C100: unprintable character 0&#215;94 skipped<br />
HELLO.C(74): error C141: syntax error near &#8216;)&#8217;<br />
HELLO.C(79): error C100: unprintable character 0&#215;93 skipped<br />
HELLO.C(79): error C141: syntax error near &#8216;:&#8217;<br />
HELLO.C(79): error C100: unprintable character 0&#215;94 skipped<br />
HELLO.C(79): error C141: syntax error near &#8216;)&#8217;<br />
HELLO.C(84): error C100: unprintable character 0&#215;93 skipped<br />
HELLO.C(84): error C141: syntax error near &#8216;:&#8217;<br />
HELLO.C(84): error C100: unprintable character 0&#215;94 skipped<br />
HELLO.C(84): error C141: syntax error near &#8216;)&#8217;<br />
HELLO.C(89): error C100: unprintable character 0&#215;93 skipped<br />
HELLO.C(89): error C141: syntax error near &#8216;\&#8217;<br />
Target not created</p>
<p>&#8220;Mein&#8221; Programm sieht wie folgt aus:</p>
<p>#include                 /* special function register declarations   */<br />
                                  /* for the intended 8051 derivative         */</p>
<p>#include                 /* prototype declarations for I/O functions */</p>
<p>#ifdef MONITOR51                         /* Debugging with Monitor-51 needs   */<br />
char code reserve [3] _at_ 0&#215;23;         /* space for serial interrupt if     */<br />
#endif                                   /* Stop Exection with Serial Intr.   */<br />
                                         /* is enabled                        */</p>
<p>/*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
The main C function.  Program execution starts<br />
here after stack initialization.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*/<br />
void main (void) {<br />
   int Betrag;<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>/*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Note that an embedded program never exits (because<br />
there is no operating system to return to).  It<br />
must loop and execute forever.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*/<br />
 				    P1=0;<br />
    printf(“Los gehts..”);</p>
<p>    while(1){</p>
<p>    switch (P1)<br />
    {<br />
    case 1:<br />
    printf(“Betrag: %d Cent”, Betrag+=1);<br />
    P1=0;<br />
    break;</p>
<p>    case 2:<br />
    printf(“Betrag: %d Cent”, Betrag+=2);<br />
    P1=0;<br />
    break;</p>
<p>    case 4:<br />
    printf(“Betrag: %d Cent”, Betrag+=5);<br />
    P1=0;<br />
    break;</p>
<p>    case 8:<br />
    printf(“Betrag: %d Cent”, Betrag+=10);<br />
    P1=0;<br />
    break;</p>
<p>    case 16:<br />
    printf(“Betrag: %d Cent”, Betrag+=20);<br />
    P1=0;<br />
    break;</p>
<p>    case 32:<br />
    printf(“Betrag: %d Cent”, Betrag+=50);<br />
    P1=0;<br />
    break;</p>
<p>    case 64:<br />
    printf(“Betrag: %d Cent”, Betrag+=100);<br />
    P1=0;<br />
    break;</p>
<p>    case 128:<br />
    printf(“Betrag: %d Cent”, Betrag+=200);<br />
    P1=0;<br />
    break;</p>
<p>    }<br />
    printf(“\n”);<br />
    getchar();  // damit das Programm hier wartet<br />
	}<br />
	}</p>
<p>Ich weis echt nicht woran es liegen könnte?<br />
Würde mich freuen wenn Sie mir bei meinem Problem helfen könnten</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Jan</title>
		<link>http://et-tutorials.de/1537/programmierung-eines-kaffeeautomaten-%e2%80%93-teil-2/comment-page-1/#comment-2369</link>
		<dc:creator>Jan</dc:creator>
		<pubDate>Mon, 21 Nov 2011 09:59:24 +0000</pubDate>
		<guid isPermaLink="false">http://et-tutorials.de/?p=1537#comment-2369</guid>
		<description>Ich weiß zwar nicht ob du dich noch hier rum treibst,
erst mal großes Kompliment für diese Tutorials,
Sehr verständlich :)
Hier wäre mal meine Lösung:
Mit:
Geldzähler,
und Geld rückgabe:

i=0; 
  while (1) {
switch (P1)
{case 1:
printf(&quot;Guthaben: %d cent\n&quot;,++i);
getchar();
break;
case 2:
i=i+2;
printf(&quot;Guthaben: %d cent\n&quot;,i);
getchar();
break;
case 4:
i=i+5;
printf(&quot;Guthaben: %d cent\n&quot;,i);
getchar();
break;
case 8:
i=i+10;
printf(&quot;Guthaben: %d cent\n&quot;,i);
getchar();
break;
case 16:
i=i+20;
printf(&quot;Guthaben: %d cent\n&quot;,i);
getchar();
break;
case 32:
i=i+50;
printf(&quot;Guthaben: %d cent\n&quot;,i);
getchar();
break;
case 64:
i=i+100;
printf(&quot;Guthaben: %d cent\n&quot;,i);
getchar();
break;
case 128:
i=i+200;
printf(&quot;Guthaben: %d cent\n&quot;,i);
getchar();
break;
case 0:
printf(&quot;Guthaben: %d cent\n&quot;,i);
getchar();
break;
case 3:
printf(&quot;Ihr Restguthaben wird Ihnen Ausgegeben: %d cent\n&quot;,i);
i=i-i;
getchar();
break;
default:
printf(&quot;Ihr Geld wird Ausgeworfen&quot;);
break;

}
if(i&gt;=320)
{
printf(&quot;Ihr Kafee wird ausgegeben\n&quot;);
i=i-320;
getchar();
} 
else
{printf(&quot;\n&quot;);
} 
  }
}




Und eine Frage ist es nciht möglich bei der Case function Berreiche einzugrenzen zB.
case ((i30) oder (&lt;=10)
{
printf(&quot;der Berreich ist zwischen 5 und 30&quot;\n);
break;
}

Hoffe auf Antwort :)
MfG</description>
		<content:encoded><![CDATA[<p>Ich weiß zwar nicht ob du dich noch hier rum treibst,<br />
erst mal großes Kompliment für diese Tutorials,<br />
Sehr verständlich <img src='http://et-tutorials.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Hier wäre mal meine Lösung:<br />
Mit:<br />
Geldzähler,<br />
und Geld rückgabe:</p>
<p>i=0;<br />
  while (1) {<br />
switch (P1)<br />
{case 1:<br />
printf(&#8220;Guthaben: %d cent\n&#8221;,++i);<br />
getchar();<br />
break;<br />
case 2:<br />
i=i+2;<br />
printf(&#8220;Guthaben: %d cent\n&#8221;,i);<br />
getchar();<br />
break;<br />
case 4:<br />
i=i+5;<br />
printf(&#8220;Guthaben: %d cent\n&#8221;,i);<br />
getchar();<br />
break;<br />
case 8:<br />
i=i+10;<br />
printf(&#8220;Guthaben: %d cent\n&#8221;,i);<br />
getchar();<br />
break;<br />
case 16:<br />
i=i+20;<br />
printf(&#8220;Guthaben: %d cent\n&#8221;,i);<br />
getchar();<br />
break;<br />
case 32:<br />
i=i+50;<br />
printf(&#8220;Guthaben: %d cent\n&#8221;,i);<br />
getchar();<br />
break;<br />
case 64:<br />
i=i+100;<br />
printf(&#8220;Guthaben: %d cent\n&#8221;,i);<br />
getchar();<br />
break;<br />
case 128:<br />
i=i+200;<br />
printf(&#8220;Guthaben: %d cent\n&#8221;,i);<br />
getchar();<br />
break;<br />
case 0:<br />
printf(&#8220;Guthaben: %d cent\n&#8221;,i);<br />
getchar();<br />
break;<br />
case 3:<br />
printf(&#8220;Ihr Restguthaben wird Ihnen Ausgegeben: %d cent\n&#8221;,i);<br />
i=i-i;<br />
getchar();<br />
break;<br />
default:<br />
printf(&#8220;Ihr Geld wird Ausgeworfen&#8221;);<br />
break;</p>
<p>}<br />
if(i&gt;=320)<br />
{<br />
printf(&#8220;Ihr Kafee wird ausgegeben\n&#8221;);<br />
i=i-320;<br />
getchar();<br />
}<br />
else<br />
{printf(&#8220;\n&#8221;);<br />
}<br />
  }<br />
}</p>
<p>Und eine Frage ist es nciht möglich bei der Case function Berreiche einzugrenzen zB.<br />
case ((i30) oder (&lt;=10)<br />
{<br />
printf(&quot;der Berreich ist zwischen 5 und 30&quot;\n);<br />
break;<br />
}</p>
<p>Hoffe auf Antwort <img src='http://et-tutorials.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
MfG</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Wolfgang Bengfort</title>
		<link>http://et-tutorials.de/1537/programmierung-eines-kaffeeautomaten-%e2%80%93-teil-2/comment-page-1/#comment-345</link>
		<dc:creator>Wolfgang Bengfort</dc:creator>
		<pubDate>Tue, 23 Mar 2010 16:35:02 +0000</pubDate>
		<guid isPermaLink="false">http://et-tutorials.de/?p=1537#comment-345</guid>
		<description>Hallo Willi,
beides soll möglich sein.
So lange das Guthaben ausreicht, soll auch Kaffee genommen werden können.
So könnte man beispielsweise 1 Euro einwerfen und dann 2 Kaffee und 1 Espresso entnehmen.

Viele Grüße
Wolfgang</description>
		<content:encoded><![CDATA[<p>Hallo Willi,<br />
beides soll möglich sein.<br />
So lange das Guthaben ausreicht, soll auch Kaffee genommen werden können.<br />
So könnte man beispielsweise 1 Euro einwerfen und dann 2 Kaffee und 1 Espresso entnehmen.</p>
<p>Viele Grüße<br />
Wolfgang</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Willi</title>
		<link>http://et-tutorials.de/1537/programmierung-eines-kaffeeautomaten-%e2%80%93-teil-2/comment-page-1/#comment-344</link>
		<dc:creator>Willi</dc:creator>
		<pubDate>Tue, 23 Mar 2010 15:30:04 +0000</pubDate>
		<guid isPermaLink="false">http://et-tutorials.de/?p=1537#comment-344</guid>
		<description>Hallo Wolfgang,
eine Frage zum Verständnis:
Soll zuerst gewählt und dann gezahlt oder
zuerst gezahlt und dann gewählt werden oder
sind beide Systeme zugelassen?
(In der Automatentechnik gibt es beide Systeme:
Zahlen - Wählen - Nehmen oder
Wählen - Zahlen - Nehmen oder 
wahlweise die Kombination von beiden).
Gruß Willi</description>
		<content:encoded><![CDATA[<p>Hallo Wolfgang,<br />
eine Frage zum Verständnis:<br />
Soll zuerst gewählt und dann gezahlt oder<br />
zuerst gezahlt und dann gewählt werden oder<br />
sind beide Systeme zugelassen?<br />
(In der Automatentechnik gibt es beide Systeme:<br />
Zahlen &#8211; Wählen &#8211; Nehmen oder<br />
Wählen &#8211; Zahlen &#8211; Nehmen oder<br />
wahlweise die Kombination von beiden).<br />
Gruß Willi</p>
]]></content:encoded>
	</item>
</channel>
</rss>

