{"id":384,"date":"2021-05-20T13:36:29","date_gmt":"2021-05-20T13:36:29","guid":{"rendered":"https:\/\/vegaprocessors.in\/blog\/?p=384"},"modified":"2022-06-06T13:04:15","modified_gmt":"2022-06-06T13:04:15","slug":"interfacing-8x8-led-dot-matrix-to-aries-v2-board","status":"publish","type":"post","link":"https:\/\/vegaprocessors.in\/blog\/interfacing-8x8-led-dot-matrix-to-aries-v2-board\/","title":{"rendered":"Interfacing 8&#215;8 LED DOT Matrix to ARIES v2 Board"},"content":{"rendered":"\n<p>In this tutorial, you will learn how to interface <strong>8\u00d78 LED Matrix<\/strong> using the <strong>MAX7219CNG<\/strong> driver with the<strong> ARIES v2 Board<\/strong>.\u00a0There are two sample programs on 8\u00d78 LED Matrix Interface. The first project vega-sdk\/examples\/spi\/led_dot_matrix_demo is a simple program that runs on the ARIES v2 Board to display an image on the 8X8 LED Matrix. The second project vega-sdk\/examples\/spi\/led_dot_matrix_scroll_demo is an advanced project where scrolling text is displayed on the 8\u00d78 LED Matrix using the ARIES v2 board.<\/p>\n\n\n\n<p>LED displays are often packaged as matrixes of&nbsp;LEDs&nbsp;arranged in rows of common anodes and columns of common cathodes, or the reverse. They can&nbsp;be used to display almost anything. Most modern LED sign boards use various types of matrix boards with controllers.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">MAX7219CNG<\/h2>\n\n\n\n<p>MAX7219CNG is a programmable display driver integrated circuit that is used to control a large array of LEDs while consuming a relatively small number of GPIO pins. It receives input commands via four SPI pins and uses these commands to drive either an 8&#215;8 matrix of LEDs or an eight-digit&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Seven-segment_display\">seven-segment display<\/a>.<\/p>\n\n\n\n<p>The MAX7219CNG has a bonafide command protocol, built on SPI, where you send a 12-bit packet that encodes both a 4-bit command and an 8-bit value. In this packet, the Most Significant Bits (MSBs), or the ones that are sent first, encode the command, and the Least Significant Bits (LSBs) encode the data. The specific packet is constructed such that<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>bits 0-3 encode a command<\/li><li>bits 4-11 encode the value that should be passed to the command<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/max7219-led-driver-kit-assembled-800x800-1.jpg\" alt=\"\" class=\"wp-image-385\" width=\"470\" height=\"470\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/max7219-led-driver-kit-assembled-800x800-1.jpg 800w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/max7219-led-driver-kit-assembled-800x800-1-300x300.jpg 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/max7219-led-driver-kit-assembled-800x800-1-150x150.jpg 150w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/max7219-led-driver-kit-assembled-800x800-1-768x768.jpg 768w\" sizes=\"auto, (max-width: 470px) 100vw, 470px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Circuit Diagram<\/h2>\n\n\n\n<p>MAX7219CNG communicates with the ARIES v2 Board via the SPI port. MAX7219CNG \u00a0is composed of 5 pins. Connect VCC and GND of the MAX7219 dot matrix module to +5V and GND respectively of the ARIES v2 Board.\u00a0Then connect <strong>DIN<\/strong> to <strong>SPI0-<\/strong>MOSI,<strong> CS <\/strong>to<strong> SPI0-<\/strong>SS, and <strong>CLK<\/strong> to SPI0-SCLK  of the ARIES v2 Board.<\/p>\n\n\n\n<p>Now, for powering up the ARIES v2 board via 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 <strong>UART0<\/strong> port of the ARIES v2 board, and the Laptop\/Desktop\/PC should be preinstalled with VEGA SDK and Toolchain.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"743\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2022\/05\/pinmap_Ar_DOT_MATRIX-2-1024x743.jpg\" alt=\"\" class=\"wp-image-1218\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2022\/05\/pinmap_Ar_DOT_MATRIX-2-1024x743.jpg 1024w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2022\/05\/pinmap_Ar_DOT_MATRIX-2-300x218.jpg 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2022\/05\/pinmap_Ar_DOT_MATRIX-2-768x557.jpg 768w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2022\/05\/pinmap_Ar_DOT_MATRIX-2-1536x1115.jpg 1536w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2022\/05\/pinmap_Ar_DOT_MATRIX-2.jpg 1572w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><tbody><tr><td><strong>LED DOT Matrix<\/strong><\/td><td><strong>ARIES v2 Board<\/strong><\/td><\/tr><tr><td>VCC<\/td><td>+5V<\/td><\/tr><tr><td>GND<\/td><td>GND<\/td><\/tr><tr><td>DIN<\/td><td>SPI0-MOSI<\/td><\/tr><tr><td>CS<\/td><td>SPI0-SS<\/td><\/tr><tr><td>CLK<\/td><td>SPIO-SCLK<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<h2 class=\"wp-block-heading\">Procedure<\/h2>\n\n\n\n<p>After setting up the toolchain and SDK path environments, build the example program for the MAX7219CNG module by :<\/p>\n\n\n\n<p>choose the below program for displaying an image:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd vega-sdk\/examples\/spi\/led_dot_matrix_demo<\/code><\/pre>\n\n\n\n<p>or choose the other program which displays scrolling text:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd vega-sdk\/examples\/spi\/led_dot_matrix_scroll_demo<\/code><\/pre>\n\n\n\n<p><strong>make clean<\/strong> command to clean the executable :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>make clean<\/code><\/pre>\n\n\n\n<p>then use the <strong>make<\/strong> command to build it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>make<\/code><\/pre>\n\n\n\n<p>Now, we can transfer the built program to the board, before transfer please ensure that you have connected the board UART0 connector to the PC.<\/p>\n\n\n\n<p>Open a new terminal and execute the following command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo minicom aries<\/code><\/pre>\n\n\n\n<p>Now you can see the minicom terminal opened and the board UART terminal is ready.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"820\" height=\"689\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/minicom-5.png\" alt=\"\" class=\"wp-image-593\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/minicom-5.png 820w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/minicom-5-300x252.png 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/minicom-5-768x645.png 768w\" sizes=\"auto, (max-width: 820px) 100vw, 820px\" \/><\/figure>\n\n\n\n<p>Use&nbsp;<strong>CTRL+A S<\/strong>&nbsp;to enter the file sending menu and select&nbsp;<strong>xmodem<\/strong>&nbsp;by pressing&nbsp;<strong>Enter<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"615\" height=\"143\" data-id=\"269\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/xmodem.png\" alt=\"\" class=\"wp-image-269\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/xmodem.png 615w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/xmodem-300x70.png 300w\" sizes=\"auto, (max-width: 615px) 100vw, 615px\" \/><\/figure>\n<\/figure>\n\n\n\n<p>In the next window, with\u00a0the <strong>space bar<\/strong>\u00a0select the\u00a0<strong>led_dot_matrix_demo.bin<\/strong>\u00a0file or select the\u00a0<strong>led_dot_matrix_scroll_demo.bin<\/strong>\u00a0file, to be transferred, by pressing\u00a0<strong>Enter<\/strong>, the transfer process starts.<\/p>\n\n\n\n<p>Wait until the process is completed. The screen should display how much data has been transferred.<\/p>\n\n\n\n<p>After completing the transfer the Program will start to execute<\/p>\n\n\n\n<p>The minicom UART terminal displays the following when the first program is executed:<\/p>\n<\/div><\/div>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/dot-matrix.png\" alt=\"\" class=\"wp-image-389\" width=\"836\" height=\"629\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/dot-matrix.png 917w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/dot-matrix-300x226.png 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/dot-matrix-768x579.png 768w\" sizes=\"auto, (max-width: 836px) 100vw, 836px\" \/><\/figure>\n\n\n\n<p>The minicom terminal displays the following when the second program is executed:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"911\" height=\"689\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/dot-matrix-scroll.png\" alt=\"\" class=\"wp-image-390\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/dot-matrix-scroll.png 911w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/dot-matrix-scroll-300x227.png 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2021\/05\/dot-matrix-scroll-768x581.png 768w\" sizes=\"auto, (max-width: 911px) 100vw, 911px\" \/><\/figure>\n\n\n\n<p> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you will learn how to interface 8\u00d78 LED Matrix using the MAX7219CNG driver with the ARIES v2 Board.\u00a0There are two sample programs on 8\u00d78 LED Matrix Interface. The first project vega-sdk\/examples\/spi\/led_dot_matrix_demo is a simple program that runs on the ARIES v2 Board to display an image on the 8X8 LED Matrix. The [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,14,1],"tags":[75,76,41,40,67,77,24],"class_list":["post-384","post","type-post","status-publish","format-standard","hentry","category-getting-started","category-tutorials","category-uncategorized","tag-aries-v2-board","tag-c-dac","tag-led-dot-matrix","tag-max7219cng","tag-spi","tag-thejas-32","tag-vegaprocessor"],"_links":{"self":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts\/384","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\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/comments?post=384"}],"version-history":[{"count":24,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts\/384\/revisions"}],"predecessor-version":[{"id":1312,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts\/384\/revisions\/1312"}],"wp:attachment":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/media?parent=384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/categories?post=384"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/tags?post=384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}