<?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>Classic/Legacy CodeWarriorのトピックRe: CW8/DemoBoard56F8357/ProcessorExpert - ADC code problem</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CW8-DemoBoard56F8357-ProcessorExpert-ADC-code-problem/m-p/153231#M2218</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Sorry for the delay.&lt;/DIV&gt;&lt;DIV&gt;This is not easy to determine the cause of the problem.&lt;BR /&gt;The better way will be to log it directly in the Technical support system.&lt;BR /&gt;Please use Freescale on line support web page.&lt;BR /&gt;&amp;nbsp; - Go to following URL: &lt;A href="http://www.freescale.com/TechSupport" rel="nofollow" target="_blank"&gt;http://www.freescale.com/TechSupport&lt;/A&gt;&lt;BR /&gt;&amp;nbsp; - Click on Submit a Service Request. You will come to a login page.&lt;BR /&gt;&amp;nbsp; - You can submit your request through the web from there.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Please provide us more details about the Tool version used.&lt;BR /&gt;To do that you must:&lt;BR /&gt;* CW:&lt;BR /&gt;Start the IDE and click on Help | About Metrowerks CodeWarrior.&lt;BR /&gt;Click on Installed Products&amp;nbsp;&lt;BR /&gt;Provide us all info displayed.&lt;BR /&gt;Or you can save them in a txt file.&lt;/DIV&gt;&lt;DIV&gt;Can you please provide us your example reproducing the issue ?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Pascal&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Nov 2007 16:47:04 GMT</pubDate>
    <dc:creator>trytohelp</dc:creator>
    <dc:date>2007-11-14T16:47:04Z</dc:date>
    <item>
      <title>CW8/DemoBoard56F8357/ProcessorExpert - ADC code problem</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CW8-DemoBoard56F8357-ProcessorExpert-ADC-code-problem/m-p/153228#M2215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;HI,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am having one problem in my code for ADC. My Events.c&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IRQB:&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;#pragma interrupt called /* Comment this line if the appropriate 'Interrupt preserve registers' property */&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* is set to 'yes' (#pragma interrupt saveall is generated before the ISR)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */void BTB_OnInterrupt(void){&amp;nbsp;&amp;nbsp; ADCA__Enable();&amp;nbsp;&amp;nbsp; ADCA__EnableEvent();}&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;ADCA__OnEnd:&lt;BR /&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;void ADCA__OnEnd(void){ byte store;&amp;nbsp;&amp;nbsp; word valores[8];&amp;nbsp;&amp;nbsp; word threshold = 16384; //32768/2 (Max_ADC_Resolution_divided_by_two)&amp;nbsp;&amp;nbsp; //==============================&amp;nbsp;&amp;nbsp;&amp;nbsp; Frac16&amp;nbsp; canal0,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; canal1,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; canal2,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; canal3;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; store = ADCA__GetValue16(valores);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; canal0 = (Frac16)((long)valores[0] - 32768);&amp;nbsp;&amp;nbsp; canal1 = (Frac16)((long)valores[1] - 32768);&amp;nbsp;&amp;nbsp; canal2 = (Frac16)((long)valores[2] - 32768);&amp;nbsp;&amp;nbsp; canal3 = (Frac16)((long)valores[3] - 32768);&amp;nbsp;&amp;nbsp; if(canal0 &amp;lt; threshold)&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp; led3_NegVal();&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; else&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp; led5_NegVal();&amp;nbsp;&amp;nbsp; }}&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;Nothing occur in leds 3 or five, i used ADCA__Measure() in IRQB, debug stop in Measure and not read values.... What my code error??? Some example of how use adc?? Thank you!&lt;BR /&gt;&lt;/DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:56:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CW8-DemoBoard56F8357-ProcessorExpert-ADC-code-problem/m-p/153228#M2215</guid>
      <dc:creator>howdeterminepwm</dc:creator>
      <dc:date>2020-10-29T08:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: CW8/DemoBoard56F8357/ProcessorExpert - ADC code problem</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CW8-DemoBoard56F8357-ProcessorExpert-ADC-code-problem/m-p/153229#M2216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;All examples we've are delivered on the installation.&lt;/DIV&gt;&lt;DIV&gt;Please have a look to the folder:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; \Stationery\Processor_Expert_Examples\DemoApplications\HWBeans\56F83xx\&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;There are other examples using the ADC bean on the installation.&lt;/DIV&gt;&lt;DIV&gt;Please have a look to the example:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; \Stationery\Processor_Expert_Examples\DemoApplications\MotorControl\56F8357\3_BLDC_Quadrature_Encoder&lt;/DIV&gt;&lt;DIV&gt;This example refers to a pdf explaining it: TM_bldc_encoder.pdf&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Hope this will help you.&lt;/DIV&gt;&lt;DIV&gt;Pascal&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2007 19:28:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CW8-DemoBoard56F8357-ProcessorExpert-ADC-code-problem/m-p/153229#M2216</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2007-10-12T19:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: CW8/DemoBoard56F8357/ProcessorExpert - ADC code problem</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CW8-DemoBoard56F8357-ProcessorExpert-ADC-code-problem/m-p/153230#M2217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi all,&lt;BR /&gt;I am having reopen this post, because new problem&amp;nbsp; in adc. My problem isn't in read adc's, my code read adc and send value to global variable, one struct, for rs232 i request the read value of adc. I always receive the value equal in all requestions, for example 0x00 + 0x08, two bytes, because read value is 16 bits. I modifed the resistor connected in adc and the value read is 0x00 +&amp;nbsp; 0x08,&amp;nbsp; my&amp;nbsp; led on/off because the modify of resistor variable. My code is:&lt;BR /&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;void AD1_OnEnd(void){/*########### Variaveis internas da função ############*/ byte store, i = 0, j =0, k; word valores[8]; word threshold = 16384; //(32768/2) Metade da resolução total do ADC Frac16 canal[8];/*######################################################*/ store = AD1_GetValue16(valores); if(store == ERR_OK) { /* Armazena os valores lidos dos adc's no vetor canal */  for(k = 0; k &amp;lt; 8; k++)  {   canal[k] = (Frac16)((long)valores[k] - 32768);  }  // /* Coloca os valores no struct global pacote */   for (j = 0; j &amp;lt; 8; j++)  {   pct.ad1_canalValores[i] = (byte)canal[j];   pct.ad1_canalValores[i++] = canal[j] &amp;gt;&amp;gt; 8;       //soma mais 1 na varivel i para pular para a proxima posição do vetor   i++;  }  //  if(canal[0] &amp;gt; threshold)  {   led2_NegVal();  } } else {  Xmodem_SendError(AD1, store); } AD1_Measure(FALSE);}&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;&amp;nbsp;My problem is retourn value for rs232, value no modify... what i must make to request the correct value?? Sorry my english....&lt;BR /&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:56:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CW8-DemoBoard56F8357-ProcessorExpert-ADC-code-problem/m-p/153230#M2217</guid>
      <dc:creator>howdeterminepwm</dc:creator>
      <dc:date>2020-10-29T08:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: CW8/DemoBoard56F8357/ProcessorExpert - ADC code problem</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CW8-DemoBoard56F8357-ProcessorExpert-ADC-code-problem/m-p/153231#M2218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Sorry for the delay.&lt;/DIV&gt;&lt;DIV&gt;This is not easy to determine the cause of the problem.&lt;BR /&gt;The better way will be to log it directly in the Technical support system.&lt;BR /&gt;Please use Freescale on line support web page.&lt;BR /&gt;&amp;nbsp; - Go to following URL: &lt;A href="http://www.freescale.com/TechSupport" rel="nofollow" target="_blank"&gt;http://www.freescale.com/TechSupport&lt;/A&gt;&lt;BR /&gt;&amp;nbsp; - Click on Submit a Service Request. You will come to a login page.&lt;BR /&gt;&amp;nbsp; - You can submit your request through the web from there.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Please provide us more details about the Tool version used.&lt;BR /&gt;To do that you must:&lt;BR /&gt;* CW:&lt;BR /&gt;Start the IDE and click on Help | About Metrowerks CodeWarrior.&lt;BR /&gt;Click on Installed Products&amp;nbsp;&lt;BR /&gt;Provide us all info displayed.&lt;BR /&gt;Or you can save them in a txt file.&lt;/DIV&gt;&lt;DIV&gt;Can you please provide us your example reproducing the issue ?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Pascal&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2007 16:47:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CW8-DemoBoard56F8357-ProcessorExpert-ADC-code-problem/m-p/153231#M2218</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2007-11-14T16:47:04Z</dc:date>
    </item>
  </channel>
</rss>

