<?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 Re: Professional Way to solve this HCS12 Dragon12-JR,Work with pushbottons and 7 segment display in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Professional-Way-to-solve-this-HCS12-Dragon12-JR-Work-with/m-p/367366#M10691</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your post!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since this is a useful information rather than a question/issue, i have converted it to a document:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-104439"&gt;Professional Way to solve this HCS12 Dragon12-JR,Work with pushbottons and 7 segment display&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;iggi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Apr 2015 09:25:00 GMT</pubDate>
    <dc:creator>iggi</dc:creator>
    <dc:date>2015-04-02T09:25:00Z</dc:date>
    <item>
      <title>Professional Way to solve this HCS12 Dragon12-JR,Work with pushbottons and 7 segment display</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Professional-Way-to-solve-this-HCS12-Dragon12-JR-Work-with/m-p/367365#M10690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;write assembly (ASM) and C programs for the HCS12, as well as to work with the pushbuttons and 7-segment display on the Dragon12-JR board.&amp;nbsp; The programs find the largest and smallest numbers from an arbitrary list of eight 8-bit unsigned numbers and displays them on the 7-segment display as outlined in the following.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; 1.Write a program to do the following, in both ASM and C. Do not use MINA, MINM, MAXA, and MAXM instructions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.Load an array of eight 8-bit unsigned numbers into RAM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.Find the largest of these numbers and store it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.Find the smallest of these numbers and store it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.Wait for the pushbuttons (S1 or S2) to be pressed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5.The first time S1 is pressed, display the high nibble of the largest number; the second time S1 is pressed, display the low nibble of the largest number. For example, if the largest number&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; is 0x3F, the 7-segment display should show “3” the first time S1 is pressed and “F” the second time it is pressed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6.Do the same for S2, except use the smallest number. &lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; 2.Explain why debouncing is used with switches. Optional: Implement software debouncing for switch used above.&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hints:&lt;/STRONG&gt;&lt;/P&gt;&lt;OL style="list-style-type: lower-alpha;"&gt;&lt;LI&gt;These are unsigned numbers that your program will be searching through.&amp;nbsp; Make sure you are using the &lt;EM&gt;unsigned&lt;/EM&gt; branch instructions in your ASM code.&lt;/LI&gt;&lt;LI&gt;Your TA will be changing the numbers in your array to make sure it works for arbitrary 8-bit values. Please make sure the array is somewhere near the top of your program file.&lt;/LI&gt;&lt;LI&gt;For interfacing to LEDs, 7 segment Displays, and pushbuttons see the schematic and manual of your development board. The type of the 7-segment LED on the Dragon12-JR board is common anode. All cathodes are driven individually by an output port and all anodes are internally connected together. The Dragon12-JR board uses port H to drive 7-segment cathodes.&lt;/LI&gt;&lt;LI&gt;Skeleton files are provided to help you complete the asseignment.&lt;/LI&gt;&lt;LI&gt;The 7-segment display communicates with the board via &lt;STRONG&gt;Port H whose address is $0260 (PTH)&lt;/STRONG&gt;.&amp;nbsp; Its data direction (input or output) is controlled by writing to &lt;STRONG&gt;Data Direction H register whose address is $0262 (DDRH).&lt;/STRONG&gt; In order for PTH to be output (i.e. displaying something), you must set DDRH to $FF first (all bits high, all bits output).&amp;nbsp; The skeleton code does this for you this time.&lt;/LI&gt;&lt;LI&gt;Almost every I/O port on the board works similarly to PTH; that is, you must set the direction of data on a corresponding data direction register before writing to or reading from it.&lt;/LI&gt;&lt;LI&gt;The two pushbuttons (S1 and S2) are connected to PM6 and PM7. S1à PM6, S2à PM7 &lt;/LI&gt;&lt;LI&gt;A subroutine that displays the low nibble of register A is included with the skeleton ASM code. Just store a value in register A and issue &lt;SPAN style="font-family: 'Courier New';"&gt;jsr seg7_out&lt;/SPAN&gt; to display the low nibble of A. You are required to understand how it works and to write a similar routine for the C version of your code.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338456"&gt;assem-#-what-required.txt.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338456"&gt;C-required.txt.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2015 15:45:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Professional-Way-to-solve-this-HCS12-Dragon12-JR-Work-with/m-p/367365#M10690</guid>
      <dc:creator>alyaa1190</dc:creator>
      <dc:date>2015-03-31T15:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: Professional Way to solve this HCS12 Dragon12-JR,Work with pushbottons and 7 segment display</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Professional-Way-to-solve-this-HCS12-Dragon12-JR-Work-with/m-p/367366#M10691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your post!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since this is a useful information rather than a question/issue, i have converted it to a document:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-104439"&gt;Professional Way to solve this HCS12 Dragon12-JR,Work with pushbottons and 7 segment display&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;iggi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Apr 2015 09:25:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Professional-Way-to-solve-this-HCS12-Dragon12-JR-Work-with/m-p/367366#M10691</guid>
      <dc:creator>iggi</dc:creator>
      <dc:date>2015-04-02T09:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: Professional Way to solve this HCS12 Dragon12-JR,Work with pushbottons and 7 segment display</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Professional-Way-to-solve-this-HCS12-Dragon12-JR-Work-with/m-p/1267591#M17829</link>
      <description>&lt;P&gt;&amp;nbsp;How can I open the files for Assembly and C codes ?&lt;/P&gt;&lt;P&gt;Where I can find the answers?&lt;/P&gt;</description>
      <pubDate>Sat, 24 Apr 2021 13:53:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Professional-Way-to-solve-this-HCS12-Dragon12-JR-Work-with/m-p/1267591#M17829</guid>
      <dc:creator>Mana97</dc:creator>
      <dc:date>2021-04-24T13:53:22Z</dc:date>
    </item>
  </channel>
</rss>

