{"id":11,"date":"2017-04-02T19:31:21","date_gmt":"2017-04-02T16:01:21","guid":{"rendered":"http:\/\/haghiri75.com\/en\/?p=11"},"modified":"2017-04-02T19:31:21","modified_gmt":"2017-04-02T16:01:21","slug":"hexadecimal-decoder-seven-segment","status":"publish","type":"post","link":"https:\/\/haghiri75.com\/en\/hexadecimal-decoder-seven-segment\/","title":{"rendered":"Hexadecimal Decoder (Seven Segment)"},"content":{"rendered":"<p>You may use a seven segment to show time, temperature, voltage, etc. But, when you want to use it as an interface, specially on a simple computer, usual decoders (e.g. 7447) are not the best choice. You may need a shift-register or you may need to make a specific decoder for your computer display.\u00a0 If you watch <a href=\"https:\/\/www.youtube.com\/watch?v=BA12Z7gQ4P0\" target=\"_blank\">Ben Eater&#8217;s video about EEPROM<\/a>,\u00a0 You will find an <em>Electrical Erasable ROM <\/em>can be your decoder. But how? Imagine we have a common-cathode seven segment display. Then, We will have something like this for number zero :<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: center;\">dp<\/th>\n<th style=\"text-align: center;\">g<\/th>\n<th style=\"text-align: center;\">f<\/th>\n<th style=\"text-align: center;\">e<\/th>\n<th style=\"text-align: center;\">d<\/th>\n<th style=\"text-align: center;\">c<\/th>\n<th style=\"text-align: center;\">b<\/th>\n<th style=\"text-align: center;\">a<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>So,\u00a0 if we want to show a hexadecimal number, what will we need? Of course, we need to find which pins of our common cathode should be on for a specific number. In case of common anode displays, pins should be off.\u00a0 Now, let&#8217;s design our <strong><em>Truth Table<\/em><\/strong>.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: center;\">Number<\/th>\n<th style=\"text-align: center;\">dp<\/th>\n<th style=\"text-align: center;\">g<\/th>\n<th style=\"text-align: center;\">f<\/th>\n<th style=\"text-align: center;\">e<\/th>\n<th style=\"text-align: center;\">d<\/th>\n<th style=\"text-align: center;\">c<\/th>\n<th style=\"text-align: center;\">b<\/th>\n<th style=\"text-align: center;\">a<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">2<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">3<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">4<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">5<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">6<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">7<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">8<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">9<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">A<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">b<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">C<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">d<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">E<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">F<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">0<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>This is our truth table. Fortunately, Logisim can make a circuit from a truth table, but I made this circuit before. It looks like this :<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-large\" src=\"https:\/\/github.com\/prp-e\/ladybug-display-driver\/raw\/master\/LadyBugSevenSegmentDriver.png\" width=\"350\" height=\"1992\" \/><\/p>\n<p>The inputs W, X, Y and Z represent the BCD input. But how can make this thing? if you are interested to make one of these for real, you can use a 2816 chip, which is actually an EEPROM.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You may use a seven segment to show time, temperature, voltage, etc. But, when you want to use it as an interface, specially on a simple computer, usual decoders (e.g. 7447) are not the best choice. You may need a shift-register or you may need to make a specific decoder for your computer display.\u00a0 If &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/haghiri75.com\/en\/hexadecimal-decoder-seven-segment\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Hexadecimal Decoder (Seven Segment)&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[3],"tags":[10,6,7,5,9,8],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8BkKn-b","jetpack-related-posts":[{"id":97,"url":"https:\/\/haghiri75.com\/en\/how-to-be-a-hardware-engineer\/","url_meta":{"origin":11,"position":0},"title":"How to be a hardware engineer","author":"prp-e","date":"October 4, 2017","format":false,"excerpt":"A computer, is made up of hardware and software. Lots of people like to write and develop software, so the internet is full of topics like \"How to be a software engineer\" or \"how to write a computer program\" and also, there is a lot of great and free tutorials\u2026","rel":"","context":"In &quot;Computer Architecture &amp; Programming&quot;","block_context":{"text":"Computer Architecture &amp; Programming","link":"https:\/\/haghiri75.com\/en\/category\/computer\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":86,"url":"https:\/\/haghiri75.com\/en\/importance-of-iot\/","url_meta":{"origin":11,"position":1},"title":"Importance of IoT","author":"prp-e","date":"August 23, 2017","format":false,"excerpt":"For the last 25 years, a ghost is flying over our world, it's the ghost of \"Internet\". From 80's, internet became one of the most used tools for international communications, such as knowledge sharing. So, a lot of people started using internet to share knowledge, to do research or even\u2026","rel":"","context":"In &quot;Computer Architecture &amp; Programming&quot;","block_context":{"text":"Computer Architecture &amp; Programming","link":"https:\/\/haghiri75.com\/en\/category\/computer\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":16,"url":"https:\/\/haghiri75.com\/en\/microcontrollers-design-and-implementation-released\/","url_meta":{"origin":11,"position":2},"title":"Microcontrollers, Design and Implementation released!","author":"prp-e","date":"April 4, 2017","format":false,"excerpt":"It was about two years I started serious study on computer architecture. In these years, I learned a lot and I could simulate and implement a microprocessor, similar to real ones. In Summer 2016, I decided to share my experience with others. Then, I started writing this book. This book\u2026","rel":"","context":"In &quot;Computer Architecture &amp; Programming&quot;","block_context":{"text":"Computer Architecture &amp; Programming","link":"https:\/\/haghiri75.com\/en\/category\/computer\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":44,"url":"https:\/\/haghiri75.com\/en\/reverse-engineering-of-8086-from-a-calculator-to-the-most-used-processor\/","url_meta":{"origin":11,"position":3},"title":"Reverse engineering of 8086, from a calculator to the most used processor","author":"prp-e","date":"April 22, 2017","format":false,"excerpt":"If you have a laptop or desktop computer, you probably use a 8086-based CPU, or one implementation of x86 family to be exact. For example, I have a Lenovo laptop with a Core i5 CPU, which is based on x86 architecture. In this article, I want to talk about x86\u2026","rel":"","context":"In &quot;Computer Architecture &amp; Programming&quot;","block_context":{"text":"Computer Architecture &amp; Programming","link":"https:\/\/haghiri75.com\/en\/category\/computer\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":20,"url":"https:\/\/haghiri75.com\/en\/a-very-short-introduction-to-ambient-music\/","url_meta":{"origin":11,"position":4},"title":"A very short introduction to Ambient Music","author":"prp-e","date":"April 8, 2017","format":false,"excerpt":"In my Persian blog, I had written a lot about operating systems, computer architecture and digital electronics. I have plans for English blog and I'll write about computer science and engineering in future, but, I decided to explain my experiences in music for now. In this article, I'm going to\u2026","rel":"","context":"In \"ambient\"","block_context":{"text":"ambient","link":"https:\/\/haghiri75.com\/en\/tag\/ambient\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":161,"url":"https:\/\/haghiri75.com\/en\/analyzing-components-of-an-electric-circuit-with-yolov5\/","url_meta":{"origin":11,"position":5},"title":"Analyzing components of an electric circuit with YOLOv5","author":"prp-e","date":"January 14, 2022","format":false,"excerpt":"In past recent weeks, I did a lot with YOLOv5. A few weeks prior to this article, I wrote an article on why I love YOLOv5 and later, I did a project with YOLOv5 which was somehow a try for making something like symbolab or similar software. I explained that\u2026","rel":"","context":"In &quot;Computer Architecture &amp; Programming&quot;","block_context":{"text":"Computer Architecture &amp; Programming","link":"https:\/\/haghiri75.com\/en\/category\/computer\/"},"img":{"alt_text":"Electric Circuit component analysis using YOLOv5","src":"https:\/\/i0.wp.com\/haghiri75.com\/en\/wp-content\/uploads\/Screen-Shot-2022-01-13-at-1.05.41-AM-1024x583.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/haghiri75.com\/en\/wp-content\/uploads\/Screen-Shot-2022-01-13-at-1.05.41-AM-1024x583.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/haghiri75.com\/en\/wp-content\/uploads\/Screen-Shot-2022-01-13-at-1.05.41-AM-1024x583.png?resize=525%2C300 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/haghiri75.com\/en\/wp-json\/wp\/v2\/posts\/11"}],"collection":[{"href":"https:\/\/haghiri75.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/haghiri75.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/haghiri75.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/haghiri75.com\/en\/wp-json\/wp\/v2\/comments?post=11"}],"version-history":[{"count":4,"href":"https:\/\/haghiri75.com\/en\/wp-json\/wp\/v2\/posts\/11\/revisions"}],"predecessor-version":[{"id":15,"href":"https:\/\/haghiri75.com\/en\/wp-json\/wp\/v2\/posts\/11\/revisions\/15"}],"wp:attachment":[{"href":"https:\/\/haghiri75.com\/en\/wp-json\/wp\/v2\/media?parent=11"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/haghiri75.com\/en\/wp-json\/wp\/v2\/categories?post=11"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/haghiri75.com\/en\/wp-json\/wp\/v2\/tags?post=11"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}