<?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>Kinetis MicrocontrollersのトピックRe: convert data 16 bit to 8 bit so as to use UART</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/convert-data-16-bit-to-8-bit-so-as-to-use-UART/m-p/320137#M14327</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Waqas Butt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;uinit16_t Temp;&lt;/P&gt;&lt;P&gt;Temp=(25-(ADCR_temp-ADC_temp25)*100/ADC_m);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result is in 16bit data. when I cast (byte) Temp. The result will be error , and I get " #" character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MInh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jun 2014 14:47:20 GMT</pubDate>
    <dc:creator>nguyennhatminh</dc:creator>
    <dc:date>2014-06-17T14:47:20Z</dc:date>
    <item>
      <title>convert data 16 bit to 8 bit so as to use UART</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/convert-data-16-bit-to-8-bit-so-as-to-use-UART/m-p/320134#M14324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm working on KL05Z. I accomplished 12 bit ADC of temperature of MCU and now I wish to send the result to PC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the 16 bit variant to content the result , when I try to cast (byte), for sending data ,the result become " #".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know how to solve this problem ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your reply will be highly appreciate ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Minh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2014 10:25:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/convert-data-16-bit-to-8-bit-so-as-to-use-UART/m-p/320134#M14324</guid>
      <dc:creator>nguyennhatminh</dc:creator>
      <dc:date>2014-06-17T10:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: convert data 16 bit to 8 bit so as to use UART</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/convert-data-16-bit-to-8-bit-so-as-to-use-UART/m-p/320135#M14325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Nguyen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't understand your problem what do you mean by "the result becomes #"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Waqas Ehsan Butt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2014 13:01:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/convert-data-16-bit-to-8-bit-so-as-to-use-UART/m-p/320135#M14325</guid>
      <dc:creator>waqasbutt</dc:creator>
      <dc:date>2014-06-17T13:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: convert data 16 bit to 8 bit so as to use UART</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/convert-data-16-bit-to-8-bit-so-as-to-use-UART/m-p/320136#M14326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Usually one would send the value as ASCII coded hex (for example)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;0x1234 from ADC could be sent as "1234" (4 bytes on the UART).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you simply cast to a byte you will lose 8 bits of the value. You could also send as 2 binary values rather than 1 (0x1234 -&amp;gt; 0x12 + 0x34)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2014 14:36:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/convert-data-16-bit-to-8-bit-so-as-to-use-UART/m-p/320136#M14326</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2014-06-17T14:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: convert data 16 bit to 8 bit so as to use UART</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/convert-data-16-bit-to-8-bit-so-as-to-use-UART/m-p/320137#M14327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Waqas Butt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;uinit16_t Temp;&lt;/P&gt;&lt;P&gt;Temp=(25-(ADCR_temp-ADC_temp25)*100/ADC_m);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result is in 16bit data. when I cast (byte) Temp. The result will be error , and I get " #" character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MInh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2014 14:47:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/convert-data-16-bit-to-8-bit-so-as-to-use-UART/m-p/320137#M14327</guid>
      <dc:creator>nguyennhatminh</dc:creator>
      <dc:date>2014-06-17T14:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: convert data 16 bit to 8 bit so as to use UART</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/convert-data-16-bit-to-8-bit-so-as-to-use-UART/m-p/320138#M14328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll try it out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Minh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2014 14:49:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/convert-data-16-bit-to-8-bit-so-as-to-use-UART/m-p/320138#M14328</guid>
      <dc:creator>nguyennhatminh</dc:creator>
      <dc:date>2014-06-17T14:49:09Z</dc:date>
    </item>
  </channel>
</rss>

