{"id":2160,"date":"2012-12-14T20:33:38","date_gmt":"2012-12-14T11:33:38","guid":{"rendered":"http:\/\/mkusunoki.net\/?p=2160"},"modified":"2013-12-06T21:59:33","modified_gmt":"2013-12-06T12:59:33","slug":"si4735-%e3%83%a9%e3%82%b8%e3%82%aa%e3%83%a2%e3%82%b8%e3%83%a5%e3%83%bc%e3%83%ab%e3%81%ae%e6%9b%b4%e6%96%b0%e3%82%92%e8%a1%8c%e3%81%aa%e3%81%84%e3%81%be%e3%81%97%e3%81%9f%e3%80%82","status":"publish","type":"post","link":"https:\/\/mkusunoki.net\/?p=2160","title":{"rendered":"Si4735 \u30e9\u30b8\u30aa\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u66f4\u65b0\u3092\u884c\u306a\u3044\u307e\u3057\u305f\u3002"},"content":{"rendered":"<p>\n\u4e00\u9023\u306e Si4735 \u30e9\u30b8\u30aa\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u88fd\u4f5c\u30c1\u30e3\u30ec\u30f3\u30b8\u3055\u308c\u305f\u65b9\u304b\u3089\u8cea\u554f\u3092\u3044\u305f\u3060\u304d\u307e\u3057\u305f\u3002(<a href=\"http:\/\/mkusunoki.net\/?p=2135\">Si4735 \u30e9\u30b8\u30aa\u30e2\u30b8\u30e5\u30fc\u30eb\u9032\u6357\u3068\u3006\u306e\u30b3\u30e1\u30f3\u30c8\u306b\u3066<\/a>) \u5185\u5bb9\u306f\u3001\u5c40\u306e\u9078\u629e\u5f8c\u306b\u4fe1\u53f7\u5f37\u5ea6\u306eS\u304c\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u66f4\u65b0\u3055\u308c\u306a\u3044\u3051\u3069\u5bfe\u5fdc\u306f\u3042\u308b\u304b\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002\u4eca\u56de\u305d\u306e\u5bfe\u5fdc\u5206\u306e\u30bd\u30fc\u30b9\u306e zip \u3092\u4e0b\u306e\u30ea\u30f3\u30af\u306b\u8cbc\u3063\u3066\u304a\u304d\u307e\u3059\u3002\u307e\u305f\u3001\u4ee5\u4e0b\u306f\u5dee\u5206\u60c5\u5831\u306b\u306a\u308a\u307e\u3059\u3002\n<\/p>\n<p><a href=\"http:\/\/mkusunoki.net\/?page_id=2276\">\u6700\u65b0\u306e\u30bd\u30fc\u30b9\u306f Si4735 \u30e9\u30b8\u30aa\u30e2\u30b8\u30e5\u30fc\u30eb\u306e Blog \u8a18\u4e8b\u4e00\u89a7<\/a> \u304b\u3089\u53d6\u3063\u3066\u4e0b\u3055\u3044\u3002 <\/p>\n<p>$ diff -p Si4735Radio_Ver0.01\/ Si4735Radio_Ver0.02<br \/>\ndiff -p Si4735Radio_Ver0.01\/Si4735.cpp Si4735Radio_Ver0.02\/Si4735.cpp<br \/>\n*** Si4735Radio_Ver0.01\/Si4735.cpp      2012-12-15 09:31:55.671118400 +0900<br \/>\n&#8212; Si4735Radio_Ver0.02\/Si4735.cpp      2012-12-15 09:32:02.617515700 +0900<br \/>\n*************** void Radio::updateFMTuneStatus() {<br \/>\n*** 163,168 ****<br \/>\n&#8212; 163,189 &#8212;-<br \/>\n        }<br \/>\n  }<\/p>\n<p>+ void Radio::updateFMRsqStatus() {<br \/>\n+       int i;<br \/>\n+<br \/>\n+       i2c.beginTransmission(SI4735ADR);<br \/>\n+       i2c.write(0x23);<br \/>\n+       i2c.write(0x20);<br \/>\n+       i2c.endTransmission();<br \/>\n+       _delay_ms(2);<br \/>\n+<br \/>\n+       i2c.requestFrom(SI4735ADR, 6);<br \/>\n+       for(int i = 0; i < 6; i++) {\n+               switch(i) {\n+                       case 4:\n+                       FMrssi = i2c.read();\n+                       break;\n+                       default:\n+                       i2c.read();\n+               }\n+       }\n+ }\n+\n\n  void Radio::updateAMTuneStatus() {\n        int i;\n*************** void Radio::updateAMTuneStatus() {\n*** 191,196 ****\n--- 212,237 ----\n        }\n  }\n\n+ void Radio::updateAMRsqStatus() {\n+       int i;\n+\n+       i2c.beginTransmission(SI4735ADR);\n+       i2c.write(0x43);\n+       i2c.write(0x00);\n+       i2c.endTransmission();\n+       _delay_ms(2);\n+\n+       i2c.requestFrom(SI4735ADR, 6);\n+       for(int i = 0; i < 6; i++) {\n+               switch(i) {\n+                       case 4:\n+                       AMrssi = i2c.read();\n+                       break;\n+                       default:\n+                       i2c.read();\n+               }\n+       }\n+ }\n  int Radio::getFMFreq() {\n\n        return(FMfreq);\ndiff -p Si4735Radio_Ver0.01\/Si4735.h Si4735Radio_Ver0.02\/Si4735.h\n*** Si4735Radio_Ver0.01\/Si4735.h        2012-12-15 09:31:55.795125500 +0900\n--- Si4735Radio_Ver0.02\/Si4735.h        2012-12-15 09:32:02.628516300 +0900\n*************** class Radio {\n*** 41,46 ****\n--- 41,48 ----\n        void seekDownAMFreq();\n        void updateFMTuneStatus();\n        void updateAMTuneStatus();\n+       void updateFMRsqStatus();\n+       void updateAMRsqStatus();\n        int getFMFreq();\n        int getAMFreq();\n        int getFMRssi();\ndiff -p Si4735Radio_Ver0.01\/Si4735Radio.cpp Si4735Radio_Ver0.02\/Si4735Radio.cpp\n*** Si4735Radio_Ver0.01\/Si4735Radio.cpp 2012-12-15 09:31:55.816126700 +0900\n--- Si4735Radio_Ver0.02\/Si4735Radio.cpp 2012-12-15 09:32:02.638516900 +0900\n*************** void loop() {\n*** 146,151 ****\n--- 146,152 ----\n        switch(mode) {\n                case FM:\n                radio.updateFMTuneStatus();\n+               radio.updateFMRsqStatus();\n                ffreq = radio.getFMFreq();\n                int tmp01, tmp02;\n                tmp01 = radio.getFMFreq() \/ 100;\n*************** void loop() {\n*** 154,159 ****\n--- 155,161 ----\n                break;\n                case AM:\n                radio.updateAMTuneStatus();\n+               radio.updateAMRsqStatus();\n                afreq = radio.getAMFreq();\n                sprintf(msg, \"AM %4dkHz S:%i\", radio.getAMFreq(), radio.getAMRssi());\n                break;\n\n$\n[\/code]\n\n\n\n<p>\n\u3042\u3068\u3001Atmel Studio6 \u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u8a2d\u5b9a\u3067\u3001\u4ee5\u4e0b\u30cf\u30fc\u30c9\u30b3\u30d4\u30fc\u306e\u3088\u3046\u306b delay \u30de\u30af\u30ed\u7528\u306e\u5468\u6ce2\u6570\u5b9a\u7fa9\u3092\u5165\u308c\u3066\u304a\u304f\u3068\u826f\u3044\u3067\u3059\u3002\n<\/p>\n<p><a href=\"http:\/\/mkusunoki.net\/?attachment_id=2165\" rel=\"attachment wp-att-2165\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/mkusunoki.net\/wp\/wp-content\/uploads\/2012\/12\/201212141958.png\" alt=\"201212141958\" width=\"1203\" height=\"960\" class=\"alignnone size-full wp-image-2165\" srcset=\"https:\/\/mkusunoki.net\/wp\/wp-content\/uploads\/2012\/12\/201212141958.png 1203w, https:\/\/mkusunoki.net\/wp\/wp-content\/uploads\/2012\/12\/201212141958-320x255.png 320w, https:\/\/mkusunoki.net\/wp\/wp-content\/uploads\/2012\/12\/201212141958-1024x817.png 1024w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u9023\u306e Si4735 \u30e9\u30b8\u30aa\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u88fd\u4f5c\u30c1\u30e3\u30ec\u30f3\u30b8\u3055\u308c\u305f\u65b9\u304b\u3089\u8cea\u554f\u3092\u3044\u305f\u3060\u304d\u307e\u3057\u305f\u3002(Si4735 \u30e9\u30b8\u30aa\u30e2\u30b8\u30e5\u30fc\u30eb\u9032\u6357\u3068\u3006\u306e\u30b3\u30e1\u30f3\u30c8\u306b\u3066) \u5185\u5bb9\u306f\u3001\u5c40\u306e\u9078\u629e\u5f8c\u306b\u4fe1\u53f7\u5f37\u5ea6\u306eS\u304c\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u66f4\u65b0\u3055\u308c\u306a\u3044\u3051\u3069 &hellip; <a href=\"https:\/\/mkusunoki.net\/?p=2160\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Si4735 \u30e9\u30b8\u30aa\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u66f4\u65b0\u3092\u884c\u306a\u3044\u307e\u3057\u305f\u3002&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[7],"tags":[14,155,152,153],"class_list":["post-2160","post","type-post","status-publish","format-standard","hentry","category-kousaku","tag-avr","tag-i2c","tag-si4735","tag-153"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/mkusunoki.net\/index.php?rest_route=\/wp\/v2\/posts\/2160","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mkusunoki.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mkusunoki.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mkusunoki.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mkusunoki.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2160"}],"version-history":[{"count":0,"href":"https:\/\/mkusunoki.net\/index.php?rest_route=\/wp\/v2\/posts\/2160\/revisions"}],"wp:attachment":[{"href":"https:\/\/mkusunoki.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mkusunoki.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mkusunoki.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}