<?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>S12 / MagniV MicrocontrollersのトピックProgramming MC9S12NE64</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Programming-MC9S12NE64/m-p/215246#M8990</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, I need some help with transferring code which was written for Boarduino to my freescale MC9S12NE64. This code lights up a diode when 'M' is send to microcontroller and doesn't when 'N' is being send. I send it with python script via USB. My diode is connected to PL0, PL1 and PL2 outputs and it is RGB diode. Here is the code that I am talking about: int outPin = 12; // Output connected to digital pin 12 int mail = LOW; // Is there new mail? int val; // Value read from the serial port void setup() { pinMode(outPin, OUTPUT); // sets the digital pin as output Serial.begin(9600); Serial.flush(); } void loop() { // Read from serial port if (Serial.available()) { val = Serial.read(); Serial.println(val); if (val == 'M') mail = HIGH; else if (val == 'N') mail = LOW; } // Set the status of the output pin digitalWrite(outPin, mail); } Pleas help me quick. I know that is silly task for some of you but for me in this moment is quite difficult. Thank you in advance for answer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Jan 2009 08:40:08 GMT</pubDate>
    <dc:creator>adrt</dc:creator>
    <dc:date>2009-01-12T08:40:08Z</dc:date>
    <item>
      <title>Programming MC9S12NE64</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Programming-MC9S12NE64/m-p/215246#M8990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, I need some help with transferring code which was written for Boarduino to my freescale MC9S12NE64. This code lights up a diode when 'M' is send to microcontroller and doesn't when 'N' is being send. I send it with python script via USB. My diode is connected to PL0, PL1 and PL2 outputs and it is RGB diode. Here is the code that I am talking about: int outPin = 12; // Output connected to digital pin 12 int mail = LOW; // Is there new mail? int val; // Value read from the serial port void setup() { pinMode(outPin, OUTPUT); // sets the digital pin as output Serial.begin(9600); Serial.flush(); } void loop() { // Read from serial port if (Serial.available()) { val = Serial.read(); Serial.println(val); if (val == 'M') mail = HIGH; else if (val == 'N') mail = LOW; } // Set the status of the output pin digitalWrite(outPin, mail); } Pleas help me quick. I know that is silly task for some of you but for me in this moment is quite difficult. Thank you in advance for answer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jan 2009 08:40:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Programming-MC9S12NE64/m-p/215246#M8990</guid>
      <dc:creator>adrt</dc:creator>
      <dc:date>2009-01-12T08:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Programming MC9S12NE64</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Programming-MC9S12NE64/m-p/215247#M8991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi&lt;BR /&gt;&lt;BR /&gt;Add these defines:&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;#define pinMode(outPin, IO)    if (IO == OUTPUT) { DDRL |= outPin; } else { DDRL &amp;amp;= ~outPin; }#define digitalWrite(outPin, state)   if (state == HIGH) { PTL |= outPin; } else { PTL &amp;amp;= ~outPin; }&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;&amp;nbsp;Then change outPin to 0x01, 0x02 or 0x04, depending on whether you want it to control PL0, PL1 or PL2&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Mark&lt;BR /&gt;&lt;A href="http://www.uTasker.com" rel="nofollow noopener noreferrer" target="_blank"&gt;&lt;BR /&gt;www.uTasker.com&lt;/A&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Feb 2009 21:29:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Programming-MC9S12NE64/m-p/215247#M8991</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2009-02-01T21:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Programming MC9S12NE64</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Programming-MC9S12NE64/m-p/215248#M8992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi,&lt;BR /&gt;I changed the code but it still doesn't work. Now it looks like this:&lt;BR /&gt;&lt;BR /&gt;#include &amp;lt;hidef.h&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* common defines and macros */&lt;BR /&gt;#include &amp;lt;MC9S12NE64.h&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* derivative information */&lt;BR /&gt;&lt;BR /&gt;#define pinMode(outPin, IO)&amp;nbsp;&amp;nbsp;&amp;nbsp; if (IO == OUTPUT) { DDRL |= outPin; } else { DDRL &amp;amp;= ~outPin; }&lt;BR /&gt;#define digitalWrite(outPin, state)&amp;nbsp;&amp;nbsp; if (state == HIGH) { PTL |= outPin; } else { PTL &amp;amp;= ~outPin; }&lt;BR /&gt;&lt;BR /&gt;int outPin = 0x01; // Output connected to digital pin 12&lt;BR /&gt;int mail = 0; // Is there new mail?&lt;BR /&gt;int val; // Value read from the serial port&lt;BR /&gt;void main(void) {&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;void setup()&lt;BR /&gt;&lt;BR /&gt;pinMode(outPin, OUTPUT);&lt;BR /&gt;Serial.begin(9600);&lt;BR /&gt;Serial.flush();&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;void loop()&lt;BR /&gt;{&lt;BR /&gt;// Read from serial port&lt;BR /&gt;if (Serial.available())&lt;BR /&gt;{&lt;BR /&gt;val = Serial.read();&lt;BR /&gt;Serial.println(val);&lt;BR /&gt;if (val == 'M') mail = 1;&lt;BR /&gt;else if (val == 'N') mail = 0;&lt;BR /&gt;}&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;// Set the status of the output pin&lt;BR /&gt;digitalWrite(outPin, mail);&lt;BR /&gt;}&lt;BR /&gt;&amp;nbsp; /* put your own code here */&lt;BR /&gt;&amp;nbsp; EnableInterrupts;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; for(;&lt;IMG alt=":smileywink:" class="emoticon emoticon-smileywink" id="smileywink" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif" title="Smiley Wink" /&gt; {} /* wait forever */&lt;BR /&gt;&amp;nbsp; /* please make sure that you never leave this function */&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Can you change it to make it work ??&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2009 06:13:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Programming-MC9S12NE64/m-p/215248#M8992</guid>
      <dc:creator>adrt</dc:creator>
      <dc:date>2009-02-04T06:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Programming MC9S12NE64</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Programming-MC9S12NE64/m-p/215249#M8993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;What is "OUTPUT" declared as?&lt;BR /&gt;&lt;BR /&gt;Also, if you write 0x01 to DDRL and 0x01 to PTL in the memory map of the debugger, do you get any outputs then? If not, the problem isn't software-related.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Feb 2009 18:58:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Programming-MC9S12NE64/m-p/215249#M8993</guid>
      <dc:creator>Lundin</dc:creator>
      <dc:date>2009-02-05T18:58:53Z</dc:date>
    </item>
  </channel>
</rss>

