<?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>10 Bit ADC</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/37595/10-bit-adc</link><description> 
First, I thank keil.com for this forum... 

 
I am using C515C, and I connected it to an LCD. 

 
When I convert an analog signal coming from P6.1 to 8 bit, the
output is right. 

 
But when I convert the signal to 10 bit resolution, at the program</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: 10 Bit ADC</title><link>https://community.arm.com/thread/113507?ContentTypeID=1</link><pubDate>Sat, 22 Dec 2007 02:54:13 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:4a8d1e58-3ceb-44db-9f4a-2f5815681e15</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
It always helps other people who find this thread at a later time,
if you can expand a bit more about what was wrong, and how you
managed to solve the problem.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 10 Bit ADC</title><link>https://community.arm.com/thread/100073?ContentTypeID=1</link><pubDate>Sat, 22 Dec 2007 01:58:29 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:8e332791-c47d-40da-8e2b-f3d03e7b641f</guid><dc:creator>ashraf dasa</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thanks..&lt;/p&gt;

&lt;p&gt;
It is working now,, you were right..&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 10 Bit ADC</title><link>https://community.arm.com/thread/124327?ContentTypeID=1</link><pubDate>Thu, 20 Dec 2007 08:18:29 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:1f42b4b7-3a27-4044-91f8-b2f1839b17f0</guid><dc:creator>ashraf dasa</dc:creator><description>&lt;p&gt;&lt;p&gt;
and..&lt;/p&gt;

&lt;p&gt;
sfr ADDATH = 0xD9;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 10 Bit ADC</title><link>https://community.arm.com/thread/113502?ContentTypeID=1</link><pubDate>Thu, 20 Dec 2007 08:17:20 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e5ba913c-7c20-4d72-9eeb-4e4aec1774e2</guid><dc:creator>ashraf dasa</dc:creator><description>&lt;p&gt;&lt;p&gt;
ok,,&lt;br /&gt;
this is the function...&lt;/p&gt;

&lt;p&gt;
#define uword unsigned int&lt;/p&gt;

&lt;p&gt;
uword ADC_uwRead10BitConv(void)&lt;br /&gt;
{ uword tmp = 0;&lt;/p&gt;

&lt;p&gt;
tmp = ADDATH;&lt;/p&gt;

&lt;p&gt;
tmp &amp;lt;&amp;lt;= 8;&lt;/p&gt;

&lt;p&gt;
tmp |= ADDATL;&lt;/p&gt;

&lt;p&gt;
tmp &amp;gt;&amp;gt;= 6;&lt;/p&gt;

&lt;p&gt;
return(tmp);&lt;/p&gt;

&lt;p&gt;
}&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 10 Bit ADC</title><link>https://community.arm.com/thread/100058?ContentTypeID=1</link><pubDate>Thu, 20 Dec 2007 08:09:55 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:d7a10222-4909-475b-b808-85c6c64a02ab</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Are you sure that you correctly reconfigured everything to support
10-bit data?&lt;/p&gt;

&lt;p&gt;
Maybe you left something at 8 bits, and it&amp;#39;s crashing because
you&amp;#39;re feeding it 10 (or 16) bits...&lt;/p&gt;

&lt;p&gt;
As Per suggested, single-stepping would show you what&amp;#39;s going
on...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 10 Bit ADC</title><link>https://community.arm.com/thread/75832?ContentTypeID=1</link><pubDate>Thu, 20 Dec 2007 07:58:16 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:434a040f-92c0-432c-a940-80c305ee8457</guid><dc:creator>ashraf dasa</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thank you for the reply,,&lt;/p&gt;

&lt;p&gt;
I think these libraries are ok, because these libraries are made
by the support tools from DAvE which are tools that prepare for me
all the needed to start programming, like building the ADC functions,
timers, levels of priorities...etc.&lt;/p&gt;

&lt;p&gt;
But the strange thing is that the program execution goes back to
the start when it reaches the conversion code!!!&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 10 Bit ADC</title><link>https://community.arm.com/thread/51363?ContentTypeID=1</link><pubDate>Thu, 20 Dec 2007 07:44:00 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:0e88d05e-dc70-44a1-9f2c-652c6e419a25</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Have you single-stepped the ADC_ubRead10BitConv() function?&lt;/p&gt;

&lt;p&gt;
Have you set up a stack? Is it large enough?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>