{"id":2172,"date":"2015-08-02T11:29:27","date_gmt":"2015-08-02T09:29:27","guid":{"rendered":"https:\/\/playembedded.org\/?p=2172"},"modified":"2021-07-29T11:00:33","modified_gmt":"2021-07-29T09:00:33","slug":"stm32-chibios-and-a-8x8-led-matrix","status":"publish","type":"post","link":"https:\/\/playembedded.org\/blog\/stm32-chibios-and-a-8x8-led-matrix\/","title":{"rendered":"STM32, ChibiOS and a 8&#215;8 LED Matrix"},"content":{"rendered":"<h3 id=\"1_A_compact_display_driver_the_MAX7219\" class=\"level_1\">A compact display driver: the MAX7219<\/h3>\n<p>The <b>MAX7219<\/b> is a compact, serial input\/parallel output common-cathode display driver. Included on-chip there are a BCD code-B decoder, the multiplex scan circuitry, segment and digit drivers, and an 8&times;8 static RAM that stores each digit. Only one external resistor is required to set the segments current.<\/p>\n<h4 id=\"2_Common_uses\" class=\"level_2\">Common uses<\/h4>\n<figure id=\"attachment_2589\" aria-describedby=\"caption-attachment-2589\" style=\"width: 262px\" class=\"wp-caption alignright\"><a href=\"https:\/\/playembedded.org\/wp-content\/uploads\/2016\/04\/art_013_diykit.jpg\" rel=\"attachment wp-att-2589\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-2589\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2016\/04\/art_013_diykit.jpg\" alt=\"LED matrix DIY kit\" width=\"262\" height=\"262\" srcset=\"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art_013_diykit.jpg 300w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art_013_diykit-150x150.jpg 150w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art_013_diykit-32x32.jpg 32w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art_013_diykit-64x64.jpg 64w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art_013_diykit-96x96.jpg 96w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art_013_diykit-128x128.jpg 128w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art_013_diykit-24x24.jpg 24w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art_013_diykit-36x36.jpg 36w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art_013_diykit-48x48.jpg 48w\" sizes=\"auto, (max-width: 262px) 100vw, 262px\"><\/a><figcaption id=\"caption-attachment-2589\" class=\"wp-caption-text\">A 8&times;8 LED matrix DIY kit.<\/figcaption><\/figure>\n<p>This chip is often used to drive 7-segment display having up to 8 digits or up to 64 individual LEDs. It is not unusual find this chip in DIY kits to be mounted on a small PCBs like that used in this article (See Fig. 1).<\/p>\n<p>This chip could be found in different packages and uses a non-standard SPI (Data is clocked even if CS remains high but is needed a low to high transition to complete communication.If you are not familiar with SPI communication read <a href=\"https:\/\/playembedded.org\/en\/2015\/02\/15\/meeting-spi\/\" target=\"_blank\" rel=\"noopener noreferrer\">Meeting SPI<\/a>). <b>MAX7221<\/b> is similar to <b>MAX7219<\/b> except for two parameters:<\/p>\n<ol>\n<li><b>MAX7221<\/b> segment drivers are slew-rate limited to reduce electromagnetic interference;<\/li>\n<li>its serial interface is fully SPI compatible.<\/li>\n<\/ol>\n<p><!--more-->In theory our example could work with <b>MAX7221<\/b> as well but it has been tested with <b>MAX7219<\/b> only.<\/p>\n<h4 id=\"3_Documentation\" class=\"level_2\">Documentation<\/h4>\n<p>The next document is the datasheet for both <b>MAX7219<\/b> and <b>MAX7221<\/b>.<\/p>\n<p><a href=\"https:\/\/playembedded.org\/wp-content\/uploads\/2016\/04\/Datasheet_MAX7219.pdf\" rel=\"\">MAX7219 Datasheet<\/a><\/p>\n<h3 id=\"4_Features\" class=\"level_1\">Features<\/h3>\n<h4 id=\"5_Design_and_DIY_kit_connections\" class=\"level_2\">Design and DIY kit connections<\/h4>\n<figure id=\"attachment_2590\" aria-describedby=\"caption-attachment-2590\" style=\"width: 300px\" class=\"wp-caption alignleft\"><a href=\"https:\/\/playembedded.org\/wp-content\/uploads\/2016\/04\/art_013_matrix.jpg\" rel=\"attachment wp-att-2590\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-2590\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2016\/04\/art_013_matrix-300x300.jpg\" alt=\"LED matrix schematic\" width=\"300\" height=\"300\" srcset=\"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art_013_matrix-300x300.jpg 300w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art_013_matrix-150x150.jpg 150w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art_013_matrix-32x32.jpg 32w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art_013_matrix-64x64.jpg 64w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art_013_matrix-96x96.jpg 96w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art_013_matrix-128x128.jpg 128w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art_013_matrix-24x24.jpg 24w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art_013_matrix-36x36.jpg 36w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art_013_matrix-48x48.jpg 48w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art_013_matrix.jpg 550w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\"><\/a><figcaption id=\"caption-attachment-2590\" class=\"wp-caption-text\">A schematic of a LED matrix 8&times;8.<\/figcaption><\/figure>\n<p>The <b>MAX7219<\/b> can work with a voltage between 4.0~5.5V, and could be configured writing in some registers using a SPI. DIY kit we are using in this example is almost standard. the 8&times;8 LED Matrix provides 8 common cathodes and 8 common anodes identifying rows and columns of our matrix (See Fig. 2). Anodes are connected to segment outputs and cathodes to digits outputs. In <b>MAX7219<\/b>, when a segment driver is turned on it is pulled to <b>V+<\/b> and when a digit driver is turned on it is pulled to <b>GND<\/b>.<\/p>\n<p>If we consider the matrix orientation as that from Fig.1, segments (i.e. anodes) are representative of row indexes and digits (i.e. cathodes) are representative of column indexes. So if segment C and digit 0 are turned on the first LED on the third row is on. Combining the possible values for digits and segments <b>MAX7219<\/b> can address each LED individually. Note that we have not to perform some kind of multiplexing or scan as it is already performed internally by <b>MAX7219<\/b>.<\/p>\n<p>On the PCB we should find some capacitors to minimize power-supply ripple and a resistor to setup output current. In our case we have a 10&mu;F electrolytic and a 0.1&mu;F ceramic capacitor (between <b>V+<\/b> and <b>GND<\/b> pins from <b>MAX7219<\/b>) and a 10k&Omega; resistor (between <b>V+<\/b> and <b>ISET<\/b> pins from <b>MAX7219<\/b>). Current for a segment driver (i.e. current for an entire row) is typically 100 times the <b>RSET<\/b> current (that could be computed as <b>V+<\/b>\/<b>RSET<\/b> = 5V \/ 10k&Omega; = 0.5mA).<\/p>\n<h4 id=\"6_Pin_description\" class=\"level_2\">Pin description<\/h4>\n<figure id=\"attachment_2591\" aria-describedby=\"caption-attachment-2591\" style=\"width: 300px\" class=\"wp-caption alignright\"><a href=\"https:\/\/playembedded.org\/wp-content\/uploads\/2016\/04\/art_013_pinmap.jpg\" rel=\"attachment wp-att-2591\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-2591\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2016\/04\/art_013_pinmap-300x143.jpg\" alt=\"LED matrix driver circuit\" width=\"300\" height=\"143\" srcset=\"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art_013_pinmap-300x143.jpg 300w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art_013_pinmap-150x72.jpg 150w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art_013_pinmap-24x11.jpg 24w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art_013_pinmap-36x17.jpg 36w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art_013_pinmap-48x23.jpg 48w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art_013_pinmap.jpg 600w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\"><\/a><figcaption id=\"caption-attachment-2591\" class=\"wp-caption-text\">The MAX7219 based driver circuit with pin labels.<\/figcaption><\/figure>\n<p>Not every pin from <b>MAX7219<\/b> is connected to the external connector. These devices could be connected in chain so we have two connectors. For the input one we have starting from top:<\/p>\n<ol>\n<li><b>VCC<\/b>, power supply 4.0~5.5V DC<\/li>\n<li><b>GND<\/b>, connection to ground<\/li>\n<li><b>DIN<\/b>, SPI master output slave input<\/li>\n<li><b>SCL<\/b>, SPI serial clock<\/li>\n<li><b>CS<\/b>, SPI chip select<\/li>\n<\/ol>\n<p>For the output one we have starting from top:<\/p>\n<ol>\n<li><b>VCC<\/b>, power supply 4.0~5.5V DC<\/li>\n<li><b>GND<\/b>, connection to ground<\/li>\n<li><b>DOUT<\/b>, SPI master input slave output<\/li>\n<li><b>SCL<\/b>, SPI serial clock<\/li>\n<li><b>CS<\/b>, SPI chip select<\/li>\n<\/ol>\n<p>Note that <b>DOUT<\/b> could be connected to SPI MISO closing daisy chain or to <b>DIN<\/b> of another <b>MAX7219<\/b>.<\/p>\n<h3 id=\"7_Operation_mode\" class=\"level_1\">Operation mode<\/h3>\n<h4 id=\"8_Communication_scheme_and_timing\" class=\"level_2\">Communication&nbsp;scheme and timing<\/h4>\n<p>Communication occurs through SPI bus. Summarizing most important info about communication are:<\/p>\n<ul>\n<li>CPOL is low;<\/li>\n<li>CPHA is low;<\/li>\n<li>Clock maximum rate is 10MHz;<\/li>\n<li>Data size is 16 bit;<\/li>\n<\/ul>\n<h4 id=\"9_Registers\" class=\"level_2\">Registers<\/h4>\n<p>The <b>MAX7219<\/b> has several 8-bit register in which we can write using a word like that shown in Fig.4. As example writing this:<\/p>\n<pre>uint16_t txbuf = {a &lt;&lt; 8 | b};\nspiSelect(spip);\nspiSend(spip, 1, &amp;txbuf);\nspiUnselect(spip);<\/pre>\n<p>we are writing <b>b<\/b> in the register pointed by <b>a<\/b>. We have a register for each digit and 6 control registers.<\/p>\n<h5 id=\"10_Digit_0_7\" class=\"level_3\">Digit 0~7<\/h5>\n<p>These are data register for the 8 digit which <b>MAX7219<\/b> is managing. Meaning of this registers depends on <b>DECODE MODE<\/b>.<\/p>\n<h5 id=\"11_Decode_mode\" class=\"level_3\">Decode mode<\/h5>\n<p>This register sets BCD code B or no-decode operation for each digit. Code B is a decode option that allow to easily draw certain symbols on a 7-segment display. So, if this option is enabled, writing 0x02 in <b>Digit 0<\/b> register certain segments will be turned on drawing a number &ldquo;2&rdquo; on the first digit of our display. In Code B mode the allowed symbols are digits from &ldquo;0&rdquo; to &ldquo;9&rdquo;, &ldquo;E&rdquo;, &ldquo;H&rdquo;, &ldquo;L&rdquo;, &ldquo;P&rdquo; and &ldquo;-&rdquo; (See Table 5 on datasheet for more informations).Note that as we are driving a LED matrix decode option does not have any sense. In no-decode mode every bit represents a segment (as shown in Table 6 on datasheet).<\/p>\n<h5 id=\"12_Intensity\" class=\"level_3\">Intensity<\/h5>\n<p>We already said that <b>MAX7219<\/b> allows display brightness to be controlled through <b>RSET<\/b>. Display brightness can also be controlled digitally using intensity register. Digital control of display brightness is provided by an internal pulse-width modulator. The modulator scales the average segment current in 16 steps from a maximum of 31\/32 down to 1\/32 of the peak current set by <b>RSET<\/b> (For more info see table 7 on datasheet).<\/p>\n<h5 id=\"13_Scan_Limit\" class=\"level_3\">Scan Limit<\/h5>\n<p>We already said the <b>MAX7219<\/b> performs multiplexing. Thus register sets the number of digits scanned during this operation. Multiplexing is done with a typical scan rate of 800Hz when all digits are scanned. The less digits are scanned the more frequency and display brightness increases: for that reason scan-limit register should not be used to blank portions of the display.<\/p>\n<h5 id=\"14_Shut_Down\" class=\"level_3\">Shut Down<\/h5>\n<p>The Shut Down register operates in two modes: normal mode and shut down mode. In shut down mode, the scan oscillator is halted, all segment current sources are pulled to ground, and all digit drivers are pulled to V+, thereby blanking the display. Data in the digit and control registers remains unaltered so we can write operate on register even if <b>MAX7219<\/b> is in shut down mode. This mode can be used to save power or to flash the display by successively entering and leaving normal mode.<\/p>\n<h5 id=\"15_Display_test\" class=\"level_3\">Display test<\/h5>\n<p>The display-test register operates in two modes: normal and display test. Display-test mode turns all LEDs on by overriding, but not altering, all controls and digit registers<br>\n(including the shut-down register). In display-test mode, 8 digits are scanned and the duty cycle is 31\/32 (See Table 10 on datasheet for more information).<\/p>\n<h5 id=\"16_No_Operation\" class=\"level_3\">No Operation<\/h5>\n<p>This register is used when more devices are connected in daisy chain. Imagine we have 3 devices connected and we want to edit a digit on the last device. We have to send anyway three words. To avoid unwanted changes to the first and the second device we can use their No Operation register writing in it. As example let&rsquo;s consider next codebox:<\/p>\n<pre>uint16_t txbuf[3] = {0xC0, 0x00, 0x00};\nspiSelect(spip);\nspiSend(spip, 3, txbuf); \/* Most Significant Word First *\/\nspiUnselect(spip);<\/pre>\n<h3 id=\"17_Proposed_demo\" class=\"level_1\">Proposed demo<\/h3>\n<p>This demo is a simple accomplishment of what we said above.<\/p>\n<h4 id=\"18_Demo_explained\" class=\"level_2\">Demo explained<\/h4>\n<p>In the demo shown in the video above we set up <b>MAX7219<\/b> as normal operation, no-decode mode, scanning each digit with the maximum display intensity. After that we just copy some pre-sets in the Digit registers.<br>\nTo do this we just need to start SPI with proper configuration to write in registers. This operation is performed through an <b>spiSend()<\/b>. Some times ago we wrote bit masks and a write register function for <b>MAX7219<\/b>. We put this code in the community repository so you can find it under <b>C:\\ChibiStudio\\chibios3\\community\\os\\various\\devices_lib\\others<\/b>. Just note, we fixed some bugs in <b>MAX7219_DM_t<\/b> enumeration and they will be updated from version 3.0.1 of ChibiOS. Anyway this bug doesn&rsquo;t impact this demo.<\/p>\n<pre class=\"lang:c decode:true \">\/*\n    PLAY Embedded demos - Copyright (C) 2014-2016 Rocco Marco Guglielmi\n\n    This file is part of PLAY Embedded demos.\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http:\/\/www.apache.org\/licenses\/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n*\/\n\n\/*\n    Tested under ChibiOS\/RT 3.0.1, Project version 1.0\n *\/\n#include \"ch.h\"\n#include \"hal.h\"\n#include \"max7219.h\"\n\n\/*===========================================================================*\/\n\/* LED Matrix related code.                                                  *\/\n\/*===========================================================================*\/\n\n#define MAX_PRESET_NUMB                         17\n#define MAX_DIGITS                              8\n\nstatic uint8_t presets[MAX_PRESET_NUMB][MAX_DIGITS] = {\n   {0x18, 0x18, 0x18, 0x99, 0xDB, 0x7E, 0x3C, 0x18}, \/**&lt; Arrow dx.         *\/\n   {0x18, 0x3C, 0x7E, 0xDB, 0x99, 0x18, 0x18, 0x18}, \/**&lt; Arrow sx.         *\/\n   {0x00, 0x20, 0x44, 0x40, 0x40, 0x44, 0x20, 0x00}, \/**&lt; Happy face.       *\/\n   {0x00, 0x20, 0x14, 0x10, 0x10, 0x14, 0x20, 0x00}, \/**&lt; Sad face.         *\/\n   {0x00, 0x00, 0x00, 0xDF, 0xDF, 0x00, 0x00, 0x00}, \/**&lt; Exclamation point.*\/\n   {0x24, 0x66, 0xE7, 0xE7, 0xE7, 0xE7, 0x66, 0x24}, \/**&lt; Negate.           *\/\n   {0x00, 0x84, 0x86, 0xFF, 0xFF, 0x80, 0x80, 0x00}, \/**&lt; 1.                *\/\n   {0x00, 0x86, 0xC7, 0xE1, 0xB1, 0x9F, 0x8E, 0x00}, \/**&lt; 2.                *\/\n   {0x00, 0x00, 0x42, 0xC3, 0xDB, 0xFF, 0x66, 0x00}, \/**&lt; 3.                *\/\n   {0x00, 0x3F, 0x3F, 0x20, 0x20, 0xF8, 0xF8, 0x00}, \/**&lt; 4.                *\/\n   {0x00, 0xDF, 0xDB, 0xDB, 0xDB, 0xFB, 0x71, 0x00}, \/**&lt; 5.                *\/\n   {0x00, 0x7E, 0xFF, 0x89, 0x89, 0x89, 0x70, 0x00}, \/**&lt; 6.                *\/\n   {0x00, 0x03, 0x03, 0xE3, 0xFB, 0x1F, 0x07, 0x00}, \/**&lt; 7.                *\/\n   {0x00, 0x76, 0xFF, 0x99, 0x99, 0xFF, 0x76, 0x00}, \/**&lt; 8.                *\/\n   {0x00, 0x8E, 0x91, 0x91, 0x91, 0xFF, 0x7E, 0x00}, \/**&lt; 9.                *\/\n   {0x00, 0x7E, 0xFF, 0x81, 0x81, 0xFF, 0x7E, 0x00}, \/**&lt; 0.                *\/\n   {0x00, 0x06, 0x76, 0x30, 0x30, 0x76, 0x06, 0x00}  \/**&lt; Creeper face.     *\/\n};\n\n\/*===========================================================================*\/\n\/* SPI related code.                                                         *\/\n\/*===========================================================================*\/\n\n#define  GPIOB_SPID1_CS                 6\n#define  GPIOA_SPID1_SCK                5\n#define  GPIOA_SPID1_MISO               6\n#define  GPIOA_SPID1_MOSI               7\n\nstatic const SPIConfig spicfg = {\n  NULL,\n  GPIOB,                                          \/*   port of CS  *\/\n  GPIOB_SPID1_CS,                                 \/*   pin of CS   *\/\n  SPI_CR1_BR | SPI_CR1_DFF                        \/*   CR1 register *\/\n};\n\n\/*===========================================================================*\/\n\/* Generic code.                                                             *\/\n\/*===========================================================================*\/\n static unsigned ii, jj;\n\n\/*\n * Application entry point.\n *\/\nint main(void) {\n\n\n  \/*\n   * System initializations.\n   * - HAL initialization, this also initializes the configured device drivers\n   *   and performs the board-specific initializations.\n   * - Kernel initialization, the main() function becomes a thread and the\n   *   RTOS is active.\n   *\/\n  halInit();\n  chSysInit();\n\n  \/*\n   * SPID1 I\/O pins setup.(It bypasses board.h configurations)\n   *\/\n  palSetPadMode(GPIOA, GPIOA_SPID1_SCK,\n                PAL_MODE_ALTERNATE(5) | PAL_STM32_OSPEED_HIGHEST);   \/* New SCK *\/\n  palSetPadMode(GPIOA, GPIOA_SPID1_MISO,\n                PAL_MODE_ALTERNATE(5) | PAL_STM32_OSPEED_HIGHEST);   \/* New MISO*\/\n  palSetPadMode(GPIOA, GPIOA_SPID1_MOSI,\n                PAL_MODE_ALTERNATE(5) | PAL_STM32_OSPEED_HIGHEST);   \/* New MOSI*\/\n  palSetPadMode(GPIOB, GPIOB_SPID1_CS,\n                PAL_MODE_OUTPUT_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);\/* New CS  *\/\n\n  spiStart(&amp;SPID1, &amp;spicfg);\n  max7219WriteRegister(&amp;SPID1, MAX7219_AD_DISPLAY_TEST, FALSE);\n  max7219WriteRegister(&amp;SPID1, MAX7219_AD_SHUTDOWN, MAX7219_OM_Normal);\n  max7219WriteRegister(&amp;SPID1, MAX7219_AD_SCAN_LIMIT, MAX7219_SL_7);\n  max7219WriteRegister(&amp;SPID1, MAX7219_AD_DECODE_MODE,\n                       MAX7219_DM_No_decode);\n  max7219WriteRegister(&amp;SPID1, MAX7219_AD_INTENSITY,\n                       MAX7219_IM_31_32);\n  while (TRUE) {\n\n    for(ii = 0; ii &lt; MAX_DIGITS; ii++) {\n\n      max7219WriteRegister(&amp;SPID1, MAX7219_AD_DIGIT_0 + (ii &lt;&lt; 8),\n                           presets[jj][ii]);\n    }\n    jj = (jj + 1) % MAX_PRESET_NUMB;\n    chThdSleepMilliseconds(500);\n  }\n  spiStop(&amp;SPID1);\n}\n<\/pre>\n<h3 id=\"19_Project_download\" class=\"level_1\">Project download<\/h3>\n<p>The attached demo has been tested under ChibiOS 20.3.x.<\/p>\n<p><a href=\"https:\/\/playembedded.org\/wp-content\/uploads\/2021\/07\/RT-STM32F401RE-NUCLEO64-MAX7219-8x8matrix-216.7z\" rel=\"\">RT-STM32F401RE-NUCLEO64-MAX7219-8x8matrix-216<\/a><\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>A compact display driver: the MAX7219 The MAX7219 is a compact, serial input\/parallel output common-cathode display driver. Included on-chip there are a BCD code-B decoder, the multiplex scan circuitry, segment and digit drivers, and an 8&times;8 static RAM that stores each digit. Only one external resistor is required to set the segments current. Common uses [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":2402,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1225],"tags":[],"coauthors":[241],"class_list":["post-2172","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-interfacing-externals","red"],"views":14018,"jetpack_featured_media_url":"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/STM32-ChibiOS-e-una-matrice-di-LED-8x8.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/posts\/2172","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/comments?post=2172"}],"version-history":[{"count":0,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/posts\/2172\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/media\/2402"}],"wp:attachment":[{"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/media?parent=2172"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/categories?post=2172"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/tags?post=2172"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/coauthors?post=2172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}