{"id":446,"date":"2017-04-08T11:09:32","date_gmt":"2017-04-08T17:09:32","guid":{"rendered":"http:\/\/www.kv6o.com\/wordpress\/?page_id=446"},"modified":"2017-04-09T17:06:15","modified_gmt":"2017-04-09T23:06:15","slug":"dg5-led-version","status":"publish","type":"page","link":"https:\/\/www.kv6o.com\/wordpress\/projects\/kenwood-dg5-emulator\/dg5-led-version\/","title":{"rendered":"DG5 LED version"},"content":{"rendered":"<p>The original version of the DG5 emulator I built was the LCD version, the main reason being because that&#8217;s what I had in my parts bin. &nbsp;The DG5 shield was built with the LCD display in mind, but it can easily be used with whatever display you want that can be driven by an Arduino. &nbsp;There are 2 headers in the board named LCD1 and LCD2 that bring +5V, GND, a contrast control for the LCD, and a bunch of Arduino Data pins &#8211; D7 thru D12. &nbsp;See the schematic below:<\/p>\n<p>[gview file=&#8221;http:\/\/www.kv6o.com\/wordpress\/wp-content\/uploads\/2014\/10\/DG5-shield_v1_5.pdf&#8221; save=&#8221;1&#8243;]<\/p>\n<p>The LCD version uses all of these pins to drive the LCD, but the LED version uses SPI, which only needs 3 data connections &#8211; DataIn, Load or Chip Select (CS), and Clock, or CLK. &nbsp;On my 8 digit LED display, these are called CLK, CS, and DIN. &nbsp;We also need VCC (+5V) and GND to power the display. &nbsp;More about using this type of display with an Arduino can be found <a href=\"http:\/\/playground.arduino.cc\/Main\/LedControl\">here<\/a>.<\/p>\n<p>So, the code that set this up in the program is below:<\/p>\n<p style=\"padding-left: 30px;\"><em>\/*<\/em><br \/>\n<em> LedControl pins for LED display using MAX72XX<\/em><br \/>\n<em> LedControl(dataPin,clockPin,csPin,numDevices)<\/em><br \/>\n<em> Arduino pin 8 is connected to the DataIn &#8211; Pin 13 on DG5 shield on LCD2 header<\/em><br \/>\n<em> Arduino pin 9 is connected to LOAD (CS) &#8211; Pin 12 on DG5 shield on LCD2 header<\/em><br \/>\n<em> Arduino pin 10 is connected to the CLK &#8211; Pin 11 on DG5 shield on LCD2 header<\/em><br \/>\n<em> Arduino pin 5 reserved for frequency counter &#8211; do not use<\/em><br \/>\n<em> *\/<\/em><br \/>\n<em> LedControl lc=LedControl(8,10,9,2);<\/em><\/p>\n<p>The display I am using is an 8 digit, 7 segment MAX7219 based display. Unfortunately, I don&#8217;t see it on Sparkfun or Adafruit &#8211; 2 of my favorite stores &#8211; but there are PLENTY on eBay and Amazon &#8211; just search on &#8220;MAX7219 LED 8 digit&#8221;<\/p>\n<p>You can connect it any way that makes sense &#8211; individual jumpers, wire wrap, whatever &#8211; I used 2, 3 wire jumpers that I had. &nbsp;The SPI connection is made on the LCD2 connector using pins 11-13 (which correspond to Arduino pins 10, 9, and 8), and pins 1 and 2 on the LCD1 header which provide GND and +5V respectively. &nbsp;Refer to the schematic above if needed. If you have a display that has pins in a different order, you can change the way the program assigns the DataIn, CS, and CLK to make using jumpers easier.<\/p>\n<p>Here it is in action:<\/p>\n<figure class=\"wp-block-embed wp-block-embed-youtube is-type-video is-provider-youtube epyt-figure\"><div class=\"wp-block-embed__wrapper\"><iframe loading=\"lazy\"  id=\"_ytid_67713\"  width=\"625\" height=\"352\"  data-origwidth=\"625\" data-origheight=\"352\" src=\"https:\/\/www.youtube.com\/embed\/CHBt0aYeyt4?enablejsapi=1&autoplay=0&cc_load_policy=0&cc_lang_pref=&iv_load_policy=1&loop=0&rel=1&fs=1&playsinline=0&autohide=2&theme=dark&color=red&controls=1&disablekb=0&\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><\/div><\/figure>\n<p>Latest code for all versions and full project files are now hosted on <a href=\"https:\/\/github.com\/sleander1\/DG5\">Github<\/a>.<\/p>\n<p>Steve<br \/>\nKV6O<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The original version of the DG5 emulator I built was the LCD version, the main reason being because that&#8217;s what I had in my parts bin. &nbsp;The DG5 shield was built with the LCD display in mind, but it can easily be used with whatever display you want that can be driven by an Arduino. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":192,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ngg_post_thumbnail":0,"footnotes":""},"class_list":["post-446","page","type-page","status-publish","hentry"],"jetpack_shortlink":"https:\/\/wp.me\/P2NQIK-7c","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.kv6o.com\/wordpress\/wp-json\/wp\/v2\/pages\/446","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kv6o.com\/wordpress\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.kv6o.com\/wordpress\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.kv6o.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kv6o.com\/wordpress\/wp-json\/wp\/v2\/comments?post=446"}],"version-history":[{"count":6,"href":"https:\/\/www.kv6o.com\/wordpress\/wp-json\/wp\/v2\/pages\/446\/revisions"}],"predecessor-version":[{"id":459,"href":"https:\/\/www.kv6o.com\/wordpress\/wp-json\/wp\/v2\/pages\/446\/revisions\/459"}],"up":[{"embeddable":true,"href":"https:\/\/www.kv6o.com\/wordpress\/wp-json\/wp\/v2\/pages\/192"}],"wp:attachment":[{"href":"https:\/\/www.kv6o.com\/wordpress\/wp-json\/wp\/v2\/media?parent=446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}