<?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のトピックScanning Multiple ATD channels with the MC9S12XDP512</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Scanning-Multiple-ATD-channels-with-the-MC9S12XDP512/m-p/515200#M12510</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm unable to successfully configure the MC9S12XDP512 for a multiple channel ATD acquisition.&amp;nbsp; I can scan individual channels and get correct results, but when configured for multiple mode, the results are garbage.&amp;nbsp; I've used the same code base on the MC9S12C132 chip (for ATD0) and it works correctly (for multiple channel scans).&amp;nbsp; Is there something specific about the MC9S12X that I'm not catching?&amp;nbsp; My register settings are as follows:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ATD0CTL2 = 0x80&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //normal ATD operation with no fast clear and no external trigger&lt;/P&gt;&lt;P&gt;ATD0CTL3 = 0x40;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //8 conversions per sequence, conversions placed in corresponding registers&lt;/P&gt;&lt;P&gt;ATD0CTL4 = 0x05;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //10 bit resolution, 2 A/D clock periods per conversion, divide by 12; (8HMz bus clock)&lt;/P&gt;&lt;P&gt;ATD0CTL1 = 0x00;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //should not matter, no external trigger used&lt;/P&gt;&lt;P&gt;ATD0CTL0 = 0x01;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //wrap set to AN1; but should not be needed&lt;/P&gt;&lt;P&gt;ATD0CTL5 = 0x90;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //right justified data, multi-channel conversion, start on AN0&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The ATD0STAT0 &amp;amp; ATD0STAT1 registers show acquisition complete on all channels.&amp;nbsp; I typically read 0x03 when I should be reading 0x2000.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Jun 2016 17:06:03 GMT</pubDate>
    <dc:creator>KH_SRNL</dc:creator>
    <dc:date>2016-06-06T17:06:03Z</dc:date>
    <item>
      <title>Scanning Multiple ATD channels with the MC9S12XDP512</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Scanning-Multiple-ATD-channels-with-the-MC9S12XDP512/m-p/515200#M12510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm unable to successfully configure the MC9S12XDP512 for a multiple channel ATD acquisition.&amp;nbsp; I can scan individual channels and get correct results, but when configured for multiple mode, the results are garbage.&amp;nbsp; I've used the same code base on the MC9S12C132 chip (for ATD0) and it works correctly (for multiple channel scans).&amp;nbsp; Is there something specific about the MC9S12X that I'm not catching?&amp;nbsp; My register settings are as follows:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ATD0CTL2 = 0x80&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //normal ATD operation with no fast clear and no external trigger&lt;/P&gt;&lt;P&gt;ATD0CTL3 = 0x40;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //8 conversions per sequence, conversions placed in corresponding registers&lt;/P&gt;&lt;P&gt;ATD0CTL4 = 0x05;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //10 bit resolution, 2 A/D clock periods per conversion, divide by 12; (8HMz bus clock)&lt;/P&gt;&lt;P&gt;ATD0CTL1 = 0x00;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //should not matter, no external trigger used&lt;/P&gt;&lt;P&gt;ATD0CTL0 = 0x01;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //wrap set to AN1; but should not be needed&lt;/P&gt;&lt;P&gt;ATD0CTL5 = 0x90;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //right justified data, multi-channel conversion, start on AN0&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The ATD0STAT0 &amp;amp; ATD0STAT1 registers show acquisition complete on all channels.&amp;nbsp; I typically read 0x03 when I should be reading 0x2000.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2016 17:06:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Scanning-Multiple-ATD-channels-with-the-MC9S12XDP512/m-p/515200#M12510</guid>
      <dc:creator>KH_SRNL</dc:creator>
      <dc:date>2016-06-06T17:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: Scanning Multiple ATD channels with the MC9S12XDP512</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Scanning-Multiple-ATD-channels-with-the-MC9S12XDP512/m-p/515201#M12511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;probably I am missing something but could you please confirm you want to measure channel 0 for 8 times with atdclk = 1.33Mhz, without interrupt.&lt;/P&gt;&lt;P&gt;BTW, have you checked the pin you measure is the right one and all ATD sources and references are OK. (not a joke. It is own experience). Then try to measure simple channel only in the loop to check everything is OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... or describe what you want to measure and I will prepare something.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri',sans-serif;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri',sans-serif;"&gt;Ladislav&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2016 06:39:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Scanning-Multiple-ATD-channels-with-the-MC9S12XDP512/m-p/515201#M12511</guid>
      <dc:creator>lama</dc:creator>
      <dc:date>2016-06-07T06:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: Scanning Multiple ATD channels with the MC9S12XDP512</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Scanning-Multiple-ATD-channels-with-the-MC9S12XDP512/m-p/515202#M12512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;... a few examples ....see attachment.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2016 06:42:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Scanning-Multiple-ATD-channels-with-the-MC9S12XDP512/m-p/515202#M12512</guid>
      <dc:creator>lama</dc:creator>
      <dc:date>2016-06-07T06:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: Scanning Multiple ATD channels with the MC9S12XDP512</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Scanning-Multiple-ATD-channels-with-the-MC9S12XDP512/m-p/515203#M12513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I obviously missed something in the register setup.&amp;nbsp; I thought ATD0CTL5 = 0x90 would start at channel 0 and scan 8 channels with the results placed in the corresponding registers.&amp;nbsp; The results will be right justified (10 bit conversion per settings in ATD0CTL4).&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at your example code for a multichan conversion, ATD0CTL5 is set to 0x11.&amp;nbsp; It appears we both have the same bit selected for a multichan conversion (0x10). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please clarify what I'm missing?&amp;nbsp; You stated my register settings will do 8 conversions on chan 0 and I don't understand.&amp;nbsp; Based on the ATD0CTL5 settings, it appears my code will do conversions on 8 different channels (0 through 7).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2016 12:14:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Scanning-Multiple-ATD-channels-with-the-MC9S12XDP512/m-p/515203#M12513</guid>
      <dc:creator>KH_SRNL</dc:creator>
      <dc:date>2016-06-09T12:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: Scanning Multiple ATD channels with the MC9S12XDP512</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Scanning-Multiple-ATD-channels-with-the-MC9S12XDP512/m-p/515204#M12514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually I did check the pin on the processor.&amp;nbsp; I've made that mistake as well and the board is a custom build, so solder joints are always a concern.&amp;nbsp; I can read the individual channels in single channel mode (ATD0CTL5 = 0x8X where X represents the channel of interest).&amp;nbsp; I have a routine where I call my channels of interest (via the SCI port), read and report results.&amp;nbsp; I can read all channels as long as I do them individually (multiple conversion bit not set in control register 5).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want to do is measure all 8 channels of ATD0&amp;nbsp; with results stored in corresponding registers.&amp;nbsp; My PLL is active (8 MHz bus clock, 16 MHz system clock).&amp;nbsp; I'm running 10 bit resolution, right justified.&amp;nbsp; I don't want continuous scanning, just a single pass of all 8 channels with internal triggering (Scan - single, multiple channels).&amp;nbsp; I don't need an interrupt.&amp;nbsp; I just want to start the conversion and come back latter to grab the results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2016 15:47:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Scanning-Multiple-ATD-channels-with-the-MC9S12XDP512/m-p/515204#M12514</guid>
      <dc:creator>KH_SRNL</dc:creator>
      <dc:date>2016-06-10T15:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Scanning Multiple ATD channels with the MC9S12XDP512</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Scanning-Multiple-ATD-channels-with-the-MC9S12XDP512/m-p/515205#M12515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I am sorry for delay. I was not connected - vacation. Have you solved the issue or you still need a help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2016 08:21:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Scanning-Multiple-ATD-channels-with-the-MC9S12XDP512/m-p/515205#M12515</guid>
      <dc:creator>lama</dc:creator>
      <dc:date>2016-06-27T08:21:21Z</dc:date>
    </item>
  </channel>
</rss>

