<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>S12 / MagniV Microcontrollers中的主题 Problem Reading ADC Register in Micro MC9S12C32</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-Reading-ADC-Register-in-Micro-MC9S12C32/m-p/133732#M1949</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;We are using the AN0 of the microcontroller to read the RTD input. When probed the pin of the controller, the voltage appears to be 3.28v. But when we read the ADC register, the value&amp;nbsp;read is 678 counts i.e, 0.05v. The reference voltage is 4.96v (Vcc).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The same problem is also seen across AN1-3. We are unable to determine the problem. Though one problem which we suspect would be that the pins might have got damaged.&amp;nbsp;I am not sure whether this is possible.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Other information:&lt;/DIV&gt;&lt;DIV&gt;We are using MC9S12C32 and Code warrior 3.1v as the IDE. We are using P&amp;amp;E HCS12 multilink Rev.B for programming and debugging.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The ADC register configuration is:&lt;/DIV&gt;&lt;DIV&gt;ATDCTL2 = 0x80;&lt;/DIV&gt;&lt;DIV&gt;ATDCTL3 = 0x08;&lt;/DIV&gt;&lt;DIV&gt;ATDCTL4 = 0x63;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;ATDCTL5 = 0xA1; // For ADC channel 1&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;ATDCTL5 = 0xA2; // For ADC channel 2&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;ATDCTL5 = 0xA3; // For ADC channel 3&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;ATDCTL5 = 0xA4; // For ADC channel 4&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;We are taking the readings from ATDDR0.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Please let us know what might be the possible problem.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks &amp;amp; regards,&lt;/DIV&gt;&lt;DIV&gt;Deepa.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 May 2007 21:50:38 GMT</pubDate>
    <dc:creator>mdeepamenon</dc:creator>
    <dc:date>2007-05-14T21:50:38Z</dc:date>
    <item>
      <title>Problem Reading ADC Register in Micro MC9S12C32</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-Reading-ADC-Register-in-Micro-MC9S12C32/m-p/133732#M1949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;We are using the AN0 of the microcontroller to read the RTD input. When probed the pin of the controller, the voltage appears to be 3.28v. But when we read the ADC register, the value&amp;nbsp;read is 678 counts i.e, 0.05v. The reference voltage is 4.96v (Vcc).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The same problem is also seen across AN1-3. We are unable to determine the problem. Though one problem which we suspect would be that the pins might have got damaged.&amp;nbsp;I am not sure whether this is possible.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Other information:&lt;/DIV&gt;&lt;DIV&gt;We are using MC9S12C32 and Code warrior 3.1v as the IDE. We are using P&amp;amp;E HCS12 multilink Rev.B for programming and debugging.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The ADC register configuration is:&lt;/DIV&gt;&lt;DIV&gt;ATDCTL2 = 0x80;&lt;/DIV&gt;&lt;DIV&gt;ATDCTL3 = 0x08;&lt;/DIV&gt;&lt;DIV&gt;ATDCTL4 = 0x63;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;ATDCTL5 = 0xA1; // For ADC channel 1&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;ATDCTL5 = 0xA2; // For ADC channel 2&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;ATDCTL5 = 0xA3; // For ADC channel 3&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;ATDCTL5 = 0xA4; // For ADC channel 4&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;We are taking the readings from ATDDR0.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Please let us know what might be the possible problem.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks &amp;amp; regards,&lt;/DIV&gt;&lt;DIV&gt;Deepa.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2007 21:50:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-Reading-ADC-Register-in-Micro-MC9S12C32/m-p/133732#M1949</guid>
      <dc:creator>mdeepamenon</dc:creator>
      <dc:date>2007-05-14T21:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problem Reading ADC Register in Micro MC9S12C32</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-Reading-ADC-Register-in-Micro-MC9S12C32/m-p/133733#M1950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello Deepa,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;I cannot quite see that you have a problem.&amp;nbsp; For 10-bit conversion of an input of 3.28 volts, and with Vref of 4.96 volts, the predicted result would be -&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;1024 * 3.28 / 4.96 = 677&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;This is very close to the result you are getting.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2007 23:35:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Problem-Reading-ADC-Register-in-Micro-MC9S12C32/m-p/133733#M1950</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-05-14T23:35:10Z</dc:date>
    </item>
  </channel>
</rss>

