{"id":2344,"date":"2024-07-16T16:49:25","date_gmt":"2024-07-16T16:49:25","guid":{"rendered":"https:\/\/iotthinghub.com\/?p=2344"},"modified":"2024-08-12T12:49:59","modified_gmt":"2024-08-12T12:49:59","slug":"i2c-scanner-rfid-card-reader","status":"publish","type":"post","link":"https:\/\/iotthinghub.com\/?p=2344","title":{"rendered":"I2C Scanner &amp; RFID Card Reader"},"content":{"rendered":"\n<p class=\"has-text-color has-link-color wp-elements-1 wp-block-paragraph\" style=\"color:#5c5c5c\">To communication with PC or laptop with microcontroller, the popular protocol is UART. In PC or laptop we see serial port which has Tx and Rx pin. It is a 9 pin terminal which has the pin-<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"301\" src=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/table-11-1024x301.jpg\" alt=\"\" class=\"wp-image-2345\" style=\"width:770px;height:auto\" srcset=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/table-11-1024x301.jpg 1024w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/table-11-300x88.jpg 300w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/table-11-768x226.jpg 768w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/table-11.jpg 1385w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-2 wp-block-paragraph\" style=\"color:#5c5c5c\">For Asynchronous data transmission we need only 3 wire \u2013 Rx, Tx and Ground. The RTS and CTS device pin provides RTS and\/or CTS flow control. CTS control signals the host to stop sending serial data to the device. RTS flow control lets the host signal the device so it will send the data in serial transmit buffer out the UART. Most of the PC\/Laptop doesn\u2019t have serial terminal and the communication need TTL communication. USB to TTL converter is the most popular form of UART communication form PC to microcontroller. We use CP2101device (USB to UART bridge) which has the circuitry-<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><img decoding=\"async\" width=\"1024\" height=\"433\" src=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/CP2102-1024x433.jpg\" alt=\"\" class=\"wp-image-2346\" style=\"width:789px;height:auto\" srcset=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/CP2102-1024x433.jpg 1024w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/CP2102-300x127.jpg 300w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/CP2102-768x325.jpg 768w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/CP2102.jpg 1426w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-3 wp-block-paragraph\" style=\"color:#5c5c5c\">Use any PC terminal <strong>Realterm<\/strong> or <strong>PuTTY<\/strong> select appropriate COM port, Baud rate, parity, data size, stop bit. In I<sup>2<\/sup>C protocol learning we need to identify the I<sup>2<\/sup>C 7 bit address to communicate. Let\u2019s test different I<sup>2<\/sup>C device with the I<sup>2<\/sup>C Scanner.<\/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\/I2C-Scanner.rar\" style=\"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-text-color has-link-color has-upper-heading-font-size wp-elements-4 wp-block-paragraph\" style=\"color:#252525\"><a href=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/08\/I2C-Scanner.rar\">download the hex file, it is for I<sup>2<\/sup>C Scanner.<\/a><\/p>\n<\/div>\n<\/div>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-5 wp-block-paragraph\" style=\"color:#5c5c5c\">The hex file compatible ATmega48\/88\/168\/328 microcontroller. You can any use any microcontroller you want, no need to change any fuse bit of the microcontroller. The program is done with the default clock frequency. Select Connection type&gt; Serial, COM pin as shown in the Device Manager&gt; Ports(COM &amp; LPT) terminal, baud rate 9600, 8bit character, no purity, one stop bit configuration. Microcontroller connection-<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"292\" src=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/I2C-Scaner-1024x292.jpg\" alt=\"\" class=\"wp-image-2349\" srcset=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/I2C-Scaner-1024x292.jpg 1024w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/I2C-Scaner-300x86.jpg 300w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/I2C-Scaner-768x219.jpg 768w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/I2C-Scaner.jpg 1229w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-6 wp-block-paragraph\" style=\"color:#5c5c5c\">Connect any I<sup>2<\/sup>C device and press enter key. The serial terminal will show the device 7bit address. It will help you to know any I<sup>2<\/sup>C device address, that will help you for farther program. In SPI section we learn about RFID card. The unique address UUID can also be show in the PC terminal.<\/p>\n\n\n\n<p class=\"has-text-align-center has-text-color has-link-color has-upper-heading-font-size wp-elements-7 wp-block-paragraph\" style=\"color:#6c8a97\">RFID card UUID Scanner<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"291\" src=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/UUID-Scannar-1024x291.jpg\" alt=\"\" class=\"wp-image-2352\" srcset=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/UUID-Scannar-1024x291.jpg 1024w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/UUID-Scannar-300x85.jpg 300w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/UUID-Scannar-768x218.jpg 768w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/UUID-Scannar.jpg 1242w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-8 wp-block-paragraph\" style=\"color:#5c5c5c\">The program is done with ATmega8. Download the main.hex file and load the flash file. No need for fuse setting. When a TAG\/RFID card is placed near the RFID reader it will display the 4byte UUID. It will help you in RFID identification.<\/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\/RFID-UID-Reading.rar\" style=\"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-text-color has-link-color has-upper-heading-font-size wp-elements-9 wp-block-paragraph\" style=\"color:#252525\"><a href=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/08\/RFID-UID-Reading.rar\">download the hex file, it is for RFID card UUID Scanner.<\/a><\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>To communication with PC or laptop with microcontroller, the popular protocol is UART. In PC or laptop we see serial port which has Tx and Rx pin. It is a 9 pin terminal which has the pin- For Asynchronous data transmission we need only 3 wire \u2013 Rx, Tx and Ground. The RTS and CTS [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-2344","post","type-post","status-publish","format-standard","hentry","category-uart"],"_links":{"self":[{"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/posts\/2344","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=2344"}],"version-history":[{"count":6,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/posts\/2344\/revisions"}],"predecessor-version":[{"id":2659,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/posts\/2344\/revisions\/2659"}],"wp:attachment":[{"href":"https:\/\/iotthinghub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2344"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2344"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}