<?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>8-bit Microcontrollers中的主题 Re: HC908QY4A  A very peculiar bug</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HC908QY4A-A-very-peculiar-bug/m-p/175685#M12217</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello Tony P and Jim D,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thank you for pointing out the problem - I think a question of not seeing the wood for the trees.&amp;nbsp; Yes I do test the Z-flag to determine whether timout had occurred, or not.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Mac&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Jul 2008 00:31:11 GMT</pubDate>
    <dc:creator>bigmac</dc:creator>
    <dc:date>2008-07-25T00:31:11Z</dc:date>
    <item>
      <title>HC908QY4A  A very peculiar bug</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HC908QY4A-A-very-peculiar-bug/m-p/175682#M12214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello all,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Background -&lt;/DIV&gt;&lt;DIV&gt;I am using a QY4A device, in conjunction with assembly code, to decode an on-off keyed (OOK) signal that is output from a wireless receiver.&amp;nbsp; This signal is connected to the external IRQ pin.&amp;nbsp; The decode algorithm makes use of a pair of sub-routines that will exit when a change of state occurs, or after a timeout period has elapsed.&amp;nbsp; The sub-routines are designed to ignore short noise pulses from the receiver.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The assembly&amp;nbsp;code for one of the sub-routines is attached.&amp;nbsp; The other sub-routine is similar, except that it handles signal transitions of the opposite polarity.&amp;nbsp; The attached code operates as expected, and the decoding process is successful.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;However, when I attempted to replace the pair of instructions&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEC&amp;nbsp;&amp;nbsp;1,SP&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;BNE&amp;nbsp;&amp;nbsp;WL0&lt;/SPAN&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;with&amp;nbsp;the single instruction&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DBNZ&amp;nbsp; 1,SP,WL0&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;the decoding process failed.&amp;nbsp; I&amp;nbsp;tried preceeding the line with a couple of NOPs, so as to retain the same number of cycles, but to no avail.&amp;nbsp; It is as though the branch is always taken, or never taken - I can't be certain which one.&amp;nbsp; Full chip simulation gives the expected result.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I wonder if anyone else has experienced a similar problem.&amp;nbsp; It has certainly involved some head scratching for the last few days - perhaps I am missing something obvious.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Mac&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2008 22:28:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/HC908QY4A-A-very-peculiar-bug/m-p/175682#M12214</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2008-07-24T22:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: HC908QY4A  A very peculiar bug</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HC908QY4A-A-very-peculiar-bug/m-p/175683#M12215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Your code says:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;; On exit, ZF = 1 if timeout occurred.

DBNZ instructions do NOT affect the Z flag.  Could this be it?


&lt;/PRE&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:24:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/HC908QY4A-A-very-peculiar-bug/m-p/175683#M12215</guid>
      <dc:creator>tonyp</dc:creator>
      <dc:date>2020-10-29T09:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: HC908QY4A  A very peculiar bug</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HC908QY4A-A-very-peculiar-bug/m-p/175684#M12216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;The only difference I see between DEC and DBNZ is that DEC affects the conditions code and DBNZ does not.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You comments says:&lt;BR /&gt;&lt;PRE&gt;; On exit, ZF = 1 if timeout occurred.

So perhaps this is it...

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:24:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/HC908QY4A-A-very-peculiar-bug/m-p/175684#M12216</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2020-10-29T09:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: HC908QY4A  A very peculiar bug</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HC908QY4A-A-very-peculiar-bug/m-p/175685#M12217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello Tony P and Jim D,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thank you for pointing out the problem - I think a question of not seeing the wood for the trees.&amp;nbsp; Yes I do test the Z-flag to determine whether timout had occurred, or not.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Mac&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2008 00:31:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/HC908QY4A-A-very-peculiar-bug/m-p/175685#M12217</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2008-07-25T00:31:11Z</dc:date>
    </item>
  </channel>
</rss>

