<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How input output works in MC</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/34198/how-input-output-works-in-mc</link><description> 
Hi , I am very new to MC coding , and I am trying to simulate an
ouput based on this table 

 
IP1 IP2 OP
(first time)
0 0 = 1
0 1 = 1 //changing
1 1 = 0
1 0 = 0

(second time)
0 0 = 1
0 1 = 0 //changing
1 1 = 0
1 0 = 0

 

 
 
*** I want to read ,</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: How input output works in MC</title><link>https://community.arm.com/thread/120502?ContentTypeID=1</link><pubDate>Mon, 02 Feb 2015 01:46:29 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9b1de308-a1c5-4387-a24f-155df36afce3</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
&amp;quot;P1_1 is always 1 thus the test in ictalics is irrelevant&amp;quot;&lt;/p&gt;

&lt;p&gt;
But with P0.0 and P0.1 using weak pull-up, external switches can
draw one or both of P0.0 and P0.1 low allowing the user to test the
full set of logic combinations of P0.0 and P0.1.&lt;/p&gt;

&lt;p&gt;
The big problem with the test program is that the &amp;quot;count&amp;quot; variable
will constantly flip between test case 0 and test case 1, which means
that the program will at very high speed switch between the first and
the second logic table, resulting in the output LED in some
situations be fully on, sometimes fully off, and sometimes be lit
with 50% duty cycle resulting in a lower intensity.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How input output works in MC</title><link>https://community.arm.com/thread/108069?ContentTypeID=1</link><pubDate>Sun, 01 Feb 2015 13:04:18 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:0a9178b0-a5a0-4d46-ad5c-9929d5d99684</guid><dc:creator>&amp;#178;erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
first, there is (almost) not such a thing as a &amp;#39;51 any more, all
modern chips I know of have uniquenesses so ALWAYS state which chip
you use&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;I have written this code , please anybody validate and tell me
, what I am missing here&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;
what is the result when you run it?&lt;/p&gt;

&lt;p&gt;
if(P1_0==0 &lt;i&gt;&amp;amp;&amp;amp; P1_1==0&lt;/i&gt;) {&lt;br /&gt;
P1_1 is always 1 thus the test in ictalics is irrelevant&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How input output works in MC</title><link>https://community.arm.com/thread/93316?ContentTypeID=1</link><pubDate>Sun, 01 Feb 2015 08:37:25 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:8be621ff-470b-411d-8aff-e3a1e3df33d4</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
See the section, &lt;i&gt;&amp;quot;&lt;b&gt;Language Extensions&lt;/b&gt;&amp;quot;&lt;/i&gt; in the
Compiler &lt;b&gt;Manual&lt;/b&gt;:&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://www.keil.com/support/man/docs/c51/c51_extensions.htm"&gt;http://www.keil.com/support/man/docs/c51/c51_extensions.htm&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
Specifically, &lt;b&gt;Bit-Addressable Objects:&lt;/b&gt; &lt;a href="http://www.keil.com/support/man/docs/c51/c51_le_bitaddrobj.htm"&gt;http://www.keil.com/support/man/docs/c51/c51_le_bitaddrobj.htm&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How input output works in MC</title><link>https://community.arm.com/thread/69055?ContentTypeID=1</link><pubDate>Sun, 01 Feb 2015 02:56:01 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:10e66795-1db0-4feb-ac4e-6114c9868b25</guid><dc:creator>edPer Westermark</dc:creator><description>&lt;p&gt;&lt;pre&gt;
sbit P1_0 = P1^0;
sbit P1_1 = P1^1;
&lt;/pre&gt;

&lt;p&gt;
The above is a proprietary way of Keil in their C51 compiler to
map a one-bit variable &amp;quot;P1_0&amp;quot; to the lowest bit of the 8-bit port P1,
and the one-bit variable &amp;quot;P1_1&amp;quot; to the next lowest bit. This
extension of the C language is needed since the C language does not
contain 1-bit variables and 1-bit variables is one of the unique
strong points of the 8051 architecture.&lt;/p&gt;

&lt;p&gt;
Note that for the rest of a C51 program, the ^ will return to the
normal meaning of a C/C++ program.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>