{"id":29,"date":"2020-03-02T17:04:17","date_gmt":"2020-03-02T17:04:17","guid":{"rendered":"https:\/\/phils-linux.com\/?p=29"},"modified":"2023-02-28T16:46:53","modified_gmt":"2023-02-28T16:46:53","slug":"getting-started","status":"publish","type":"post","link":"https:\/\/www.phils-linux.com\/?p=29","title":{"rendered":"Getting started"},"content":{"rendered":"\n<p>Ok, here we go. 2 weeks ago I ordered a <a href=\"https:\/\/www.amazon.de\/Mikrocontroller-ATmega2560-ATMEGA16U2-USB-Kabel-Kompatibel\/dp\/B01MA5BLQI\/ref=sr_1_1_sspa?__mk_de_DE=%C3%85M%C3%85%C5%BD%C3%95%C3%91&amp;keywords=Arduino+mega&amp;qid=1583153646&amp;sr=8-1-spons&amp;psc=1&amp;spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUEyUzMxRk05OTBaSVk0JmVuY3J5cHRlZElkPUEwODAwNzMwTVNKSkpaV1VUVkM5JmVuY3J5cHRlZEFkSWQ9QTA4ODEzOTgyVFA3WlAwQzgwMUczJndpZGdldE5hbWU9c3BfYXRmJmFjdGlvbj1jbGlja1JlZGlyZWN0JmRvTm90TG9nQ2xpY2s9dHJ1ZQ==\">Arduino Mega<\/a> which arrived within 2 days. After unpacking I installed the software following the <a href=\"https:\/\/simvim.com\/start_first.html\">installation guide<\/a> and that was it!<\/p>\n\n\n\n<p>The first problem I want to get out of the way is how to drive 7 Segment Displays! For that I ordered a couple of <a href=\"https:\/\/datasheets.maximintegrated.com\/en\/ds\/MAX7219-MAX7221.pdf\">Max7219<\/a> display drivers. Initially I planned on using <a href=\"https:\/\/www.ti.com\/lit\/ds\/symlink\/sn74hc595.pdf\">SN74HC595<\/a> and multiplex the 7 segment LEDs. I even had a working setup, which I implemented with an Arduino UNO + some NPN transistors (even though it took me a while to understand how Transistors even work :D). Well in the end I managed to get 4 7 Segment LEDs running with just 1 IC! Great!<\/p>\n\n\n\n<p>One on of the very first tests looked like that (with 2 Segments connected)<\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide\"><figure class=\"wp-block-media-text__media\"><video controls src=\"https:\/\/phils-linux.com\/wp-content\/uploads\/2020\/03\/7SegLED1stTest.mp4\"><\/video><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"has-large-font-size\"><\/p>\n<\/div><\/div>\n\n\n\n<p>BUT; there was a problem. The 74HC + NPN transistor solution worked as follows:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Set LatchPin LOW<\/li>\n\n\n\n<li>shiftout Data via Output to ClockPin<\/li>\n\n\n\n<li>Set LatchPink HIGH<\/li>\n\n\n\n<li>Turn on first LED (by setting the Output pin connected to the first transistor to high)<\/li>\n\n\n\n<li>Wait 2 ms turn LED off and continue with second Number + LED <\/li>\n<\/ul>\n\n\n\n<p>As you may notice the information about every number I wanted to have displayed was sent via 1 Output pin (the one connected to the CLK pin). Which 7 segment LED was actually used to display [meaning which LED was to be turned on] this specific number was controlled via another OUT pin. <\/p>\n\n\n\n<p>SimVim uses a different logic:<\/p>\n\n\n\n<p>The configured Output pin is the connection to the CLK pin of the IC \/ driver, there would be no way to multiplex 7 Segment LEDs with just 1 IC. Since I used the 74HC ICs I&#8217;d need to use 1 IC per LED. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>This is how I ended up buying a couple of Max7219  drivers. These drivers are pretty expensive, compared to the shift register I used before (around 8\u20ac, compared to around 0,50 \u20ac), but you can control up to 8 Digits with just one driver. They arrived at the end of last week, soldered one onto a protoyping board and it worked! (Pictures follow)<\/p>\n\n\n\n<p>So for the moment I&#8217;m trying to figure out a nice way of soldering and wireing the LEDs: <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ok, here we go. 2 weeks ago I ordered a Arduino Mega which arrived within 2 days. After unpacking I installed the software following the installation guide and that was it! The first problem I want to get out of the way is how to drive 7 Segment Displays! For that I ordered a couple &hellip; <a href=\"https:\/\/www.phils-linux.com\/?p=29\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Getting started&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[6,17,16,18,9,8,19],"class_list":["post-29","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-7-segment-display","tag-arduino","tag-led","tag-linux","tag-max7219","tag-simvim","tag-x-plane"],"_links":{"self":[{"href":"https:\/\/www.phils-linux.com\/index.php?rest_route=\/wp\/v2\/posts\/29","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.phils-linux.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.phils-linux.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.phils-linux.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phils-linux.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=29"}],"version-history":[{"count":7,"href":"https:\/\/www.phils-linux.com\/index.php?rest_route=\/wp\/v2\/posts\/29\/revisions"}],"predecessor-version":[{"id":134,"href":"https:\/\/www.phils-linux.com\/index.php?rest_route=\/wp\/v2\/posts\/29\/revisions\/134"}],"wp:attachment":[{"href":"https:\/\/www.phils-linux.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=29"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.phils-linux.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=29"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.phils-linux.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=29"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}