<?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>Reading time on MSC1211 (8051)</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/31026/reading-time-on-msc1211-8051</link><description> 
Hello there! 

 
I&amp;#39;m trying to read the value of a timer on the MSC1211, but I&amp;#39;m
getting something estrange for me. 
Look what I did: 

 
//# for starting Timer0 as a 16-bit timer:
TMOD = 0x01;
TR0 = 1;

//#for reading it:
//#First I&amp;#39;ve defined and</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Reading time on MSC1211 (8051)</title><link>https://community.arm.com/thread/80497?ContentTypeID=1</link><pubDate>Thu, 30 Aug 2012 06:12:37 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:5052d553-26e4-4bd0-b943-9cba562a7c57</guid><dc:creator>Elias Souza</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hello Per Westermark!&lt;/p&gt;

&lt;p&gt;
I didn&amp;#39;t remember consulting the manual.&lt;br /&gt;
Now that my problem is solved.&lt;/p&gt;

&lt;p&gt;
Thank you very much for bringing to my mind that manual and the
character &amp;#39;b&amp;#39;.&lt;/p&gt;

&lt;p&gt;
o/&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading time on MSC1211 (8051)</title><link>https://community.arm.com/thread/67672?ContentTypeID=1</link><pubDate>Fri, 24 Aug 2012 08:14:14 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:8f9273cb-ee4a-4b09-95a5-5acc42f551ae</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
You use printf().&lt;/p&gt;

&lt;p&gt;
Formatting character x is intended to print a int - not a
character.&lt;/p&gt;

&lt;p&gt;
When you have issues with printf - don&amp;#39;t you think the manual is a
good source of extra information?&lt;/p&gt;

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

&lt;p&gt;
Have you considered what the manual says about the character &amp;#39;b&amp;#39;
for controlling the size of a number?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>