{"id":683,"date":"2024-06-22T14:47:46","date_gmt":"2024-06-22T14:47:46","guid":{"rendered":"https:\/\/iotthinghub.com\/?p=683"},"modified":"2024-08-10T18:04:08","modified_gmt":"2024-08-10T18:04:08","slug":"illusion","status":"publish","type":"post","link":"https:\/\/iotthinghub.com\/?p=683","title":{"rendered":"illusion"},"content":{"rendered":"\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"590\" height=\"583\" src=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/segment.png\" alt=\"\" class=\"wp-image-687\" srcset=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/segment.png 590w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/segment-300x296.png 300w\" sizes=\"(max-width: 590px) 100vw, 590px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<p class=\"has-medium-font-size wp-block-paragraph\">Due to the persistence of vision our eye can\u2019t distinguish what happen in TV. A full movie consists of numbers of pictures that move so fast that we can\u2019t separate them. We will now make a program in which two 7 segment display on-off too fast that we will see a running digit.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the picture if \u00b5C pin is zero 7 segment display will active otherwise inactive. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let run a simple program and see what happen in proteus.<\/p>\n<\/div>\n<\/div>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\n#include&lt;avr\/io.h&gt;\n#include&lt;util\/delay.h&gt;\nint main(void)\n{\n\tDDRD=0xff;\t\t\t\t\t\/\/7 segment display PORT\n\tDDRB=0x03;\t\t\t\t\t\/\/7 seg control pin PD&#x5B;0,1]\nwhile(1)\n\t{\n\t\tPORTB=(1&lt;&lt;0);\t\t\t\/\/7 segment corresponding to mcu pin--PINB0 active\n\t\tPORTD=0b01100000;   \t\/\/display 1\n\t\t_delay_ms(5);\t\t\t\/\/5ms delay\n\t\tPORTB=0x03;\t\t\t\t\/\/Dark condition\n\t\t_delay_ms(20);\t\t\t\/\/20ms delay\n\t\tPORTB=(1&lt;&lt;1);\t\t\t\/\/7 segment corresponding to mcu pin--PIND1 active\n\t\tPORTD=0b11011010;\t\t\/\/display 2\n\t\t_delay_ms(5);\t\t\t\/\/5ms delay\n\t\tPORTB=0x03;\t\t\t\t\/\/Dark condition\n\t\t_delay_ms(20);          \/\/20ms delay\n\t}\nreturn 0;\n}\n<\/pre><\/div>\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"590\" height=\"395\" src=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/illusion.png\" alt=\"\" class=\"wp-image-707\" style=\"width:517px;height:auto\" srcset=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/illusion.png 590w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/illusion-300x201.png 300w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/06\/illusion-272x182.png 272w\" sizes=\"(max-width: 590px) 100vw, 590px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<p class=\"has-medium-font-size wp-block-paragraph\">In this program first display 1 after that dark condition arise than display 2 in another 7 segment after that dark condition arise and the process repeat. The delays are so adjust so that our eye can\u2019t distinguish and we see a running 7 segment. This trick is so simple and we use it in our next part that counting visitors.<\/p>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-3e41869c wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/08\/3.-Eye-Defection.rar\" style=\"border-radius:18px;padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--40)\">download<\/a><\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<p class=\"has-upper-heading-font-size wp-block-paragraph\"><a href=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/08\/3.-Eye-Defection.rar\">Download the full program with proteus simulation<\/a><\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Due to the persistence of vision our eye can\u2019t distinguish what happen in TV. A full movie consists of numbers of pictures that move so fast that we can\u2019t separate them. We will now make a program in which two 7 segment display on-off too fast that we will see a running digit. In the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-683","post","type-post","status-publish","format-standard","hentry","category-i-o-port-operations"],"_links":{"self":[{"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/posts\/683","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=683"}],"version-history":[{"count":24,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/posts\/683\/revisions"}],"predecessor-version":[{"id":2534,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/posts\/683\/revisions\/2534"}],"wp:attachment":[{"href":"https:\/\/iotthinghub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}