{"id":336,"date":"2014-06-06T17:47:53","date_gmt":"2014-06-06T17:47:53","guid":{"rendered":"http:\/\/www.thinkering.de\/cms\/?p=336"},"modified":"2017-02-20T08:16:15","modified_gmt":"2017-02-20T08:16:15","slug":"jumbo-i2c-4-digit-led-display","status":"publish","type":"post","link":"http:\/\/www.thinkering.de\/cms\/?p=336","title":{"rendered":"Jumbo I2C 4-Digit LED Display"},"content":{"rendered":"<p>This is a huge 4-digit i2c display based on an Atmega8 @16MHz which operates as a i2c slave and does all the multiplexing via timer interrupt. The display is composed of four sa23-12srwa seven segment displays (common anode) with a digit height of 57mm. The firmware for the Atmega8 was written in AVR Studio in C.<br \/>\n<br style=\u201dclear:both;\u201d \/><br \/>\n<br style=\u201dclear:both;\u201d \/><br \/>\nIt can be addressed simply connecting it to an Arduino and using the wire library. Whenever an ultra-readable bright digit display is needed that is easy to use, this one might come in handy. Some projects I thought of were an oldschool thermometer clock or a distance-measuring device for the garage entrance.<br \/>\n<br style=\u201dclear:both;\u201d \/><br \/>\n<br style=\u201dclear:both;\u201d \/><br \/>\n<a href=\"http:\/\/www.thinkering.de\/cms\/wp-content\/uploads\/2014\/06\/Circuit-details-Jumbo-LED-Display.jpg\"><img loading=\"lazy\" src=\"http:\/\/www.thinkering.de\/cms\/wp-content\/uploads\/2014\/06\/Circuit-details-Jumbo-LED-Display-300x225.jpg\" alt=\"Circuit details Jumbo LED Display\" width=\"300\" height=\"225\" class=\"alignnone size-medium wp-image-337\" srcset=\"http:\/\/www.thinkering.de\/cms\/wp-content\/uploads\/2014\/06\/Circuit-details-Jumbo-LED-Display-300x225.jpg 300w, http:\/\/www.thinkering.de\/cms\/wp-content\/uploads\/2014\/06\/Circuit-details-Jumbo-LED-Display-1024x768.jpg 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n<br style=\u201dclear:both;\u201d \/><br \/>\n<br style=\u201dclear:both;\u201d \/><br \/>\nThe anodes are driven using an ADN2981 driver and are attached to PB0&#8230;3. The cathodes take up the entire PORT D and are driven by a ULN2803. Those drivers are necessary, since the segments (except for the decimal point) are several red LEDs connected in series dropping ca. 7.4V. One does not simply connect one of those to a blank microcontroller port.<br \/>\n<br style=\u201dclear:both;\u201d \/><br \/>\n<br style=\u201dclear:both;\u201d \/><br \/>\n<a href=\"http:\/\/www.thinkering.de\/cms\/wp-content\/uploads\/2014\/06\/I2C-Arduino-Jumbo-LED-Display.jpg\"><img loading=\"lazy\" src=\"http:\/\/www.thinkering.de\/cms\/wp-content\/uploads\/2014\/06\/I2C-Arduino-Jumbo-LED-Display-300x225.jpg\" alt=\"I2C Arduino Jumbo LED Display\" width=\"300\" height=\"225\" class=\"alignnone size-medium wp-image-338\" srcset=\"http:\/\/www.thinkering.de\/cms\/wp-content\/uploads\/2014\/06\/I2C-Arduino-Jumbo-LED-Display-300x225.jpg 300w, http:\/\/www.thinkering.de\/cms\/wp-content\/uploads\/2014\/06\/I2C-Arduino-Jumbo-LED-Display-1024x768.jpg 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n<br style=\u201dclear:both;\u201d \/><br \/>\n<br style=\u201dclear:both;\u201d \/><br \/>\nSource code for the Atmega8 (AVR Studio, C) as well as the Arduino which acts as a I2C master:<br \/>\n<br style=\u201dclear:both;\u201d \/><br \/>\n<br style=\u201dclear:both;\u201d \/><br \/>\n<a href=\"http:\/\/www.thinkering.de\/cms\/wp-content\/uploads\/2014\/06\/I2CjumboDisplayFirmware.rar\">I2CjumboDisplayFirmware<\/a><br \/>\n<br style=\u201dclear:both;\u201d \/><br \/>\n<br style=\u201dclear:both;\u201d \/><\/p>\n<pre class=\"brush: cpp; collapse: true; light: false; title: ; toolbar: true; notranslate\" title=\"\">\r\n\/\/ Functions to talk to the DIY jumbo LED four digit display board\r\n\r\n\r\n\r\n#include &lt;Wire.h&gt;\r\n\r\nvoid setup()\r\n{\r\n  Wire.begin(); \/\/ join i2c bus (address optional for master)\r\n}\r\n\r\n\r\n\r\nvoid loop()\r\n{\r\n  for(int i = 0; i &lt; 10000; i++){\r\n    ledDisplayInt(i);\r\n    delay(30);\r\n  }\r\n}\r\n\r\nvoid ledDisplayInt(int number){\r\n  int number_disass = number;\r\n  int Digit_X000, Digit_0X00, Digit_00X0, Digit_000X;\r\n  Digit_X000 = number_disass\/1000; \r\n  number_disass %= 1000;\r\n  Digit_0X00 = number_disass\/100;  \r\n  number_disass %= 100;\r\n  Digit_00X0 = number_disass\/10;\t  \r\n  number_disass %= 10;\r\n  Digit_000X = number_disass;\r\n  Wire.beginTransmission(40); \/\/ transmit to device #40 for some reason it addresses a slave with the address 0x50\r\n  \/\/Wire.write(&quot;x is &quot;);        \/\/ sends five bytes\r\n  Wire.write(byte(0));  \/\/begin\r\n  \/\/sending 0...9 displays the digit, sending 10 makes digit dark\r\n  if(number &gt; 999){\r\n    Wire.write(Digit_X000);              \/\/thousands\r\n  }\r\n  else{\r\n    Wire.write(10);   \r\n  }\r\n  if(number &gt; 99){\r\n    Wire.write(Digit_0X00);                \/\/hundreds\r\n  }\r\n  else{\r\n    Wire.write(10);   \r\n  }\r\n  if(number &gt; 9){\r\n    Wire.write(Digit_00X0);                \/\/tens\r\n  }\r\n  else{\r\n    Wire.write(10);   \r\n  }\r\n  Wire.write(Digit_000X);                \/\/ones\r\n  Wire.write(4);                \/\/decimal point position (0...3, 4 is no comma)\r\n  Wire.write(1);                \/\/display on\/off (0x00 =&gt; off)\r\n  Wire.endTransmission();    \/\/ stop transmitting\r\n}\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This is a huge 4-digit i2c display based on an Atmega8 @16MHz which operates as a i2c slave and does all the multiplexing via timer interrupt. The display is composed of four sa23-12srwa seven segment displays (common anode) with a digit height of 57mm. The firmware for the Atmega8 was written in AVR Studio in &hellip; <a href=\"http:\/\/www.thinkering.de\/cms\/?p=336\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Jumbo I2C 4-Digit LED Display<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0},"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/www.thinkering.de\/cms\/index.php?rest_route=\/wp\/v2\/posts\/336"}],"collection":[{"href":"http:\/\/www.thinkering.de\/cms\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.thinkering.de\/cms\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.thinkering.de\/cms\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.thinkering.de\/cms\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=336"}],"version-history":[{"count":4,"href":"http:\/\/www.thinkering.de\/cms\/index.php?rest_route=\/wp\/v2\/posts\/336\/revisions"}],"predecessor-version":[{"id":914,"href":"http:\/\/www.thinkering.de\/cms\/index.php?rest_route=\/wp\/v2\/posts\/336\/revisions\/914"}],"wp:attachment":[{"href":"http:\/\/www.thinkering.de\/cms\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=336"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.thinkering.de\/cms\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=336"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.thinkering.de\/cms\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=336"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}