<?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 HCS08 uart and 7 bits+parity in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HCS08-uart-and-7-bits-parity/m-p/160039#M9585</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As far as I can tell from the datasheet and Processor Expert the HCS08(DZnnnn) cannot&lt;/P&gt;&lt;P&gt;be set to 7 bit characters+parity.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this is not true, can someone please explain where I may have slipped in my thinking.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If true, is there a efficient way to find the parity of the 7 lsb's&lt;/P&gt;&lt;P&gt;apart from the obvious shift/test/count method? ( and then stuff it into bit 7)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Anders J&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Aug 2011 00:08:03 GMT</pubDate>
    <dc:creator>AndersJ</dc:creator>
    <dc:date>2011-08-18T00:08:03Z</dc:date>
    <item>
      <title>HCS08 uart and 7 bits+parity</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HCS08-uart-and-7-bits-parity/m-p/160039#M9585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As far as I can tell from the datasheet and Processor Expert the HCS08(DZnnnn) cannot&lt;/P&gt;&lt;P&gt;be set to 7 bit characters+parity.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this is not true, can someone please explain where I may have slipped in my thinking.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If true, is there a efficient way to find the parity of the 7 lsb's&lt;/P&gt;&lt;P&gt;apart from the obvious shift/test/count method? ( and then stuff it into bit 7)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Anders J&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2011 00:08:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/HCS08-uart-and-7-bits-parity/m-p/160039#M9585</guid>
      <dc:creator>AndersJ</dc:creator>
      <dc:date>2011-08-18T00:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: HCS08 uart and 7 bits+parity</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HCS08-uart-and-7-bits-parity/m-p/160040#M9586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Anders,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the datasheet (Table 14.4), there is the following -&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT color="#339966" face="arial,helvetica,sans-serif" size="2"&gt;Parity Enable&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966" face="arial,helvetica,sans-serif" size="2"&gt;—Enables hardware parity generation and checking. When parity is enabled, the most significant&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT color="#339966" face="arial,helvetica,sans-serif" size="2"&gt;bit (MSB) of the data character (eighth or ninth data bit) is treated as the parity bit.&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&amp;nbsp;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT color="#808080" face="arial,helvetica,sans-serif" size="2"&gt;So it would appear that enabling parity whilst in 8-bit mode will achieve what you require.&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&amp;nbsp;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT color="#808080" face="arial,helvetica,sans-serif" size="2"&gt;Writing code to generate the&amp;nbsp;parity bit can be achieved by two basic methods -&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT color="#808080" face="arial,helvetica,sans-serif" size="2"&gt;Shift and count as you describe, which should be code efficient, but slow, or&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT color="#808080" face="arial,helvetica,sans-serif" size="2"&gt;Table lookup method, which is fast, but not code efficient because of the size of the lookup table.&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&amp;nbsp;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT color="#808080" face="arial,helvetica,sans-serif" size="2"&gt;Another variation is to use a lookup table to handle each nybble, and then combine the results of the two nybbles.&amp;nbsp;This would need a much smaller 16 entry lookup table, but should still be relatively fast.&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&amp;nbsp;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT color="#808080" face="arial,helvetica,sans-serif" size="2"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT color="#808080" face="arial,helvetica,sans-serif" size="2"&gt;Mac&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2011 01:46:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/HCS08-uart-and-7-bits-parity/m-p/160040#M9586</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2011-08-18T01:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: HCS08 uart and 7 bits+parity</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HCS08-uart-and-7-bits-parity/m-p/160041#M9587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mac,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for you help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anders&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2011 14:03:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/HCS08-uart-and-7-bits-parity/m-p/160041#M9587</guid>
      <dc:creator>AndersJ</dc:creator>
      <dc:date>2011-08-18T14:03:24Z</dc:date>
    </item>
  </channel>
</rss>

