{"id":3530,"date":"2018-12-19T13:45:59","date_gmt":"2018-12-19T04:45:59","guid":{"rendered":"http:\/\/fisherman.jp\/23\/?p=3530"},"modified":"2018-12-19T20:12:33","modified_gmt":"2018-12-19T11:12:33","slug":"%e5%ae%9f%e9%a8%93-psoc4-ezi2c-i2c-slave","status":"publish","type":"post","link":"http:\/\/fisherman.jp\/23\/3530","title":{"rendered":"\u5b9f\u9a13 PSoC4 EZI2C I2C slave << Raspberry Pi Zero WH I2C master"},"content":{"rendered":"<p>\u5b9f\u9a13 PSoC4 EZI2C I2C slave &lt;&lt; Raspberry Pi Zero WH I2C master<br \/>\nI2C \u901a\u4fe1\u7dda Pull up \u3057\u3066\u3044\u306a\u3044\u3001Pi\u5074GPIO\u5185\u90e8\u3067Pull up\u3057\u3066\u3044\u308b\u304b\u3082\u3001\u8981\u8abf\u67fb<\/p>\n<p>Python code<br \/>\nread_byte_data, write_byte_data, read_i2c_block_data, write_i2c_block_data<br \/>\n\u3069\u306e\u547d\u4ee4\u3082\u554f\u984c\u306a\u304f\u4f7f\u7528\u3067\u304d\u305f<\/p>\n<p>Pi I2C Data rate 100Kbps &gt;&gt; EZI2C 1000Kbps (w\/Clock stretching) &gt;&gt; \u30a8\u30e9\u30fc\u306a\u3057<br \/>\nPi I2C Data rate 100Kbps &gt;&gt; EZI2C 400Kbps (w\/Clock stretching) &gt;&gt; \u30a8\u30e9\u30fc\u306a\u3057<br \/>\nPi I2C Data rate 100Kbps &gt;&gt; EZI2C 50Kbps (w\/Clock stretching) &gt;&gt; \u30a8\u30e9\u30fc\u306a\u3057<\/p>\n<p>Pi I2C Data rate 400Kbps &gt;&gt; EZI2C 50Kbps (w\/Clock stretching) &gt;&gt; <span style=\"color: #ff0000;\">\u30a8\u30e9\u30fc\u591a\u767a<\/span><br \/>\nPi I2C Data rate 400Kbps &gt;&gt; EZI2C 50Kbps (w<span style=\"color: #ff0000;\">o<\/span>\/Clock stretching) &gt;&gt; <span style=\"color: #ff0000;\">\u30a8\u30e9\u30fc\u591a\u767a<br \/>\n<\/span>Pi I2C Data rate 400Kbps &gt;&gt; EZI2C 100Kbps (w\/Clock stretching) &gt;&gt; <span style=\"color: #ff0000;\">\u30a8\u30e9\u30fc\u591a\u767a<\/span><br \/>\nPi I2C Data rate 400Kbps &gt;&gt; EZI2C 400Kbps (w\/Clock stretching) &gt;&gt; \u30a8\u30e9\u30fc\u306a\u3057<br \/>\nPi I2C Data rate 400Kbps &gt;&gt; EZI2C 1000Kbps (w\/Clock stretching) &gt;&gt; \u30a8\u30e9\u30fc\u306a\u3057<br \/>\n<a href=\"http:\/\/fisherman.jp\/23\/3530\/screenshot-from-2018-12-19-13-48-57\" rel=\"attachment wp-att-3535\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-thumbnail wp-image-3535\" src=\"http:\/\/fisherman.jp\/23\/wp-content\/uploads\/2018\/12\/Screenshot-from-2018-12-19-13-48-57-80x80.png\" alt=\"\" width=\"80\" height=\"80\" \/><\/a> <a href=\"http:\/\/fisherman.jp\/23\/3530\/screenshot-from-2018-12-19-14-09-34\" rel=\"attachment wp-att-3536\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-thumbnail wp-image-3536\" src=\"http:\/\/fisherman.jp\/23\/wp-content\/uploads\/2018\/12\/Screenshot-from-2018-12-19-14-09-34-80x80.png\" alt=\"\" width=\"80\" height=\"80\" \/><\/a><\/p>\n<p>1812191334 (PSoC4) SCB_I2C SCB_EZI2C with Pi \u52d5\u4f5cOK.7z<br \/>\n064_I2C_EZI2C_PSoC4.py<br \/>\nPSoC4 EZI2C SCL P30, PSoC4 EZI2C SCA P31, Pi I2C1 SCL GPIO3 Pin#5, Pi I2C1 SDA GPIO2 Pin#3<\/p>\n<p>\u4e00\u822c\u7684\u306a\u5171\u6709RAM\u306e\u554f\u984c\u30012\u30d0\u30a4\u30c8\u4ee5\u4e0a\u306e\u30c7\u30fc\u30bf\u9001\u53d7\u4fe1\u306b\u554f\u984c<\/p>\n<p>\u9001\u4fe1\u5074<br \/>\n\u8aad\u307f\u8fbc\u307f\u4e2d\u30d5\u30e9\u30b0=OFF \u3092\u78ba\u8a8d<br \/>\n\u66f8\u304d\u8fbc\u307f\u4e2d\u30d5\u30e9\u30b0=ON\u3001\u30d6\u30ed\u30c3\u30af\u30c7\u30fc\u30bf\u3092\u66f8\u304d\u8fbc\u3080\u3001\u66f8\u304d\u8fbc\u307f\u304c\u7d42\u4e86\u3057\u305f\u3089<br \/>\n\u66f8\u304d\u8fbc\u307f\u4e2d\u30d5\u30e9\u30b0=OFF<br \/>\n\u53d7\u4fe1\u5074<br \/>\n\u66f8\u304d\u8fbc\u307f\u4e2d\u30d5\u30e9\u30b0=OFF \u3092\u78ba\u8a8d<br \/>\n\u8aad\u307f\u8fbc\u307f\u4e2d\u30d5\u30e9\u30b0=ON\u3001\u30d6\u30ed\u30c3\u30af\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u307f\u3001\u7d42\u4e86\u3057\u305f\u3089<br \/>\n\u8aad\u307f\u8fbc\u307f\u4e2d\u30d5\u30e9\u30b0=OFF<br \/>\n\u540c\u6642\u304c\u3042\u308a\u5f97\u308b &gt;&gt; NG<\/p>\n<p>Pi\u304cEZI2C\u4f7f\u7528\u4e2d\uff08\u30c7\u30fc\u30bf\u8aad\u307f\u66f8\u304d\u4e2d\uff09\u3067\u306a\u3051\u308c\u3070\u3001EZI2C\u3092\u4e00\u65e6\u505c\u6b62\u3057\u3066\u304b\u3089\u5171\u6709RAM\u3078\u66f8\u304d\u8fbc\u307f\u3001I2C\u3092\u518d\u958b\u3059\u308b\u3001Pi\u306f\u518d\u5b9f\u884c\u51e6\u7406\u5fc5\u9808<br \/>\nPi\u304c\u30c7\u30fc\u30bf\u66f8\u304d\u8fbc\u3080\u5834\u5408\u306f\u3001\u66f8\u304d\u8fbc\u307f\u4e2d\u30d5\u30e9\u30b0=ON\u3001\u5f85\u3061\u6642\u9593\uff08PSoC\u5171\u6709RAM\u8aad\u307f\u8fbc\u307f\u306b\u8981\u3059\u308b\u6642\u9593\u30011ms\u7a0b\u5ea6\uff1f\uff09\u3001\u30d6\u30ed\u30c3\u30af\u30c7\u30fc\u30bf\u3092\u66f8\u304d\u8fbc\u3080\u3001\u66f8\u304d\u8fbc\u307f\u304c\u7d42\u4e86\u3057\u305f\u3089\u3001\u66f8\u304d\u8fbc\u307f\u4e2d\u30d5\u30e9\u30b0=OFF<br \/>\n\u5b9f\u9a13\u7d50\u679c\uff1a \u7d20\u3067\u306f\u30a8\u30e9\u30fc\u767a\u751f\u3092\u9632\u6b62\u3067\u304d\u305a &gt;&gt; I2C+\u30b3\u30de\u30f3\u30c9\u51e6\u7406\u7cfb<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b9f\u9a13 PSoC4 EZI2C I2C slave &lt;&lt; Raspberry Pi Zero WH I2C master I2C \u901a\u4fe1\u7dda Pull up \u3057\u3066\u3044\u306a\u3044\u3001Pi\u5074GPIO\u5185\u90e8\u3067Pull up\u3057\u3066\u3044\u308b\u304b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36,32],"tags":[],"class_list":["post-3530","post","type-post","status-publish","format-standard","hentry","category-psoc","category-raspberry-pi"],"_links":{"self":[{"href":"http:\/\/fisherman.jp\/23\/wp-json\/wp\/v2\/posts\/3530","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/fisherman.jp\/23\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/fisherman.jp\/23\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/fisherman.jp\/23\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/fisherman.jp\/23\/wp-json\/wp\/v2\/comments?post=3530"}],"version-history":[{"count":17,"href":"http:\/\/fisherman.jp\/23\/wp-json\/wp\/v2\/posts\/3530\/revisions"}],"predecessor-version":[{"id":3549,"href":"http:\/\/fisherman.jp\/23\/wp-json\/wp\/v2\/posts\/3530\/revisions\/3549"}],"wp:attachment":[{"href":"http:\/\/fisherman.jp\/23\/wp-json\/wp\/v2\/media?parent=3530"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/fisherman.jp\/23\/wp-json\/wp\/v2\/categories?post=3530"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/fisherman.jp\/23\/wp-json\/wp\/v2\/tags?post=3530"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}