<?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 M68HC912B32 Serial Interrupt Examples in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/M68HC912B32-Serial-Interrupt-Examples/m-p/132216#M1679</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do any of you know of any good serial interrupt examples in assembler? I searched all over google and newsgroups and found some bits and pieces, but no well commented assembler code that simply shows how to set up the HC12's SCI, retrieve data from the serial port, etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Essential, all I want to do is ensure that the SCI is set up to interrupt when the line goes from idle to data. Retrieve the data, store it, and continue the rest of my program. Because I am using an EVB board, it is relatively difficult for me to write code that has visual feedback for me to test whether data is received and if the correct data is received. Hence, it would be very benficial to me to have example code so I could rule out that I am doing something wrong code-wise.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for all and any help,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Christian&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Apr 2006 08:15:05 GMT</pubDate>
    <dc:creator>cjw</dc:creator>
    <dc:date>2006-04-12T08:15:05Z</dc:date>
    <item>
      <title>M68HC912B32 Serial Interrupt Examples</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/M68HC912B32-Serial-Interrupt-Examples/m-p/132216#M1679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do any of you know of any good serial interrupt examples in assembler? I searched all over google and newsgroups and found some bits and pieces, but no well commented assembler code that simply shows how to set up the HC12's SCI, retrieve data from the serial port, etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Essential, all I want to do is ensure that the SCI is set up to interrupt when the line goes from idle to data. Retrieve the data, store it, and continue the rest of my program. Because I am using an EVB board, it is relatively difficult for me to write code that has visual feedback for me to test whether data is received and if the correct data is received. Hence, it would be very benficial to me to have example code so I could rule out that I am doing something wrong code-wise.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for all and any help,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Christian&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Apr 2006 08:15:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/M68HC912B32-Serial-Interrupt-Examples/m-p/132216#M1679</guid>
      <dc:creator>cjw</dc:creator>
      <dc:date>2006-04-12T08:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: M68HC912B32 Serial Interrupt Examples</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/M68HC912B32-Serial-Interrupt-Examples/m-p/132217#M1680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is for the xdp512, but is generic in nature so you could use it for the b32. it fills a 16 byte buffer with received data, and when the buffer is full it start over again. oddly enough, this weekend i'm writing a complete set of code for the b32 and if you are still having trouble i would give it to you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;FONT color="#008000" size="2"&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT color="#008000" size="2"&gt;;sci0 setup&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;movw&lt;/FONT&gt; &lt;FONT size="2"&gt;#130,sci0bd&lt;/FONT&gt; &lt;FONT color="#008000" size="2"&gt;;20000000/ (16*130)=9615&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;movb&lt;/FONT&gt; &lt;FONT size="2"&gt;#0,sci0cr1&lt;/FONT&gt; &lt;FONT color="#008000" size="2"&gt;;no loop, enabled in wait,internal tx/rx for loop,1 start 1stop 8bits,idle after no parity&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;movb&lt;/FONT&gt; &lt;FONT size="2"&gt;#%00101100,sci0cr2&lt;/FONT&gt; &lt;FONT color="#008000" size="2"&gt;;int on receive buffer full,tx+rx on,no wakeup, no break&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;;interrupt handler&lt;/P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size="2"&gt;svc_sci0 &lt;FONT color="#0000ff" size="2"&gt;ldx&lt;/FONT&gt; &lt;FONT size="2"&gt;#sci0_in_buffer&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;ldab&lt;/FONT&gt; &lt;FONT size="2"&gt;sci0_in_ptr&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;ldaa&lt;/FONT&gt; &lt;FONT size="2"&gt;sci0sr1&lt;/FONT&gt; &lt;FONT color="#008000" size="2"&gt;;need to read to clear the interrupt&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;ldaa&lt;/FONT&gt; &lt;FONT size="2"&gt;sci0drl&lt;/FONT&gt; &lt;FONT color="#008000" size="2"&gt;;fetch data and finish clearing the interrupt bit&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;staa&lt;/FONT&gt; &lt;FONT size="2"&gt;b,x&lt;/FONT&gt; &lt;FONT color="#008000" size="2"&gt;;save off the data&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;cmpb&lt;/FONT&gt; &lt;FONT size="2"&gt;#15&lt;/FONT&gt; &lt;FONT color="#008000" size="2"&gt;;test for end of receive array&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;bhs&lt;/FONT&gt; &lt;FONT size="2"&gt;sci0_buff_full&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;inc&lt;/FONT&gt; &lt;FONT size="2"&gt;sci0_in_ptr&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;rti&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size="2"&gt;sci0_buff_full &lt;FONT color="#0000ff" size="2"&gt;clr&lt;/FONT&gt; &lt;FONT size="2"&gt;sci0_in_ptr&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;rti&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;regards,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;ed&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Message Edited by eeetee on &lt;SPAN class="date_text"&gt;04-13-2006&lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;04:34 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Message Edited by eeetee on &lt;SPAN class="date_text"&gt;04-13-2006&lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;04:58 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Apr 2006 04:30:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/M68HC912B32-Serial-Interrupt-Examples/m-p/132217#M1680</guid>
      <dc:creator>eeetee</dc:creator>
      <dc:date>2006-04-14T04:30:58Z</dc:date>
    </item>
  </channel>
</rss>

