{"id":2749,"date":"2023-09-07T11:38:21","date_gmt":"2023-09-07T11:38:21","guid":{"rendered":"https:\/\/vegaprocessors.in\/blog\/?p=2749"},"modified":"2023-11-07T06:00:12","modified_gmt":"2023-11-07T06:00:12","slug":"how-to-make-use-of-in-built-dip-switches-on-aries-v2-0-board","status":"publish","type":"post","link":"https:\/\/vegaprocessors.in\/blog\/how-to-make-use-of-in-built-dip-switches-on-aries-v2-0-board\/","title":{"rendered":"How to make use of in-built DIP Switches on ARIES v2.0 Board"},"content":{"rendered":"\n<p>In this tutorial we will see how we can use DIP Switches in our application. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">ARIES v2.0<\/h2>\n\n\n\n<p>The ARIES v2.0 is a fully indigenous and a \u201cMade in India\u201d product to get started with basic microprocessor programming and embedded systems. This board is built upon a RISC-V ISA compliant VEGA Processor with easy-to-use hardware and software. For more details about ARIES v2.0 boards please refer to the&nbsp;<a href=\"https:\/\/vegaprocessors.in\/devboards\/ariesv2.html\">ARIES development boards and Ecosystem<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"832\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/aries-v2-1-1-1024x832.png\" alt=\"\" class=\"wp-image-2607\" style=\"width:262px;height:213px\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/aries-v2-1-1-1024x832.png 1024w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/aries-v2-1-1-300x244.png 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/aries-v2-1-1-768x624.png 768w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/aries-v2-1-1-1536x1247.png 1536w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/aries-v2-1-1.png 1735w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">DIP Switches<\/h2>\n\n\n\n<p>A DIP (<strong>Dual In-Line Package<\/strong>) switch is a small switch in a DIP that is packaged with others in a group to hold configurations and select the interrupt request. It is a set of manual electrical switches, which may refer to the unit as a whole, or to each individual switch, and its position changes the operating mode of a device. ARIES v2.0 has 2 position 2 way electronic DIP switch..<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"444\" height=\"442\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/dipsw-01.jpg\" alt=\"\" class=\"wp-image-2769\" style=\"width:108px;height:108px\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/dipsw-01.jpg 444w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/dipsw-01-300x300.jpg 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/dipsw-01-150x150.jpg 150w\" sizes=\"auto, (max-width: 444px) 100vw, 444px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Windows 10 or above\/Linux (64 bit)<\/li>\n\n\n\n<li>Arduino IDE<\/li>\n\n\n\n<li><a href=\"https:\/\/vegaprocessors.in\/devboards\/ariesv2.html\" target=\"_blank\" rel=\"noreferrer noopener\">VEGA ARIES Board support package<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Components Required<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>ARIES v2.0 Board<\/li>\n\n\n\n<li>Micro USB type B to USB type A cable<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Procedure<\/h2>\n\n\n\n<p>Let\u2019s power up the ARIES v2 board via the USB port of a Laptop\/Desktop\/PC and burning the code into the ARIES v2 board, we have to use a micro-USB type B to USB type A cable. The cable should be connected to UART-0 port of the ARIES v2 board, and the Laptop\/Desktop\/PC should be preinstalled with Arduino IDE and VEGA ARIES boards of latest version.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Now,&nbsp;<strong>open&nbsp;<\/strong>the Arduino IDE<\/li>\n\n\n\n<li>Make sure you have selected\u00a0<strong>ARIES v2<\/strong>\u00a0Board from\u00a0<strong>Tools<\/strong>\u00a0->\u00a0<strong>Board<\/strong>\u00a0->\u00a0<strong>VEGA Processor: ARIES Boards<\/strong>\u00a0->\u00a0<strong>ARIES v2<\/strong><\/li>\n\n\n\n<li>Enable flash mode from <strong>Tools <\/strong>-> <strong>Flash Mode<\/strong> -> <strong>Enabled<\/strong><\/li>\n\n\n\n<li>Select Programmer as VEGA FLASHER from\u00a0<strong>Tools<\/strong>\u00a0->\u00a0<strong>Programmer<\/strong>\u00a0->\u00a0<strong>VEGA FLASHER<\/strong><\/li>\n\n\n\n<li>Also select appropriate port,\u00a0<strong>Tools<\/strong>\u00a0->\u00a0<strong>Port<\/strong>\u00a0->\u00a0<strong>COM* (ARIES Board)<\/strong><\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"819\" height=\"441\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/11\/dipSwitch.png\" alt=\"\" class=\"wp-image-4506\" style=\"aspect-ratio:1.8571428571428572;width:696px;height:auto\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/11\/dipSwitch.png 819w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/11\/dipSwitch-300x162.png 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/11\/dipSwitch-768x414.png 768w\" sizes=\"auto, (max-width: 819px) 100vw, 819px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open&nbsp;<strong>File<\/strong>&nbsp;-&gt;&nbsp;<strong>Examples<\/strong>&nbsp;-&gt; Under&nbsp;<strong>Examples for ARIES v2<\/strong>&nbsp;-&gt;&nbsp;<strong>GPIO<\/strong>&nbsp;-&gt;&nbsp;<strong>DIP_Switch<\/strong><\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"879\" height=\"934\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/dipSwDemo.png\" alt=\"\" class=\"wp-image-2786\" style=\"width:487px;height:517px\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/dipSwDemo.png 879w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/dipSwDemo-282x300.png 282w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/dipSwDemo-768x816.png 768w\" sizes=\"auto, (max-width: 879px) 100vw, 879px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Now <strong>Upload <\/strong>the code and Open Serial Monitor with 115200 Baudrate.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Output<\/h2>\n\n\n\n<p>The 2-position DIP Switch on ARIES v2.0 has &#8220;ON&#8221; written on one side and their number on another side. If we slide switch towards &#8220;ON&#8221; it will give digital input 0. Once we uploaded the code, slide both DIP switches towards &#8220;ON&#8221;, in this case both switches will give <em>digital 0<\/em> input to the board and Green LED will turn on. Now, slide switch-2 to the other side. In this case switch-1 will give input <em>digital 0<\/em> and switch-2 will give <em>digital 1<\/em> and Blue LED will turn ON.<\/p>\n\n\n\n<p>In this way maximum 4 combinations are possible as shown below.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\">SWITCH-1<\/td><td class=\"has-text-align-center\" data-align=\"center\"> SWITCH-2<\/td><td class=\"has-text-align-center\" data-align=\"center\">STATUS<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">0<\/td><td class=\"has-text-align-center\" data-align=\"center\">0<\/td><td class=\"has-text-align-center\" data-align=\"center\">Green LED will turn ON<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">0<\/td><td class=\"has-text-align-center\" data-align=\"center\">1<\/td><td class=\"has-text-align-center\" data-align=\"center\">Blue LED will turn ON<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">1<\/td><td class=\"has-text-align-center\" data-align=\"center\">0<\/td><td class=\"has-text-align-center\" data-align=\"center\">Red LED will turn ON<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">1<\/td><td class=\"has-text-align-center\" data-align=\"center\">1<\/td><td class=\"has-text-align-center\" data-align=\"center\">Purple LED will turn ON<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>On serial monitor, we will get current position of both switches.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"603\" height=\"810\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/dp_sw_output.png\" alt=\"\" class=\"wp-image-2810\" style=\"width:498px;height:669px\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/dp_sw_output.png 603w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/dp_sw_output-223x300.png 223w\" sizes=\"auto, (max-width: 603px) 100vw, 603px\" \/><figcaption class=\"wp-element-caption\"><em><strong>All possible combinations are shown on Serial <\/strong><\/em><b><i>mo<\/i><\/b><em><strong>nitor.<\/strong><\/em><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"1080\" style=\"aspect-ratio: 1920 \/ 1080;\" width=\"1920\" controls src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/08\/InShot_20230823_151217939.mp4\"><\/video><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial we will see how we can use DIP Switches in our application. ARIES v2.0 The ARIES v2.0 is a fully indigenous and a \u201cMade in India\u201d product to get started with basic microprocessor programming and embedded systems. This board is built upon a RISC-V ISA compliant VEGA Processor with easy-to-use hardware and [&hellip;]<\/p>\n","protected":false},"author":14,"featured_media":3256,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[94,98],"tags":[75,76,68,31,24],"class_list":["post-2749","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aries-with-arduinoide","category-training-2","tag-aries-v2-board","tag-c-dac","tag-gpio","tag-thejas32","tag-vegaprocessor"],"_links":{"self":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts\/2749","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/comments?post=2749"}],"version-history":[{"count":14,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts\/2749\/revisions"}],"predecessor-version":[{"id":4507,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts\/2749\/revisions\/4507"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/media\/3256"}],"wp:attachment":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/media?parent=2749"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/categories?post=2749"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/tags?post=2749"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}