{"id":1600,"date":"2010-08-17T06:00:53","date_gmt":"2010-08-17T04:00:53","guid":{"rendered":"http:\/\/www.dl8stwblog.freiraumwelle.de\/?p=1600"},"modified":"2010-08-17T17:01:27","modified_gmt":"2010-08-17T15:01:27","slug":"lanchpad-erste-schritte","status":"publish","type":"post","link":"http:\/\/www.dl8stwblog.freiraumwelle.de\/?p=1600","title":{"rendered":"LaunchPad erste Schritte"},"content":{"rendered":"<p>Seit einer Weile liegt das <a href=\"http:\/\/www.dl8stwblog.freiraumwelle.de\/?p=1552\">LaunchPad<\/a> von <a href=\"http:\/\/processors.wiki.ti.com\/index.php\/MSP430_LaunchPad_%28MSP-EXP430G2%29?DCMP=launchpad&amp;HQS=Other+OT+launchpadwiki\">TI<\/a> auf meinem Schreibtisch und wartet darauf benutzt zu werden.<\/p>\n<p>Nach der Installation von Code Composer Studio 4 habe ich heute die ersten Gehversuche gewagt.<\/p>\n<p>Zugegeben ein sehr einfaches Programm aber jeder f\u00e4ngt mal klein an:<\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; color: #478e75; font-size: 11px; margin: 0px;\">\/\/***************************************************************<\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; min-height: 11px; font-size: 11px; margin: 0px;\">\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; color: #478e75; font-size: 11px; margin: 0px;\">\/\/ Blink Programm fuer LaunchPad<\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; min-height: 11px; font-size: 11px; margin: 0px;\">\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; color: #478e75; font-size: 11px; margin: 0px;\">\/\/ LED1 und LED 2 blinken abwechselnd<\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; min-height: 11px; font-size: 11px; margin: 0px;\">\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; color: #478e75; font-size: 11px; margin: 0px;\">\/\/ by DL8STW 2010<\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; min-height: 11px; font-size: 11px; margin: 0px;\"><span style=\"color: #478e75;\"><span style=\"color: #000000;\"><br \/>\n<\/span><\/span><\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; color: #478e75; font-size: 11px; margin: 0px;\">\/\/****************************************************************<\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; font-size: 11px; margin: 0px;\"><span style=\"color: #971965;\"><strong>#include<\/strong><\/span> &lt;msp430x20x3.h&gt;<\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; min-height: 11px; font-size: 11px; margin: 0px;\">\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; min-height: 11px; font-size: 11px; margin: 0px;\">\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; color: #971965; font-size: 11px; margin: 0px;\"><strong>void<\/strong><span style=\"color: #000000;\"> main(<\/span><strong>void<\/strong><span style=\"color: #000000;\">)<\/span><\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; font-size: 11px; margin: 0px;\">{<\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; font-size: 11px; margin: 0px;\"><span style=\"color: #971965;\"><strong> # define<\/strong><\/span> delay 8000;<span style=\"white-space: pre;\"> <\/span><span style=\"color: #478e75;\">\/\/ Delayzeit <\/span><\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; min-height: 11px; font-size: 11px; margin: 0px;\">\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; font-size: 11px; margin: 0px;\">WDTCTL = WDTPW + WDTHOLD; \u00a0 \u00a0 <span style=\"color: #478e75;\">\/\/ Stop watchdog timer<\/span><\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; min-height: 11px; font-size: 11px; margin: 0px;\">\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; color: #478e75; font-size: 11px; margin: 0px;\"><span style=\"color: #000000;\"> P1DIR |= 0x41; \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <span style=\"white-space: pre;\"> <\/span><\/span>\/\/ Pin 1.0 und 1.6 sind Ausgaenge<\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; min-height: 11px; font-size: 11px; margin: 0px;\">\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; font-size: 11px; margin: 0px;\"><span style=\"color: #971965;\"><strong>while<\/strong><\/span>(1)<\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; font-size: 11px; margin: 0px;\">{<span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; color: #478e75; font-size: 11px; margin: 0px;\"><span style=\"color: #000000;\"> <\/span><span style=\"color: #971965;\"><strong>volatile<\/strong><\/span><span style=\"color: #000000;\"> <\/span><span style=\"color: #971965;\"><strong>unsigned<\/strong><\/span><span style=\"color: #000000;\"> <\/span><span style=\"color: #971965;\"><strong>int<\/strong><\/span><span style=\"color: #000000;\"> i;<span style=\"white-space: pre;\"> <\/span><\/span>\/\/Variable fuer Delay<\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; min-height: 11px; font-size: 11px; margin: 0px;\">\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; color: #478e75; font-size: 11px; margin: 0px;\"><span style=\"color: #000000;\"> i=delay;<span style=\"white-space: pre;\"> <\/span><\/span>\/\/Schleife fuer Delay<\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; font-size: 11px; margin: 0px;\"><span style=\"color: #971965;\"><strong>while<\/strong><\/span>(i&gt;0)<\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; font-size: 11px; margin: 0px;\">{<\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; font-size: 11px; margin: 0px;\"><span style=\"white-space: pre;\"> <\/span>i&#8211;;<\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; font-size: 11px; margin: 0px;\">}<\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; font-size: 11px; margin: 0px;\">P1OUT = 0x01; \u00a0 \u00a0 \u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"white-space: pre;\"> <\/span><span style=\"color: #478e75;\">\/\/LED1 HIGH, LED2 LOW<\/span><\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; color: #478e75; font-size: 11px; margin: 0px;\"><span style=\"color: #000000;\"> <span style=\"white-space: pre;\"> <\/span><\/span>\/\/0000 0001\u00a0<span style=\"white-space: pre;\"> <\/span><\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; min-height: 11px; font-size: 11px; margin: 0px;\">\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; color: #478e75; font-size: 11px; margin: 0px;\"><span style=\"color: #000000;\"> i=delay;<span style=\"white-space: pre;\"> <\/span><\/span>\/\/Schleife fuer Delay<\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; font-size: 11px; margin: 0px;\"><span style=\"color: #971965;\"><strong>while<\/strong><\/span>(i&gt;0)<\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; font-size: 11px; margin: 0px;\">{<\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; font-size: 11px; margin: 0px;\"><span style=\"white-space: pre;\"> <\/span>i&#8211;;<\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; font-size: 11px; margin: 0px;\">}<\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; min-height: 11px; font-size: 11px; margin: 0px;\">\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; color: #478e75; font-size: 11px; margin: 0px;\"><span style=\"color: #000000;\"> P1OUT = 0x40;<span style=\"white-space: pre;\"> <\/span><\/span>\/\/LED1 LOW, LED2 HIGH<\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; color: #478e75; font-size: 11px; margin: 0px;\"><span style=\"color: #000000;\"> <span style=\"white-space: pre;\"> <\/span><\/span>\/\/0100 0000<\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; font-size: 11px; margin: 0px;\">}<\/p>\n<p style=\"font: normal normal normal 10px\/normal 'Courier New'; font-size: 11px; margin: 0px;\">}<\/p>\n<p>Der Quellcode darf nat\u00fcrlich beliebig kopiert und modifiziert werden.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Seit einer Weile liegt das LaunchPad von TI auf meinem Schreibtisch und wartet darauf benutzt zu werden. Nach der Installation von Code Composer Studio 4 habe ich heute die ersten Gehversuche gewagt. Zugegeben ein sehr einfaches Programm aber jeder f\u00e4ngt &hellip; <a href=\"http:\/\/www.dl8stwblog.freiraumwelle.de\/?p=1600\">Weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1,3,32,5,99],"tags":[190,175,165,158,185],"_links":{"self":[{"href":"http:\/\/www.dl8stwblog.freiraumwelle.de\/index.php?rest_route=\/wp\/v2\/posts\/1600"}],"collection":[{"href":"http:\/\/www.dl8stwblog.freiraumwelle.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.dl8stwblog.freiraumwelle.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.dl8stwblog.freiraumwelle.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.dl8stwblog.freiraumwelle.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1600"}],"version-history":[{"count":13,"href":"http:\/\/www.dl8stwblog.freiraumwelle.de\/index.php?rest_route=\/wp\/v2\/posts\/1600\/revisions"}],"predecessor-version":[{"id":1618,"href":"http:\/\/www.dl8stwblog.freiraumwelle.de\/index.php?rest_route=\/wp\/v2\/posts\/1600\/revisions\/1618"}],"wp:attachment":[{"href":"http:\/\/www.dl8stwblog.freiraumwelle.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1600"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.dl8stwblog.freiraumwelle.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1600"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.dl8stwblog.freiraumwelle.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}