{"id":212,"date":"2012-05-31T06:34:27","date_gmt":"2012-05-31T06:34:27","guid":{"rendered":"http:\/\/www.horter.de\/blog\/?p=212"},"modified":"2023-01-14T17:30:44","modified_gmt":"2023-01-14T17:30:44","slug":"i2c-scan-mit-rs232-modem","status":"publish","type":"post","link":"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/","title":{"rendered":"I2C Bus Scan"},"content":{"rendered":"<p><span style=\"font-family: arial,helvetica,sans-serif;\">Mit dem I2C-Modem ist es relativ einfach\u00a0einen Bus Scan durchzuf\u00fchren und so den I2C-Bus\u00a0nach Teilnehmern mit unbekannten Slaveadressen zu durchsuchen.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">Ich habe einfach eine FOR NEXT Schleife programmiert in der alle Adressen von 1 &#8211; 255 nacheinander abgefragt werden.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">Antwortet ein I2C-Slave wird die Adresse in ein Textfeld eingetragen. Am Ende sieht man welche Teilnehmer sich am Bus befinden.<\/span><\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">Wenn man von einem I2C-Slave die Adresse nicht kennt kann diese mit dem Makro herausgefunden werden.<\/span><\/p>\n<p>&nbsp;<\/p>\n<hr \/>\n<p><span style=\"font-family: courier new,courier;\"><span style=\"color: #000080;\">Private Sub<\/span> Command_SCAN_Click() <\/span><\/p>\n<p><span style=\"font-family: courier new,courier;\"><span style=\"color: #000080;\">Dim<\/span> ScanAdresse, A, I<\/span><\/p>\n<p><span style=\"font-family: courier new,courier;\">TextBox_SCAN = &#8222;&#8220;<\/span><\/p>\n<p><span style=\"font-family: courier new,courier;\"><span style=\"color: #000080;\">For<\/span> ScanAdresse = 1 <span style=\"color: #000080;\">To<\/span> 255<\/span><\/p>\n<p><span style=\"font-family: courier new,courier;\">\u00a0\u00a0\u00a0SENDBYTE (128)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #008000;\">&#8218;Befehl 128 = Multiread + (Anzahl Bytes -1)\u00a0\u00a0<\/span><br \/>\n<\/span><span style=\"font-family: courier new,courier;\">\u00a0\u00a0 SENDBYTE (ScanAdresse)\u00a0\u00a0\u00a0<span style=\"color: #008000;\">&#8218;Bus-Adresse des CON-TEMOD-I2C Moduls schreiben<\/span><\/span><\/p>\n<p><span style=\"font-family: courier new,courier;\">\u00a0\u00a0\u00a0A = READBYTE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #008000;\">&#8218;Status vom Modem abfragen<\/span><\/span><\/p>\n<p><span style=\"font-family: courier new,courier;\"><span style=\"color: #000080;\">\u00a0\u00a0 If<\/span> A = 192 <span style=\"color: #000080;\">Then<\/span><br \/>\n<\/span><span style=\"font-family: courier new,courier;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 TextBox_SCAN = TextBox_SCAN &amp; ScanAdresse &amp; vbCrLf<br \/>\n<span style=\"color: #000080;\">\u00a0\u00a0 End If<\/span><\/span><\/p>\n<p><span style=\"font-family: courier new,courier;\"><span style=\"color: #008000;\">\u00a0\u00a0 &#8218;Lesepuffer leeren<\/span><br \/>\n<\/span><span style=\"font-family: courier new,courier;\"><span style=\"color: #000080;\">\u00a0\u00a0 Do<\/span>: A = READBYTE : <span style=\"color: #000080;\">Loop Until<\/span> A = -1<\/span><\/p>\n<p><span style=\"color: #000080; font-family: courier new,courier;\">Next<\/span><\/p>\n<p><span style=\"color: #000080; font-family: courier new,courier;\">End Sub<\/span><\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mit dem I2C-Modem ist es relativ einfach\u00a0einen Bus Scan durchzuf\u00fchren und so den I2C-Bus\u00a0nach Teilnehmern mit unbekannten Slaveadressen zu durchsuchen. Ich habe einfach eine FOR NEXT Schleife programmiert in der alle Adressen von 1 &#8211; 255 nacheinander abgefragt werden. Antwortet&#8230; <a class=\"continue-reading-link\" href=\"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/\">mehr lesen<\/a><\/p>\n","protected":false},"author":3,"featured_media":28244,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[269,101],"tags":[41,7],"class_list":["post-212","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-i2c-pc-interface","category-programmierung","tag-bus-scan","tag-i2c"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>I2C Bus Scan - Horter &amp; Kalb Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"I2C Bus Scan - Horter &amp; Kalb Blog\" \/>\n<meta property=\"og:description\" content=\"Mit dem I2C-Modem ist es relativ einfach\u00a0einen Bus Scan durchzuf\u00fchren und so den I2C-Bus\u00a0nach Teilnehmern mit unbekannten Slaveadressen zu durchsuchen. Ich habe einfach eine FOR NEXT Schleife programmiert in der alle Adressen von 1 &#8211; 255 nacheinander abgefragt werden. Antwortet... mehr lesen\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/\" \/>\n<meta property=\"og:site_name\" content=\"Horter &amp; Kalb Blog\" \/>\n<meta property=\"article:published_time\" content=\"2012-05-31T06:34:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-14T17:30:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2023\/01\/i2c-usb-modem.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"800\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"JH\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Verfasst von\" \/>\n\t<meta name=\"twitter:data1\" content=\"JH\" \/>\n\t<meta name=\"twitter:label2\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\u00a0Minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/\"},\"author\":{\"name\":\"JH\",\"@id\":\"https:\/\/www.horter.de\/blog\/#\/schema\/person\/a8a4c3c5d3167dce7c7d31df6088b5d2\"},\"headline\":\"I2C Bus Scan\",\"datePublished\":\"2012-05-31T06:34:27+00:00\",\"dateModified\":\"2023-01-14T17:30:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/\"},\"wordCount\":146,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/www.horter.de\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2023\/01\/i2c-usb-modem.jpg\",\"keywords\":[\"Bus Scan\",\"I2C\"],\"articleSection\":[\"I2C-PC-Interface\",\"Programmierung\"],\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/\",\"url\":\"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/\",\"name\":\"I2C Bus Scan - Horter &amp; Kalb Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.horter.de\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2023\/01\/i2c-usb-modem.jpg\",\"datePublished\":\"2012-05-31T06:34:27+00:00\",\"dateModified\":\"2023-01-14T17:30:44+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/#primaryimage\",\"url\":\"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2023\/01\/i2c-usb-modem.jpg\",\"contentUrl\":\"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2023\/01\/i2c-usb-modem.jpg\",\"width\":800,\"height\":800,\"caption\":\"I2C-USB-Modem\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Start\",\"item\":\"https:\/\/www.horter.de\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"I2C Bus Scan\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.horter.de\/blog\/#website\",\"url\":\"https:\/\/www.horter.de\/blog\/\",\"name\":\"Horter & Kalb Blog\",\"description\":\"SPS, I2C und mehr\",\"publisher\":{\"@id\":\"https:\/\/www.horter.de\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.horter.de\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"de\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.horter.de\/blog\/#organization\",\"name\":\"Horter & Kalb Blog\",\"url\":\"https:\/\/www.horter.de\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/www.horter.de\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2026\/01\/hoka_Icon_400x400.png\",\"contentUrl\":\"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2026\/01\/hoka_Icon_400x400.png\",\"width\":400,\"height\":400,\"caption\":\"Horter & Kalb Blog\"},\"image\":{\"@id\":\"https:\/\/www.horter.de\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.horter.de\/blog\/#\/schema\/person\/a8a4c3c5d3167dce7c7d31df6088b5d2\",\"name\":\"JH\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/www.horter.de\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2015\/07\/jhfb.jpg\",\"contentUrl\":\"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2015\/07\/jhfb.jpg\",\"caption\":\"JH\"},\"url\":\"https:\/\/www.horter.de\/blog\/author\/j-horter\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"I2C Bus Scan - Horter &amp; Kalb Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/","og_locale":"de_DE","og_type":"article","og_title":"I2C Bus Scan - Horter &amp; Kalb Blog","og_description":"Mit dem I2C-Modem ist es relativ einfach\u00a0einen Bus Scan durchzuf\u00fchren und so den I2C-Bus\u00a0nach Teilnehmern mit unbekannten Slaveadressen zu durchsuchen. Ich habe einfach eine FOR NEXT Schleife programmiert in der alle Adressen von 1 &#8211; 255 nacheinander abgefragt werden. Antwortet... mehr lesen","og_url":"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/","og_site_name":"Horter &amp; Kalb Blog","article_published_time":"2012-05-31T06:34:27+00:00","article_modified_time":"2023-01-14T17:30:44+00:00","og_image":[{"width":800,"height":800,"url":"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2023\/01\/i2c-usb-modem.jpg","type":"image\/jpeg"}],"author":"JH","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"JH","Gesch\u00e4tzte Lesezeit":"1\u00a0Minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/#article","isPartOf":{"@id":"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/"},"author":{"name":"JH","@id":"https:\/\/www.horter.de\/blog\/#\/schema\/person\/a8a4c3c5d3167dce7c7d31df6088b5d2"},"headline":"I2C Bus Scan","datePublished":"2012-05-31T06:34:27+00:00","dateModified":"2023-01-14T17:30:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/"},"wordCount":146,"commentCount":1,"publisher":{"@id":"https:\/\/www.horter.de\/blog\/#organization"},"image":{"@id":"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/#primaryimage"},"thumbnailUrl":"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2023\/01\/i2c-usb-modem.jpg","keywords":["Bus Scan","I2C"],"articleSection":["I2C-PC-Interface","Programmierung"],"inLanguage":"de","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/","url":"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/","name":"I2C Bus Scan - Horter &amp; Kalb Blog","isPartOf":{"@id":"https:\/\/www.horter.de\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/#primaryimage"},"image":{"@id":"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/#primaryimage"},"thumbnailUrl":"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2023\/01\/i2c-usb-modem.jpg","datePublished":"2012-05-31T06:34:27+00:00","dateModified":"2023-01-14T17:30:44+00:00","breadcrumb":{"@id":"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/"]}]},{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/#primaryimage","url":"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2023\/01\/i2c-usb-modem.jpg","contentUrl":"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2023\/01\/i2c-usb-modem.jpg","width":800,"height":800,"caption":"I2C-USB-Modem"},{"@type":"BreadcrumbList","@id":"https:\/\/www.horter.de\/blog\/i2c-scan-mit-rs232-modem\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Start","item":"https:\/\/www.horter.de\/blog\/"},{"@type":"ListItem","position":2,"name":"I2C Bus Scan"}]},{"@type":"WebSite","@id":"https:\/\/www.horter.de\/blog\/#website","url":"https:\/\/www.horter.de\/blog\/","name":"Horter & Kalb Blog","description":"SPS, I2C und mehr","publisher":{"@id":"https:\/\/www.horter.de\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.horter.de\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"de"},{"@type":"Organization","@id":"https:\/\/www.horter.de\/blog\/#organization","name":"Horter & Kalb Blog","url":"https:\/\/www.horter.de\/blog\/","logo":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/www.horter.de\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2026\/01\/hoka_Icon_400x400.png","contentUrl":"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2026\/01\/hoka_Icon_400x400.png","width":400,"height":400,"caption":"Horter & Kalb Blog"},"image":{"@id":"https:\/\/www.horter.de\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.horter.de\/blog\/#\/schema\/person\/a8a4c3c5d3167dce7c7d31df6088b5d2","name":"JH","image":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/www.horter.de\/blog\/#\/schema\/person\/image\/","url":"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2015\/07\/jhfb.jpg","contentUrl":"https:\/\/www.horter.de\/blog\/wp-content\/uploads\/2015\/07\/jhfb.jpg","caption":"JH"},"url":"https:\/\/www.horter.de\/blog\/author\/j-horter\/"}]}},"_links":{"self":[{"href":"https:\/\/www.horter.de\/blog\/wp-json\/wp\/v2\/posts\/212","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.horter.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.horter.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.horter.de\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.horter.de\/blog\/wp-json\/wp\/v2\/comments?post=212"}],"version-history":[{"count":25,"href":"https:\/\/www.horter.de\/blog\/wp-json\/wp\/v2\/posts\/212\/revisions"}],"predecessor-version":[{"id":28276,"href":"https:\/\/www.horter.de\/blog\/wp-json\/wp\/v2\/posts\/212\/revisions\/28276"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.horter.de\/blog\/wp-json\/wp\/v2\/media\/28244"}],"wp:attachment":[{"href":"https:\/\/www.horter.de\/blog\/wp-json\/wp\/v2\/media?parent=212"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.horter.de\/blog\/wp-json\/wp\/v2\/categories?post=212"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.horter.de\/blog\/wp-json\/wp\/v2\/tags?post=212"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}