{"id":7364,"date":"2013-04-13T23:18:26","date_gmt":"2013-04-14T03:18:26","guid":{"rendered":"http:\/\/embedded-lab.com\/blog\/?p=7364"},"modified":"2014-01-31T12:28:40","modified_gmt":"2014-01-31T17:28:40","slug":"max7219-based-double-row-4-digit-seven-segment-led-display","status":"publish","type":"post","link":"https:\/\/embedded-lab.com\/blog\/max7219-based-double-row-4-digit-seven-segment-led-display\/","title":{"rendered":"MAX7219-based double row 4-digit seven segment LED display"},"content":{"rendered":"<p>This display board (SPI7SEGDISP8.56-2R) features eight 7-segment displays arranged in two rows of four digits. The on-board MAX7219 driver enables you to control all LED segments through only 3 I\/O pins of microcontroller. The major advantage of using this board is the time-division multiplexing operations required for continuous refreshing of the display digits are performed by the MAX7219 chip, thereby keeping the microcontroller free for doing other pressing tasks. The double row arrangement is suitable for many projects where two variable values are to be displayed simultaneously, such as displaying temperature and humidity, or current and voltage, etc.<\/p>\n<div id=\"attachment_7367\" style=\"width: 575px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56_2R_Display.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-7367\" class=\"size-full wp-image-7367\" title=\"SPI7SEGDISP8.56_2R_Display\" alt=\"\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56_2R_Display.jpg\" width=\"565\" height=\"393\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56_2R_Display.jpg 565w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56_2R_Display-550x382.jpg 550w\" sizes=\"auto, (max-width: 565px) 100vw, 565px\" \/><\/a><p id=\"caption-attachment-7367\" class=\"wp-caption-text\">SPI7SEGDISP8.56-2R: MAX719-based seven segment LED display module<\/p><\/div>\n<p><!--more--><\/p>\n<p><strong>Key Features:<\/strong><\/p>\n<ul>\n<li><span style=\"font-size: 13px; line-height: 19px;\">3-wire SPI interface<\/span><\/li>\n<li><span style=\"font-size: 13px; line-height: 19px;\">double row of 4-digit displays (0.56&#8243;)<\/span><\/li>\n<li><span style=\"font-size: 13px; line-height: 19px;\">operates at +5V supply<\/span><\/li>\n<li><span style=\"font-size: 13px; line-height: 19px;\">individual control of all digits and decimal points<\/span><\/li>\n<li><span style=\"font-size: 13px; line-height: 19px;\">16 levels of display brightness through software<\/span><\/li>\n<li><span style=\"font-size: 13px; line-height: 19px;\">PCB dimensions 2.8&#8243; x 1.7&#8243; (70mm x 42mm)<\/span><\/li>\n<li><span style=\"font-size: 13px; line-height: 19px;\">Two or more of these modules can be cascaded in series<\/span><\/li>\n<\/ul>\n<p>Since it requires only 3 I\/O pins, this display module can also be used with low pin-count microcontrollers (such as PIC12F series). Visit my <strong><a href=\"http:\/\/embedded-lab.com\/blog\/?p=4935\" target=\"_blank\">MAX7219 tutorial page<\/a><\/strong> for more detail on MAX7219 and PIC12F683 interfacing example. With Arduino, it can be easily interfaced using the\u00a0<strong><a href=\"http:\/\/arduino.cc\/playground\/Main\/LedControl\" target=\"_blank\">LedControl<\/a><\/strong>\u00a0library. The following Arduino sketch displays 1 through 8 on eight LED digits of SPI7SEGDISP8.56-2R. It<span style=\"font-size: 13px; line-height: 19px;\">\u00a0uses Arduino pins 7, 6, and 5 to drive the DIN, CLK, and LOAD pins of MAX7219, respectively.<\/span><\/p>\n<p><code><br \/>\n<\/code><\/p>\n\n<div class=\"wp_syntax\"><table><tr><td class=\"code\"><pre class=\"c\" style=\"font-family:monospace;\"><span style=\"color: #339933;\">#include &quot;LedControl.h&quot;<\/span>\n<span style=\"color: #666666; font-style: italic;\">\/\/ Pin 7 to Data In, 6 to Clk, 5 to LOAD<\/span>\nLedControl lc<span style=\"color: #339933;\">=<\/span>LedControl<span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #0000dd;\">7<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #0000dd;\">6<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #0000dd;\">5<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #0000dd;\">1<\/span><span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #339933;\">;<\/span>\n<span style=\"color: #993333;\">void<\/span> setup<span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #009900;\">&#41;<\/span>\n<span style=\"color: #009900;\">&#123;<\/span>\n  <span style=\"color: #666666; font-style: italic;\">\/\/ the zero refers to the MAX7219 number, it is zero for 1 chip<\/span>\n  lc.<span style=\"color: #202020;\">shutdown<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #0000dd;\">0<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #000000; font-weight: bold;\">false<\/span><span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #339933;\">;<\/span><span style=\"color: #666666; font-style: italic;\">\/\/ turn off power saving, enables display<\/span>\n  lc.<span style=\"color: #202020;\">setIntensity<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #0000dd;\">0<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #0000dd;\">15<\/span><span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #339933;\">;<\/span><span style=\"color: #666666; font-style: italic;\">\/\/ sets brightness (0~15 possible values)<\/span>\n  lc.<span style=\"color: #202020;\">clearDisplay<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #0000dd;\">0<\/span><span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #339933;\">;<\/span><span style=\"color: #666666; font-style: italic;\">\/\/ clear screen<\/span>\n<span style=\"color: #009900;\">&#125;<\/span>\n<span style=\"color: #993333;\">void<\/span> loop<span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #009900;\">&#41;<\/span>\n<span style=\"color: #009900;\">&#123;<\/span>\n  <span style=\"color: #b1b100;\">for<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #993333;\">int<\/span> i<span style=\"color: #339933;\">=<\/span><span style=\"color: #0000dd;\">0<\/span><span style=\"color: #339933;\">;<\/span> i<span style=\"color: #339933;\">&lt;<\/span><span style=\"color: #0000dd;\">8<\/span><span style=\"color: #339933;\">;<\/span> i<span style=\"color: #339933;\">++<\/span><span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #009900;\">&#123;<\/span>\n   lc.<span style=\"color: #202020;\">setDigit<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #0000dd;\">0<\/span><span style=\"color: #339933;\">,<\/span>i<span style=\"color: #339933;\">,<\/span>i<span style=\"color: #339933;\">+<\/span><span style=\"color: #0000dd;\">1<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #000000; font-weight: bold;\">false<\/span><span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #339933;\">;<\/span>\n  <span style=\"color: #009900;\">&#125;<\/span>  \n&nbsp;\n<span style=\"color: #009900;\">&#125;<\/span><\/pre><\/td><\/tr><\/table><\/div>\n\n<p>&nbsp;<\/p>\n<p><code><\/code><br \/>\nThis display module is on sale for $12.99 on Tindie, and it is available in three LED colors: Red, Blue, and Yellow. The buying links are provided at the end.<\/p>\n<div id=\"attachment_7368\" style=\"width: 575px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56-2R_Red.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-7368\" class=\"size-full wp-image-7368\" title=\"SPI7SEGDISP8.56-2R_Red\" alt=\"\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56-2R_Red.jpg\" width=\"565\" height=\"427\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56-2R_Red.jpg 565w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56-2R_Red-550x415.jpg 550w\" sizes=\"auto, (max-width: 565px) 100vw, 565px\" \/><\/a><p id=\"caption-attachment-7368\" class=\"wp-caption-text\">SPI7SEGDISP8.56-2R (Red)<\/p><\/div>\n<div id=\"attachment_7369\" style=\"width: 575px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56-2R_Blue.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-7369\" class=\"size-full wp-image-7369\" title=\"SPI7SEGDISP8.56-2R_Blue\" alt=\"\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56-2R_Blue.jpg\" width=\"565\" height=\"450\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56-2R_Blue.jpg 565w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56-2R_Blue-550x438.jpg 550w\" sizes=\"auto, (max-width: 565px) 100vw, 565px\" \/><\/a><p id=\"caption-attachment-7369\" class=\"wp-caption-text\">SPI7SEGDISP8.56-2R (Blue)<\/p><\/div>\n<div id=\"attachment_7370\" style=\"width: 575px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56-2R_Yellow.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-7370\" class=\"size-full wp-image-7370\" title=\"SPI7SEGDISP8.56-2R_Yellow\" alt=\"\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56-2R_Yellow.jpg\" width=\"565\" height=\"432\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56-2R_Yellow.jpg 565w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56-2R_Yellow-550x420.jpg 550w\" sizes=\"auto, (max-width: 565px) 100vw, 565px\" \/><\/a><p id=\"caption-attachment-7370\" class=\"wp-caption-text\">SPI7SEGDISP8.56-2R (Yellow)<\/p><\/div>\n<p><strong>Tindie buying links:<\/strong><\/p>\n<p><a href=\"https:\/\/tindie.com\/products\/rajbex\/double-row-4-digit-seven-segment-red-led-display-module-with-spi-interface\/\" target=\"_blank\"><strong>SPI7SEGDISP8.56 buying link &#8211; Red color<\/strong><\/a><\/p>\n<p><strong><a href=\"https:\/\/tindie.com\/products\/rajbex\/double-row-4-digit-seven-segment-yellow-led-display-module-with-spi-interface\/\" target=\"_blank\">SPI7SEGDISP8.56 buying link &#8211; Yellow color<\/a><\/strong><\/p>\n<p><a href=\"https:\/\/tindie.com\/products\/rajbex\/double-row-4-digit-seven-segment-blue-led-display-module-with-spi-interface\/\" target=\"_blank\"><strong>SPI7SEGDISP8.56 buying link &#8211; Blue color<\/strong><\/a><\/p>\n<p>PCB Only<\/p>\n<p>If you buy PCB only, you will need the following components to complete the display.<\/p>\n<div id=\"attachment_8080\" style=\"width: 490px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/BOM_SPI7SEGDISP8.562R.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-8080\" class=\"size-full wp-image-8080\" alt=\"BOM_SPI7SEGDISP8.562R\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/BOM_SPI7SEGDISP8.562R.png\" width=\"480\" height=\"278\" \/><\/a><p id=\"caption-attachment-8080\" class=\"wp-caption-text\">Bill of materials for assembling the display<\/p><\/div>\n<div id=\"attachment_8083\" style=\"width: 575px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56_2R_PCB_Top.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-8083\" class=\"size-full wp-image-8083\" alt=\"Top side of PCB\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56_2R_PCB_Top.jpg\" width=\"565\" height=\"387\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56_2R_PCB_Top.jpg 565w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56_2R_PCB_Top-550x376.jpg 550w\" sizes=\"auto, (max-width: 565px) 100vw, 565px\" \/><\/a><p id=\"caption-attachment-8083\" class=\"wp-caption-text\">Top side of PCB<\/p><\/div>\n<div id=\"attachment_8082\" style=\"width: 575px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56_2R_PCB_Bottom.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-8082\" class=\"size-full wp-image-8082\" alt=\"SPI7SEGDISP8.56_2R_PCB_Bottom\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56_2R_PCB_Bottom.jpg\" width=\"565\" height=\"379\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56_2R_PCB_Bottom.jpg 565w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56_2R_PCB_Bottom-550x368.jpg 550w\" sizes=\"auto, (max-width: 565px) 100vw, 565px\" \/><\/a><p id=\"caption-attachment-8082\" class=\"wp-caption-text\">Bottom side of PCB<\/p><\/div>\n<p>While assembling the board, start from the bottom side of the PCB that contains all electronics components. The displays are soldered last on the top PCB side along with the header pins.<\/p>\n<div id=\"attachment_8081\" style=\"width: 575px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56_2R_Components_Bottom.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-8081\" class=\"size-full wp-image-8081\" alt=\"SPI7SEGDISP8.56_2R_Components_Bottom\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56_2R_Components_Bottom.jpg\" width=\"565\" height=\"393\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56_2R_Components_Bottom.jpg 565w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56_2R_Components_Bottom-550x382.jpg 550w\" sizes=\"auto, (max-width: 565px) 100vw, 565px\" \/><\/a><p id=\"caption-attachment-8081\" class=\"wp-caption-text\">All electronics components should be soldered first on the bottom side PCB.<\/p><\/div>\n<div id=\"attachment_8084\" style=\"width: 575px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56-2R.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-8084\" class=\"size-full wp-image-8084\" alt=\"Displays are soldered last on top side\" src=\"http:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56-2R.jpg\" width=\"565\" height=\"413\" srcset=\"https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56-2R.jpg 565w, https:\/\/embedded-lab.com\/blog\/wp-content\/uploads\/2013\/04\/SPI7SEGDISP8.56-2R-550x402.jpg 550w\" sizes=\"auto, (max-width: 565px) 100vw, 565px\" \/><\/a><p id=\"caption-attachment-8084\" class=\"wp-caption-text\">Displays are soldered last on top side<\/p><\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This display board (SPI7SEGDISP8.56-2R) features eight 7-segment displays arranged in two rows of four digits. The on-board MAX7219 driver enables you to control all LED segments through only 3 I\/O pins of microcontroller. The major advantage of using this board is the time-division multiplexing operations required for continuous refreshing of the display digits are performed by the MAX7219 chip, thereby keeping the microcontroller free for doing other pressing tasks. The double row arrangement is suitable for many projects where two variable values are to be displayed simultaneously, such as displaying temperature and humidity, or current and voltage, etc.<\/p>\n","protected":false},"author":1,"featured_media":7367,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[245,367,437],"tags":[439,565,534],"class_list":["post-7364","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-embedded-lab-projects","category-mcu-develeopment-tools","category-products","tag-max7219","tag-serial-seven-segment-display","tag-spi-seven-segment-display"],"_links":{"self":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts\/7364","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/comments?post=7364"}],"version-history":[{"count":9,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts\/7364\/revisions"}],"predecessor-version":[{"id":8245,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/posts\/7364\/revisions\/8245"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/media\/7367"}],"wp:attachment":[{"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/media?parent=7364"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/categories?post=7364"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/embedded-lab.com\/blog\/wp-json\/wp\/v2\/tags?post=7364"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}