<?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のトピックodd behavior PTB2/PTB3 on 908jk3</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/odd-behavior-PTB2-PTB3-on-908jk3/m-p/132154#M2948</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;this is driving me nuts! i had problems programming and attributed it to other changes i had made, not so! i have simplified the code and can create the problem on demand. the two lines below ;hardware init cause the programmer (usbmultilink) to do some unusual things. if i reverse the lines so that PTB3 is cleared before PTB2 is set everything works as expected. if i program the chip with the lines in te current order i get no error messages, however {F5} reports that the processor is running and the green led does not light. if i disconnect the multilink and run from a power supply the green led does not light either. swapping the two lines works great on either the in circuit debugger or the stand alone. has this been identified before?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;main:&lt;BR /&gt;_Startup:&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mov&amp;nbsp;&amp;nbsp;#%00000001,CONFIG1&amp;nbsp;&amp;nbsp;;disable the cop&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;rsp&lt;/DIV&gt;&lt;DIV&gt;;hardware init&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;bset&amp;nbsp; 2,PTB&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; ;ensure red is off&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;bclr&amp;nbsp; 3,PTB&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; ;start with a green light&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mov&amp;nbsp;&amp;nbsp; #%11111111, DDRA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;porta is not bonded set as outputs&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;mov&amp;nbsp;&amp;nbsp; #%00001100, DDRB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;portb d7..d4 analog, d3=redled d2 grnled, d1,d0 mono8 interface&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;mov&amp;nbsp;&amp;nbsp; #%00110011, DDRD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;portd d7,d6 undefined digital inputs, d5,d4 injector drv, d3,d2 analog current monitors d1,d0 unbonded&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;bra&amp;nbsp;&amp;nbsp; *&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;best regards,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;ed&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Oct 2006 06:25:47 GMT</pubDate>
    <dc:creator>eeetee</dc:creator>
    <dc:date>2006-10-04T06:25:47Z</dc:date>
    <item>
      <title>odd behavior PTB2/PTB3 on 908jk3</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/odd-behavior-PTB2-PTB3-on-908jk3/m-p/132154#M2948</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;this is driving me nuts! i had problems programming and attributed it to other changes i had made, not so! i have simplified the code and can create the problem on demand. the two lines below ;hardware init cause the programmer (usbmultilink) to do some unusual things. if i reverse the lines so that PTB3 is cleared before PTB2 is set everything works as expected. if i program the chip with the lines in te current order i get no error messages, however {F5} reports that the processor is running and the green led does not light. if i disconnect the multilink and run from a power supply the green led does not light either. swapping the two lines works great on either the in circuit debugger or the stand alone. has this been identified before?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;main:&lt;BR /&gt;_Startup:&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mov&amp;nbsp;&amp;nbsp;#%00000001,CONFIG1&amp;nbsp;&amp;nbsp;;disable the cop&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;rsp&lt;/DIV&gt;&lt;DIV&gt;;hardware init&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;bset&amp;nbsp; 2,PTB&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; ;ensure red is off&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;bclr&amp;nbsp; 3,PTB&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; ;start with a green light&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mov&amp;nbsp;&amp;nbsp; #%11111111, DDRA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;porta is not bonded set as outputs&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;mov&amp;nbsp;&amp;nbsp; #%00001100, DDRB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;portb d7..d4 analog, d3=redled d2 grnled, d1,d0 mono8 interface&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;mov&amp;nbsp;&amp;nbsp; #%00110011, DDRD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;portd d7,d6 undefined digital inputs, d5,d4 injector drv, d3,d2 analog current monitors d1,d0 unbonded&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;bra&amp;nbsp;&amp;nbsp; *&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;best regards,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;ed&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 06:25:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/odd-behavior-PTB2-PTB3-on-908jk3/m-p/132154#M2948</guid>
      <dc:creator>eeetee</dc:creator>
      <dc:date>2006-10-04T06:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: odd behavior PTB2/PTB3 on 908jk3</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/odd-behavior-PTB2-PTB3-on-908jk3/m-p/132155#M2949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;If it makes you feel any better, about a year and a half ago I reported to Freescale a very similar odd behavior with a QY4 chip.&amp;nbsp; I quote a part of that message:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;"I have noticed the following behavior in a batch of QY4 chips, marked as Freescale with mask revision RMDD0447:&lt;BR /&gt;&lt;BR /&gt;After reset, writing a value to PORTA and then setting the DDRA to outputs does not work, i.e., pins do not change to the expected state.&amp;nbsp; If I set the DDRA to outputs first, then write the value to PORTA it works OK."&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;This happened for only a certain mask I had in stock.&amp;nbsp; They said they will investigate it but they never replied if they could verify this.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 12:58:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/odd-behavior-PTB2-PTB3-on-908jk3/m-p/132155#M2949</guid>
      <dc:creator>tonyp</dc:creator>
      <dc:date>2006-10-04T12:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: odd behavior PTB2/PTB3 on 908jk3</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/odd-behavior-PTB2-PTB3-on-908jk3/m-p/132156#M2950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Believe it or not, this is expected behavior.&lt;BR /&gt;&lt;BR /&gt;The reason that this is what you should expect is that you a using BSET and BCLR instructions when the port is still configured as an input. BSET and BCLR are read/modify/write instructions, but what is written is not what will later be read by the BSET/BCLR if the pins are configured as inputs. In other words, setting one bit with BSET would corrupt other bits in that byte, and the same is true with BCLR.&lt;BR /&gt;&lt;BR /&gt;Either of the following will solve the problem:&lt;BR /&gt;1) Set the pins as outputs before using BSET or BCLR on them. or&lt;BR /&gt;2) Use a STA instruction to write the port instead of a BSET or BCLR&lt;BR /&gt;&lt;BR /&gt;I hope that was understandable . . .&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 14:11:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/odd-behavior-PTB2-PTB3-on-908jk3/m-p/132156#M2950</guid>
      <dc:creator>rocco</dc:creator>
      <dc:date>2006-10-04T14:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: odd behavior PTB2/PTB3 on 908jk3</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/odd-behavior-PTB2-PTB3-on-908jk3/m-p/132157#M2951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Nice catch!&amp;nbsp; They tell you to set the pin state before making it an output (to avoid possible unwanted pulses) and that can get you, if not careful.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;[I'd better check if my problem was due to such an oversight, also (although I normally use STA for initializing variables, ports, etc) if I can remember which program it was!]&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 16:32:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/odd-behavior-PTB2-PTB3-on-908jk3/m-p/132157#M2951</guid>
      <dc:creator>tonyp</dc:creator>
      <dc:date>2006-10-04T16:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: odd behavior PTB2/PTB3 on 908jk3</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/odd-behavior-PTB2-PTB3-on-908jk3/m-p/132158#M2952</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;thanks guys! i thought i may have some oddball hardware issue or an errant firing synapse.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;regards,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;ed&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2006 23:29:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/odd-behavior-PTB2-PTB3-on-908jk3/m-p/132158#M2952</guid>
      <dc:creator>eeetee</dc:creator>
      <dc:date>2006-10-04T23:29:24Z</dc:date>
    </item>
  </channel>
</rss>

