<?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>topic Re: Codewarrior Timer and converter in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-Timer-and-converter/m-p/135235#M1682</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;thanks i have ever seen this text about the fonction ,&lt;/P&gt;&lt;P&gt;my problem is : Iwnt use this fonction to change the frequency of timer&lt;/P&gt;&lt;P&gt;After the frequency will be using by a LED to blinking frequency&lt;/P&gt;&lt;P&gt;&amp;nbsp;int i=1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;extern word ADCValue;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;byte err;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;void main(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/&lt;BR /&gt;&amp;nbsp;PE_low_level_init();&lt;/P&gt;&lt;P&gt;while (i&amp;gt;0)&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;err=Timer_SetFreqHz(AD1_GetValue16(&amp;amp;ADCValue));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LedOutput_NegVal();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&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;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how use this fonction to change frequency ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 May 2006 21:43:24 GMT</pubDate>
    <dc:creator>Nicom</dc:creator>
    <dc:date>2006-05-11T21:43:24Z</dc:date>
    <item>
      <title>Codewarrior Timer and converter</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-Timer-and-converter/m-p/135229#M1676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I want to use this fonction to change the frequence of the timer but&lt;/DIV&gt;&lt;DIV&gt;i can't because there are always error&lt;/DIV&gt;&lt;DIV&gt;How use this function&amp;nbsp;?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;byte Timer_SetFreqHz(word Freq)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I have the same problem to the converter i want to stock the value in variable&amp;nbsp; with that how do&amp;nbsp;I do ?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;byte AD1_GetValue16(word *Values)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;help me please&lt;/DIV&gt;&lt;DIV&gt;thanks&lt;/DIV&gt;&lt;DIV&gt;Nico&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 May 2006 17:24:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-Timer-and-converter/m-p/135229#M1676</guid>
      <dc:creator>Nicom</dc:creator>
      <dc:date>2006-05-09T17:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: Codewarrior Timer and converter</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-Timer-and-converter/m-p/135230#M1677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;A little more information, please. What's the target processor/platform? What version of CodeWarrior are you using?&lt;BR /&gt;&lt;BR /&gt;---Tom&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 May 2006 19:46:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-Timer-and-converter/m-p/135230#M1677</guid>
      <dc:creator>J2MEJediMaster</dc:creator>
      <dc:date>2006-05-09T19:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Codewarrior Timer and converter</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-Timer-and-converter/m-p/135231#M1678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Sorry,&amp;nbsp;I use a MC9S08GT16&lt;/P&gt;&lt;P&gt;44 QFP&lt;/P&gt;&lt;P&gt;and I work with codewarrior 5.7&lt;/P&gt;&lt;P&gt;My problem is I don't now how use this fonction&lt;/P&gt;&lt;P&gt;Timer_SetFreqHz()&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;I want to change frequence with an input but i'm a newbee with codewarrior &amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Nico&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2006 14:59:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-Timer-and-converter/m-p/135231#M1678</guid>
      <dc:creator>Nicom</dc:creator>
      <dc:date>2006-05-10T14:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: Codewarrior Timer and converter</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-Timer-and-converter/m-p/135232#M1679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I don't know how change a frequency of timer&lt;/DIV&gt;&lt;DIV&gt;i think that is with this function but I'm not sure&lt;/DIV&gt;&lt;DIV&gt;if there are people to explain me how do I make?&lt;/DIV&gt;&lt;DIV&gt;thanks&lt;/DIV&gt;&lt;DIV&gt;Nico&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Sorry for my english which is bad !&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2006 18:31:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-Timer-and-converter/m-p/135232#M1679</guid>
      <dc:creator>Nicom</dc:creator>
      <dc:date>2006-05-10T18:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: Codewarrior Timer and converter</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-Timer-and-converter/m-p/135233#M1680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Sorry, I'm have a tough time tracking down that function. Is there a document file that you're getting that from? This way we can both be on the same page and determine what the function is doing.&lt;BR /&gt;&lt;BR /&gt;---Tom&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 May 2006 22:19:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-Timer-and-converter/m-p/135233#M1680</guid>
      <dc:creator>J2MEJediMaster</dc:creator>
      <dc:date>2006-05-10T22:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Codewarrior Timer and converter</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-Timer-and-converter/m-p/135234#M1681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;PRE&gt;&lt;A target="_blank"&gt;&lt;B&gt;&lt;FONT face="Arial" size="2"&gt;SetFreqHz&lt;/FONT&gt;&lt;/B&gt;&lt;/A&gt; &lt;FONT face="Arial" size="2"&gt;- this method sets the new frequency of the output signal.&lt;/FONT&gt; &lt;FONT face="Arial" size="2"&gt;The frequency is expressed in &lt;B&gt;Hz&lt;/B&gt; as a 16-bit unsigned integer number. This method is only available when the runtime setting type 'from interval' is selected in the Timing Dialog box&lt;/FONT&gt; &lt;FONT face="Arial" size="2"&gt;of the Runtime setting area.&lt;/FONT&gt;&lt;/PRE&gt;&lt;UL&gt;&lt;LI style="list-style: none"&gt;&lt;BR /&gt;&lt;FONT face="Arial"&gt;&lt;FONT size="2"&gt;&lt;I&gt;ANSIC prototype:&lt;/I&gt; byte SetFreqHz(word Freq)&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="Arial"&gt;&lt;FONT size="2"&gt;&lt;I&gt;Freq:word&lt;/I&gt; - Frequency to set [in Hz]&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT face="Arial"&gt;&lt;FONT size="2"&gt;&lt;I&gt;Return value:byte&lt;/I&gt; - Error code, possible codes:&lt;BR /&gt;ERR_OK - OK&lt;BR /&gt;ERR_SPEED - This device does not work in the active speed mode&lt;BR /&gt;ERR_MATH - Overflow during evaluation&lt;BR /&gt;ERR_RANGE - Parameter out of range&lt;/FONT&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT size="2"&gt;For more info see help for selected bean, especially Typical Usage page.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Best Regard, Jan Pospisilik, Processor Expert Support&lt;/FONT&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2006 19:09:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-Timer-and-converter/m-p/135234#M1681</guid>
      <dc:creator>ProcessorExpert</dc:creator>
      <dc:date>2006-05-11T19:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: Codewarrior Timer and converter</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-Timer-and-converter/m-p/135235#M1682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;thanks i have ever seen this text about the fonction ,&lt;/P&gt;&lt;P&gt;my problem is : Iwnt use this fonction to change the frequency of timer&lt;/P&gt;&lt;P&gt;After the frequency will be using by a LED to blinking frequency&lt;/P&gt;&lt;P&gt;&amp;nbsp;int i=1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;extern word ADCValue;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;byte err;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;void main(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/&lt;BR /&gt;&amp;nbsp;PE_low_level_init();&lt;/P&gt;&lt;P&gt;while (i&amp;gt;0)&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;err=Timer_SetFreqHz(AD1_GetValue16(&amp;amp;ADCValue));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LedOutput_NegVal();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&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;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how use this fonction to change frequency ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2006 21:43:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-Timer-and-converter/m-p/135235#M1682</guid>
      <dc:creator>Nicom</dc:creator>
      <dc:date>2006-05-11T21:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Codewarrior Timer and converter</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-Timer-and-converter/m-p/135236#M1683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi, Nico:&lt;BR /&gt;&lt;BR /&gt;The function Timer_SetFreqHz() requires a word parameter, but according to the prototype in your first post, the function AD1_GetValue16() returns a byte.&lt;BR /&gt;&lt;BR /&gt;You could try a caste:&lt;BR /&gt;&lt;BR /&gt;err=Timer_SetFreqHz( &lt;B&gt;(word)&lt;/B&gt;AD1_GetValue16(&amp;amp;ADCValue) );&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 May 2006 23:59:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-Timer-and-converter/m-p/135236#M1683</guid>
      <dc:creator>rocco</dc:creator>
      <dc:date>2006-05-11T23:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: Codewarrior Timer and converter</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-Timer-and-converter/m-p/135237#M1684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;FONT face="Tms Rmn"&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT face="Tms Rmn"&gt;&lt;FONT size="2"&gt;&lt;EM&gt;err=Timer_SetFreqHz(AD1_GetValue16(&amp;amp;ADCValue))&lt;/EM&gt;&amp;nbsp; isn't&amp;nbsp; correctly, the GetVaule16 method returns error code, not measured value. Try to use e.g.:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Tms Rmn"&gt;&lt;FONT size="2"&gt;&lt;EM&gt;err = AD1_GetValue16(&amp;amp;ADCValue); err = Timer_SetFreqHz(ADCValue);&lt;/EM&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Tms Rmn"&gt;&lt;FONT size="2"&gt;The another incorrect thing is a location of "LedOutput_NegVal();", this command should be called from Timer event from event.c.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Tms Rmn"&gt;&lt;FONT size="2"&gt;Best Regards,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Tms Rmn"&gt;&lt;FONT size="2"&gt;Jan Pospisilik, Processor Expert Support&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Tms Rmn"&gt;&lt;FONT face="Tms Rmn"&gt;&lt;/FONT&gt;&lt;FONT face="Tms Rmn"&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 May 2006 20:48:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Codewarrior-Timer-and-converter/m-p/135237#M1684</guid>
      <dc:creator>ProcessorExpert</dc:creator>
      <dc:date>2006-05-18T20:48:02Z</dc:date>
    </item>
  </channel>
</rss>

