{"id":161,"date":"2013-09-17T18:58:30","date_gmt":"2013-09-17T09:58:30","guid":{"rendered":"http:\/\/nerokaji.com\/guri\/?p=161"},"modified":"2013-09-17T18:58:30","modified_gmt":"2013-09-17T09:58:30","slug":"pic%e5%85%a5%e9%96%80","status":"publish","type":"post","link":"https:\/\/wpy101.wadax-sv.jp\/nerokaji.com\/guri\/?p=161","title":{"rendered":"pic\u5165\u9580"},"content":{"rendered":"<p>\u6700\u8fd1\u306f\u3058\u3081\u305fPIC\u306e\u4f7f\u3044\u65b9\u3092\u30d3\u30c7\u30aa\u306b\u3057\u3066\u307f\u307e\u3057\u305f\u3002<br \/>\n\u52d5\u753b\u306e\u30ad\u30e3\u30d7\u30c1\u30e3\u306e\u8a2d\u5b9a\u304c\u308f\u308b\u304b\u3063\u305f\u306e\u3067\u89e3\u50cf\u5ea6\u6700\u60aa\u3067\u3059\u3002<\/p>\n<p>\u30d3\u30c7\u30aa\u306fLED\u306e\u70b9\u6ec5\u56de\u8def<br \/>\n\u958b\u767a\u74b0\u5883\uff1aMPLAB\u3000IDE<br \/>\nC :\u3000HI-TECH C Compiler for PIC10-12-16 MCUs V9.83<br \/>\npic\u66f8\u304d\u8fbc\u307f\u30bd\u30d5\u30c8\u3000\uff1arpp-tlc-vif\uff08RaspberryPi\u7528\uff09<\/p>\n<p>http:\/\/youtu.be\/LI-UNC7Z97Y<\/p>\n<p>PIC\u30de\u30a4\u30b3\u30f3\u306f\u8d85\u5c0f\u578b\u306e\u30de\u30a4\u30b3\u30f3\u3001\u30de\u30a4\u30af\u30ed\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3067\u3001USA\u306e\u30de\u30a4\u30af\u30ed\u30c1\u30c3\u30d7\u30c6\u30af\u30ce\u30ed\u30b8\u30fc\u793e\u88fd\u3067\u3059\u3002 Peripheral Interface Controller\u306e\u7565\u79f0\u3067\u30d4\u30c3\u30af\u3068\u547c\u3073\u307e\u3059\u3002 \u30de\u30a4\u30b3\u30f3\u3068\u8a00\u3048\u3070\u7aef\u5b50\u306f\u30d0\u30b9\u3067\u3057\u305f\u304c\u3001\u3053\u306e\u5c0f\u3055\u306a\u30de\u30a4\u30b3\u30f3\u306e\u5468\u308a\u306f\u5168\u3066I\/O\u30dd\u30fc\u30c8\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002 \u5c0f\u578b\u306e\u7279\u5fb4\u3092\u751f\u304b\u3057\u3001\u5c0f\u578b\u306e\u96fb\u5b50\u6a5f\u5668\u3078\u306e\u7d44\u8fbc\u30fb\u5fdc\u7528\u3084\u3001PLD\u306e\u7f6e\u304d\u63db\u3048\u3001\u30de\u30b9\u30bfCPU\u306e\u88dc\u52a9\u51e6\u7406\u3084\u624b\u8db3\u3068\u306a\u308b\u5468\u8fba\u56de\u8def\u306a\u3069\u306b\u5229\u7528\u3067\u304d\u308b\u4fbf\u5229\u306a\u30de\u30a4\u30b3\u30f3\u3067\u3059\u3002<\/p>\n<p>\u3010C\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3011<\/p>\n<p>#include <pic.h>\n#include <htc.h><\/p>\n<p>__CONFIG(CLKOUTEN_OFF &#038; FOSC_INTOSC &#038; FCMEN_OFF &#038; IESO_OFF &#038; BOREN_ON &#038;<br \/>\n         PWRTE_ON &#038; WDTE_OFF &#038; MCLRE_OFF &#038; CP_OFF &#038; CPD_OFF) ;<\/p>\n<p>__CONFIG(PLLEN_OFF &#038; STVREN_ON &#038; WRT_OFF &#038; LVP_OFF);<\/p>\n<p>#define FOSC 8000000L<br \/>\n#define\tdelay_us(x) { unsigned char us;<br \/>\n\t\t      us = (x)\/(8000000\/FOSC)|1;<br \/>\n\t\t      while(&#8211;us != 0) continue; }<\/p>\n<p>void delay_ms(unsigned int ms)<br \/>\n{<br \/>\n  unsigned char i;<br \/>\n  do {<br \/>\n    i = 4;<br \/>\n    do {<br \/>\n      delay_us(164);<br \/>\n    } while(&#8211;i);<br \/>\n  } while(&#8211;ms);<br \/>\n}<\/p>\n<p>void main(void)<br \/>\n{<br \/>\n  \/\/OSCCON = 0x70;         \/* Select 8 Mhz internal clock *\/<br \/>\n  OSCCON = 0b01110010;    \/\/ set internal osc to 8MHz<br \/>\n  TRISA = 0x00;\t       \/* Set All on PORTC as Output *\/<\/p>\n<p>  for(;;) {<br \/>\n    PORTA = 0x05;      \/* Turn On Port RA2 *\/<br \/>\n    NOP();<br \/>\n    delay_ms(500);     \/* Delay 200 ms *\/<br \/>\n    PORTA = 0x00;      \/* Turn Off Port RA2 *\/<br \/>\n\tNOP();<br \/>\n\tdelay_ms(500);     \/* Delay 200 ms *\/<br \/>\n  }<br \/>\n}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u306f\u3058\u3081\u305fPIC\u306e\u4f7f\u3044\u65b9\u3092\u30d3\u30c7\u30aa\u306b\u3057\u3066\u307f\u307e\u3057\u305f\u3002 \u52d5\u753b\u306e\u30ad\u30e3\u30d7\u30c1\u30e3\u306e\u8a2d\u5b9a\u304c\u308f\u308b\u304b\u3063\u305f\u306e\u3067\u89e3\u50cf\u5ea6\u6700\u60aa\u3067\u3059\u3002 \u30d3\u30c7\u30aa\u306fLED\u306e\u70b9\u6ec5\u56de\u8def \u958b\u767a\u74b0\u5883\uff1aMPLAB\u3000IDE C :\u3000HI-TECH C Compiler for P [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-161","post","type-post","status-publish","format-standard","hentry","category-1"],"_links":{"self":[{"href":"https:\/\/wpy101.wadax-sv.jp\/nerokaji.com\/guri\/index.php?rest_route=\/wp\/v2\/posts\/161","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpy101.wadax-sv.jp\/nerokaji.com\/guri\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpy101.wadax-sv.jp\/nerokaji.com\/guri\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpy101.wadax-sv.jp\/nerokaji.com\/guri\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wpy101.wadax-sv.jp\/nerokaji.com\/guri\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=161"}],"version-history":[{"count":0,"href":"https:\/\/wpy101.wadax-sv.jp\/nerokaji.com\/guri\/index.php?rest_route=\/wp\/v2\/posts\/161\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpy101.wadax-sv.jp\/nerokaji.com\/guri\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpy101.wadax-sv.jp\/nerokaji.com\/guri\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpy101.wadax-sv.jp\/nerokaji.com\/guri\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}