{"id":6103,"date":"2015-05-30T17:43:31","date_gmt":"2015-05-30T08:43:31","guid":{"rendered":"http:\/\/mkusunoki.net\/?p=6103"},"modified":"2015-05-30T17:43:31","modified_gmt":"2015-05-30T08:43:31","slug":"%e4%b9%85%e3%81%97%e3%81%b6%e3%82%8a%e3%81%ab-psoc-%e3%81%ae%e3%81%8a%e5%8b%89%e5%bc%b7","status":"publish","type":"post","link":"https:\/\/mkusunoki.net\/?p=6103","title":{"rendered":"\u4e45\u3057\u3076\u308a\u306b PSoC \u306e\u304a\u52c9\u5f37"},"content":{"rendered":"<p><a href=\"http:\/\/mkusunoki.net\/?attachment_id=6104\" rel=\"attachment wp-att-6104\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/mkusunoki.net\/wp\/wp-content\/uploads\/2015\/05\/2015-05-30-17.17.04.jpg\" alt=\"2015-05-30 17.17.04\" width=\"1280\" height=\"960\" class=\"alignnone size-full wp-image-6104\" srcset=\"https:\/\/mkusunoki.net\/wp\/wp-content\/uploads\/2015\/05\/2015-05-30-17.17.04.jpg 1280w, https:\/\/mkusunoki.net\/wp\/wp-content\/uploads\/2015\/05\/2015-05-30-17.17.04-320x240.jpg 320w, https:\/\/mkusunoki.net\/wp\/wp-content\/uploads\/2015\/05\/2015-05-30-17.17.04-1024x768.jpg 1024w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<p>\n\u984c\u540d\u306e\u3068\u304a\u308a\u3001PSoC \u3092\u51fa\u3057\u3066\u304d\u3066\u304a\u52c9\u5f37\u3067\u3059\u3002\u6db2\u6676\u306b\u6587\u5b57\u3092\u51fa\u3059\u7df4\u7fd2\u3067\u3059\u3002\u4f7f\u3063\u3066\u3044\u308b\u30dc\u30fc\u30c9\u306f PSoC4 PIONEER KIT \u3068\u3044\u3046 FLASH \u304c 32K \u306e<br \/>\n\u5c0f\u898f\u6a21\u30de\u30a4\u30b3\u30f3\u3067\u3059\u3002\u4eca\u306f <a href=\"http:\/\/www.cypress.com\/?rID=111413&#038;cache=0&#038;source=creatorStartPage\">PSoC 4 M-Series Pioneer Kit<\/a> \u3068\u3044\u3046 flash \u304c 128k \u306e\u3082\u51fa\u3066\u3044\u308b\u306e\u3067\u6a5f\u4f1a\u304c\u3042\u308c\u3070\u8cfc\u5165\u3057\u3066\u304a\u304d\u305f\u3044\u3068\u3053\u308d\u3067\u3059\u3002\u3053\u3063\u3061\u306e\u307b\u3046\u306e\u30ad\u30c3\u30c8\u306f capsence pad \u304c\u5186\u5f62\u306a\u306e\u304c\u3044\u3044\u3067\u3059\u3002\n<\/p>\n<p>\n\u4eca\u65e5\u306f\u3001\u4e45\u3057\u3076\u308a\u306b PSoC \u306e\u30d7\u30e9\u30df\u30f3\u30b0\u306e\u4ed5\u65b9\u3092\u601d\u3044\u51fa\u3059\u305f\u3081\u306e\u52c9\u5f37\u30bf\u30a4\u30e0\u3002\u307e\u305a\u4ee5\u4e0b2\u3064\u3092\u30af\u30ea\u30a2\u3059\u308b\u3079\u304f\u4f5c\u696d\u958b\u59cb\n<\/p>\n<ul>\n<li>\u79cb\u6708 I2C \u6db2\u6676\u306b\u6587\u5b57\u3092\u51fa\u3059\n<li>USB-UART \u30d6\u30ea\u30c3\u30b8\u306e\u52d5\u4f5c\u78ba\u8a8d\n<\/ul>\n<p><a href=\"http:\/\/mkusunoki.net\/?attachment_id=6105\" rel=\"attachment wp-att-6105\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/mkusunoki.net\/wp\/wp-content\/uploads\/2015\/05\/db96d87eff7845d1e6dffe855cdf0a55.png\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2015-05-30 17.34.30\" width=\"1442\" height=\"1116\" class=\"alignnone size-full wp-image-6105\" srcset=\"https:\/\/mkusunoki.net\/wp\/wp-content\/uploads\/2015\/05\/db96d87eff7845d1e6dffe855cdf0a55.png 1442w, https:\/\/mkusunoki.net\/wp\/wp-content\/uploads\/2015\/05\/db96d87eff7845d1e6dffe855cdf0a55-320x248.png 320w, https:\/\/mkusunoki.net\/wp\/wp-content\/uploads\/2015\/05\/db96d87eff7845d1e6dffe855cdf0a55-1024x792.png 1024w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<p>\n\u90e8\u54c1\u3092\u8cbc\u3063\u3066\n<\/p>\n<p><a href=\"http:\/\/mkusunoki.net\/?attachment_id=6106\" rel=\"attachment wp-att-6106\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/mkusunoki.net\/wp\/wp-content\/uploads\/2015\/05\/7fc77156833c1a1e192df38c79fb0656.png\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2015-05-30 17.34.37\" width=\"1442\" height=\"1116\" class=\"alignnone size-full wp-image-6106\" srcset=\"https:\/\/mkusunoki.net\/wp\/wp-content\/uploads\/2015\/05\/7fc77156833c1a1e192df38c79fb0656.png 1442w, https:\/\/mkusunoki.net\/wp\/wp-content\/uploads\/2015\/05\/7fc77156833c1a1e192df38c79fb0656-320x248.png 320w, https:\/\/mkusunoki.net\/wp\/wp-content\/uploads\/2015\/05\/7fc77156833c1a1e192df38c79fb0656-1024x792.png 1024w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<p>\n\u90e8\u54c1\u304c\u4f7f\u3046\u30d4\u30f3\u3092\u3069\u306e\u30dd\u30fc\u30c8\u306b\u51fa\u3059\u304b\u30a2\u30b5\u30a4\u30f3\u3002\u30b3\u30fc\u30c9\u306f\u3060\u308b\u304b\u3063\u305f\u306e\u3067 main.c \u306b\u30d9\u30bf\u66f8\u304d\u3002\u6db2\u6676\u3078\u306e\u6587\u5b57\u51fa\u529b\u3068 PC \u306e TeraTerm \u306b\u6587\u5b57\u304c\u51fa\u308b\u3053\u3068\u306f\u78ba\u8a8d\u51fa\u6765\u307e\u3057\u305f\u3002\u6db2\u6676\u306e\u521d\u671f\u5316\u306f <a href=\"http:\/\/akizukidenshi.com\/catalog\/g\/gK-08896\/\">\uff29\uff12\uff23\u63a5\u7d9a\u5c0f\u578b\u30ad\u30e3\u30e9\u30af\u30bf\uff2c\uff23\uff24\u30e2\u30b8\u30e5\u30fc\u30eb\uff08\uff13\uff0e\uff13\uff36\uff0f\uff15\uff36\uff09\u30d4\u30c3\u30c1\u5909\u63db\u30ad\u30c3\u30c8<\/a> \u7528\u3067\u3059\u3002\n<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\n\/* ========================================\r\n *\r\n * Copyright YOUR COMPANY, THE YEAR\r\n * All Rights Reserved\r\n * UNPUBLISHED, LICENSED SOFTWARE.\r\n *\r\n * CONFIDENTIAL AND PROPRIETARY INFORMATION\r\n * WHICH IS THE PROPERTY OF your company.\r\n *\r\n * ========================================\r\n*\/\r\n#include &lt;project.h&gt;\r\nvoid i2cLcdSendCommand(unsigned char);\r\nvoid i2cLcdSendData(unsigned char);\r\nvoid i2cLcdSendStr(char *);\r\n\r\nint main()\r\n{\r\n    CyGlobalIntEnable; \/* Enable global interrupts. *\/\r\n\r\n    \/* Place your initialization\/startup code here (e.g. MyInst_Start()) *\/\r\n    I2C_Start();\r\n    CyDelay(100);\r\n    i2cLcdSendCommand(0x38);\r\n    RLED_Write(1);\r\n    CyDelay(20);\r\n    i2cLcdSendCommand(0x39);\r\n    CyDelay(20);\r\n    i2cLcdSendCommand(0x14);\r\n    CyDelay(20);\r\n    i2cLcdSendCommand(0x73);\r\n    CyDelay(20);\r\n    i2cLcdSendCommand(0x56);\r\n    CyDelay(20);\r\n    i2cLcdSendCommand(0x6c);\r\n    CyDelay(20);\r\n    i2cLcdSendCommand(0x38);\r\n    CyDelay(20);\r\n    i2cLcdSendCommand(0x01);\r\n    CyDelay(20);\r\n    i2cLcdSendCommand(0x0c);\r\n    CyDelay(20);\r\n    i2cLcdSendStr(&quot;Hello World&quot;);\r\n    \r\n    \r\n    UART_Start();\r\n    UART_UartPutString(&quot;Terminal out\\n\\r&quot;);    \r\n\r\n    \r\n    for(;;)\r\n    {\r\n        \/* Place your application code here. *\/\r\n        BLED_Write(1);\r\n        CyDelay(1000);\r\n        BLED_Write(0);\r\n        CyDelay(1000);\r\n    }\r\n}\r\n\r\n\r\nvoid i2cLcdSendCommand(unsigned char command) {\r\n    \r\n    unsigned char buf&#x5B;2];\r\n    buf&#x5B;0] = 0x00;\r\n    buf&#x5B;1] = command;\r\n    I2C_I2CMasterClearStatus();\r\n    I2C_I2CMasterWriteBuf(0x3E, &amp;buf&#x5B;0], 2, I2C_I2C_MODE_COMPLETE_XFER);\r\n    while(I2C_I2CMasterStatus() != I2C_I2C_MSTAT_WR_CMPLT) {\r\n        ;\r\n    }\r\n    \/\/CyDelay(1);\r\n}\r\n\r\nvoid i2cLcdSendData(unsigned char ch) {\r\n    \r\n    unsigned char buf&#x5B;2];\r\n    buf&#x5B;0] = 0x40;\r\n    buf&#x5B;1] = ch;\r\n    I2C_I2CMasterClearStatus();\r\n    I2C_I2CMasterWriteBuf(0x3E, &amp;buf&#x5B;0], 2, I2C_I2C_MODE_COMPLETE_XFER);\r\n    while(I2C_I2CMasterStatus() != I2C_I2C_MSTAT_WR_CMPLT) {\r\n        ;\r\n    }\r\n    \/\/CyDelay(1);\r\n    ;\r\n}\r\n\r\nvoid i2cLcdSendStr(char *str) {\r\n\r\n    while(*str) {\r\n        i2cLcdSendData(*str++);\r\n    }\r\n}\r\n\/* &#x5B;] END OF FILE *\/\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u984c\u540d\u306e\u3068\u304a\u308a\u3001PSoC \u3092\u51fa\u3057\u3066\u304d\u3066\u304a\u52c9\u5f37\u3067\u3059\u3002\u6db2\u6676\u306b\u6587\u5b57\u3092\u51fa\u3059\u7df4\u7fd2\u3067\u3059\u3002\u4f7f\u3063\u3066\u3044\u308b\u30dc\u30fc\u30c9\u306f PSoC4 PIONEER KIT \u3068\u3044\u3046 FLASH \u304c 32K \u306e \u5c0f\u898f\u6a21\u30de\u30a4\u30b3\u30f3\u3067\u3059\u3002\u4eca\u306f PSoC 4 M-Serie &hellip; <a href=\"https:\/\/mkusunoki.net\/?p=6103\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u4e45\u3057\u3076\u308a\u306b PSoC \u306e\u304a\u52c9\u5f37&#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":[322],"class_list":["post-6103","post","type-post","status-publish","format-standard","hentry","category-kousaku","tag-psoc4"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/mkusunoki.net\/index.php?rest_route=\/wp\/v2\/posts\/6103","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=6103"}],"version-history":[{"count":2,"href":"https:\/\/mkusunoki.net\/index.php?rest_route=\/wp\/v2\/posts\/6103\/revisions"}],"predecessor-version":[{"id":6108,"href":"https:\/\/mkusunoki.net\/index.php?rest_route=\/wp\/v2\/posts\/6103\/revisions\/6108"}],"wp:attachment":[{"href":"https:\/\/mkusunoki.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mkusunoki.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mkusunoki.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}