STMicroelectronicsã®ç¹æ®ãªãã€ã¯ãåè·¯ã®ãŠãŒã¶ãŒã€ã³ã¿ãŒãã§ã€ã¹ã®åŠ¥åœæ§ãè©äŸ¡ãããšããããããäžè¬ã«æ©èœãããšããäºå®ã«æã
é©ããããŸãã ãããããããã¯åãããã«æ©èœããŸãã ãããŠã圌ãã¯ãã åãã ãã§ãªããããããã®ããããšéåžžã«äœãäŸ¡æ Œãæã£ãŠããŸãã ãã®çµæãããªãã¯äœåºŠãäœåºŠãããããéžæããå¿
èŠããããŸã...ç¿æ¥ã¯
ããçããããããžã§ã¯ããããäžåºŠä¿åãããšãã§ããã ãã·ã³ãã«ã§æ¥œãããã®ã«ãªãããšãçŽæãã
ãŸãã ã èšç»ã«ãããšã倿¹ãŸã§ã«å¿
èŠã ã£ãã®ã¯ãçµ±åãããæž©åºŠãšæ¹¿åºŠã®è€åã»ã³ãµãŒã埩掻ãããããšã ãã§ããã ããŒãäžã®å°ããªãµã€ãºãè¶³ã®æ°ãå°ãªãããšãããã³ãã¹ãã©ãããã®åå¥ã®ã³ã³ããŒãã³ãã®æ¬ åŠã«ãããææ°ã®éçºã«å¯ŸåŠããããšãæåŸ
ããããšãã§ããŸããã 圌ãã¯ãã以äžã®è³ªåãªãã«å®æããçµæãåºããŸãã å€ãã®å Žåãæž¬å®ãè¡ãã ãã§ãªããéåžžã«è€éãªä¿¡å·åŠçãå®è¡ããããŒã¿ãä¿åããããã®å
éšãããã¡ãŒ
ããŠã§ã€ã¯äžã«ãã€ã¯ãã³ã³ãããŒã©ãŒããŠã§ã€ã¯ããããã®å²ã蟌ã¿åºå
ãããã³ãã®ä»ã®å€ãã®å¿«é©ãªããããåããŠããŸãã ããã«ãããã³ãŒããæžãäœæ¥ã倧å¹
ã«å®¹æã«ãªããå¶åŸ¡ãã€ã¯ãã³ã³ãããŒã©ãŒã®ãªãœãŒã¹èŠä»¶ã軜æžãããŸã...ããããšã®éä¿¡ã¯ç°¡åã§å¿«é©ã§ãã 確ãã«ãæã«ã¯å€ãã®èšå®ããããå¿
èŠããããŸãã ãããã仿¥ãããã¯ç§ãè
ãããŸããã§ããããªããªãç§ã®åã«ã¯æž©åºŠæž¬å®æ©èœãåããåãªãå®¹éæ§æ¹¿åºŠèšãããããã§ãã
ãã€ã³ã¿ãŒãã§ã€ã¹ããã蟌ãã®ã«æ°æéãã¬ãžã¹ã¿ã®èšå®ã«ããã«æ°æéã忥å
ãŸã§ã¯ç¡æã§ãããšæããŸããã ããŒããã¥ãŒã§ã¯ãªããå°ãªããšãæ§ãããªãã¯ããã¯ã®ããã«ã森ã§å€é£ãéããããšãå¯èœã«ãªããŸãã
æŒ ç¶ãšããäžå®æã§ç§ã«ã€ã³ã¹ãã¬ãŒã·ã§ã³ãäžããã®ã¯ãè£œé æ¥è
ã§ããSTMicroelectronicsã ãã§ããã ãããã黿°ã¡ãŒã¿ãŒãPLCã¢ãã ãé«åºŠãªæ
£æ§ã»ã³ãµãŒã®ããã«ãã¿ã³ããªã³ãšäžç·ã«åè·¯ã®åšãã§èžãèšæ¶ãèã«çœ®ããŠ...ä»äºãå§ããŸããã
ç¥ãåããäœã
ããŒã¿ã·ãŒããšåè·¯ãç°¡åã«ç¥ã£ãã®ã§ãä»åã¯åè·¯æè¡è
ããã¬ãŒãµãŒãããã¡ããã¡ããã§ã¯ãããŸããã§ããïŒãã¡ãããã±ãŒã¹ã®é£ã®ããããã³ã°ã³ã³ãã³ãµã¯çœ®ã䟡å€ããããé»åã¯å°ãç°ãªããŸãããããã¯æž¬å®ã®ç²ŸåºŠã«åœ±é¿ããæ§èœã«ã¯åœ±é¿ããŸããïŒã I2Cãä»ãããã€ã¯ãã³ã³ãããŒã©ãŒãšã»ã³ãµãŒéã®äº€æã€ã³ã¿ãŒãã§ãŒã¹ã¯ãæšæºã®ãã®ãšçãããé¡äŒŒããŠããŸããã
æšæºã®I2Cã«ã€ããŠã¯è©³ãã説æããŸããããããŒã¿ã·ãŒãããåºæ¬çšèªã®ã¿ãè§£èªããŸãããããã¯å°ãåŸã§å¿
èŠã«ãªããŸãã
æ¡ä»¶ã«åæããŸãããã çžäºçè§£ã®ããã«
ST-éå§æ¡ä»¶ã
SR-éå§æ¡ä»¶ãåã€ã³ã¹ããŒã«ããæäœ;ã¬ãžã¹ã¿ããã®èªã¿åãã®ç«¶åã解決ããã®ã«åœ¹ç«ã¡ãŸãã ã¯ãªãŒã³ãªèªã¿åãæäœãå®è¡ããããšã¯ã§ããŸããããŸããèªã¿åãäžã®ã¬ãžã¹ã¿çªå·ãããã€ã¹ã«æž¡ãå¿
èŠããããŸãã
SADã¯ã¹ã¬ãŒãããã€ã¹ã®ã¢ãã¬ã¹ã§ã-ã»ã³ãµãŒïŒãã®æäžäœããããæäœã®ç¬Šå·ãå æããŸã-æžã蟌ã¿ã®å Žåã¯ã+ WïŒãŸãã¯0ãèªã¿åãã®å Žåã¯ã+ RããŸãã¯1ããããã£ãŠããSAD + Wã= 0xBEãSAD + Rã= 0xBF;
SAC-ã¹ã¬ãŒãããã€ã¹ããã®å Žåã¯ã»ã³ãµãŒã«ãã£ãŠãéä¿¡ãããã確èªãããã
MAK-ãã€ã¯ãã³ã³ãããŒã©ããã®ç¢ºèªããããNMAKããŒã¿ãèªã¿åã£ããšããäºå®ã«å¿ããŠèšå®ããŸããNMAKããŒã¿ã¯ååšããªããããæåŸã®ãã€ãã§ç¹åŸŽä»ããããŸãã
SUBã¯ã¬ãžã¹ã¿ã¢ãã¬ã¹èªäœã§ãã
DATA-ããŒã¿èªäœ
SP-忢æ¡ä»¶
SDAãã¹ãã¢ãŒã¹ã«ç絡ããããšã«ãã確èªã
STMãã³ãã£ãŒãä»åãæè¡é©æ°ãæŸæ£ãããšã¯ä¿¡ããããŸããããçªç¶ããªã·ãŒã倿ŽããŸãã ããŠããã§ãã¯ãå§ããŸãããã
æåã®ã¹ãããã æåã®åé¡
ãã®åçãèŠãã®ã«å°é£ã®å
åã¯ãããŸããã§ããã åèšã§ã16ãããã¬ãžã¹ã¿ã®ãã¢ãã«ãŠã³ãããã®ã¯ããžãã¹ã§ãïŒ

I2C亀æãã³ãã¬ãŒãã宿ããã1æé以å
ã«ããã€ã¯ããµãŒãããã¯ã¬ãžã¹ã¿ãŒãžã®æžã蟌ã¿ã詊ã¿ã確èªãããã§å
æ°ã«å¿çããŸãã ããŠããã€ã¯ãã³ã³ãããŒã©ã«ã¬ãžã¹ã¿ããããŒã¿ãèªã¿åãããšãæããã®ã¯ããå°ãé£ããã§ãã æž¬å®çµæãä¿åãããã¬ãžã¹ã¿ã¯ã©ãã«ãããŸããïŒ ã¯ãããããŸãããåºäœãŒããæäŸããŸãã ãŸããæ§æã«ã€ããŠãã£ãšèªãå¿
èŠããããŸãã ã¢ãã¿ãŒç»é¢ãã30åé
ããŠ1æ¯ã®ãè¶ã飲ããšãããã©ã«ãã§ãã€ã¯ããµãŒããããéã¢ã¯ãã£ãç¶æ
ã«ãªã£ãŠããããšãããããŸãããæ§æã¬ãžã¹ã¿ã®1ãã€ãã®ã¿ã倿Žããããšã§ãè¿·èµ°ç¥çµããæãåºãããšãã§ããŸãã åæã«ããã®ãããžã§ã¯ãã§ã¯å€§å¹
ãªãšãã«ã®ãŒç¯çŽã«å¯ŸåŠããå¿
èŠããªããããæž¬å®ãåšæçã«è¡ãããããã«ãããã«ããã€ããããã·ã¥ããŸãã
CTRL_REG1=0x86;
ãã£ãšãããŒã¿ã¯16ãããã®æž©åºŠãšæ¹¿åºŠã®ã¬ãžã¹ã¿ã«è¡šç€ºãããŸããããã©ããããããå¥åŠã«èŠããŸãã ãŸããæž©åºŠãšæ¹¿åºŠã®å Žåãäž¡æ¹ã®ãã€ãã¯äºãã«çãããªããŸãã ããã¯å°ãªããšãçãããã§ãã çè§£ããå¿
èŠããããŸãã 亀æãããã³ã«ã®ãšã©ãŒã®æ€çŽ¢ãšé
å»¶ã®ç¢ºèªã«1æéããããŸãã äœã圹ã«ç«ããªããããäžåºŠããŒã¿ã·ãŒãã«æ·±ãå
¥ã蟌ãå¿
èŠãããã ãã...ã¯ããç§ã¯ééã£ãŠããŸããã§ããã ãŸããSTMéçºè
ã¯ããã°ã©ããŒãžã®èŽãç©ãæºåã§ããŸããã§ããã ã»ã³ãµãŒã«ã¯ã¬ãžã¹ã¿ãã»ãšãã©ãªãã1ãã€ãã§ååã«ã¢ãã¬ã¹æå®ã§ããŸãã 1ãã€ãã®èªã¿åããŸãã¯æžã蟌ã¿ãè¡ããšããã¹ãŠåé¡ãããŸããã ããããI2C仿§ã«ãããšãäžåºŠã«æ°ãã€ãã®èªã¿åããšæžã蟌ã¿ãè¡ãããšãã§ããããã°ã©ã ã§ãã®æ©èœãç©æ¥µçã«äœ¿çšããŠããŸãã äž»ãªãã®ã¯ãæåã®å Žåãåãã€ãã®åŸã«ç¢ºèªããããéä¿¡ãã2çªç®ã®å Žåãã»ã³ãµãŒããããè¿ãããã©ããã確èªããããšã§ãã ããããSTMã®ãšã³ãžãã¢ã¯åœŒãã®ããŠããŠã玹ä»ããŸããã
1ãã€ãã®èªã¿åããŸãã¯æžã蟌ã¿åŸãã«ãŠã³ã¿ãŒã1ã€å¢ããŠæ¬¡ã®ãã€ãã«ç§»åããå¿
èŠãããããšãããããŸããã¬ãžã¹ã¿ã¢ãã¬ã¹ïŒSUBïŒã®ãã€ãã®æäžäœãããã1ã«èšå®ããå¿
èŠããããŸãã ãã以å€ã®å Žåã¯ãéã«å€ãããŸã§åãã¬ãžã¹ã¿ãæäœããŸãã çŽ æŽãããããããŠæãéèŠãªã®ã¯ãã©ãã»ã©çè§£ãã«ãããã§ãã ããã¯ãªãã§ããïŒ
æŸèæãæšæºãããã³ã«ã«è¿œå ããŸãã
if (ByteCount>1) SUB[1]|=0x80;
æåãªãã®åå©ã¯ãªã
èªã¿åãããããŒã¿ã¯ããã®å€æ§æ§ã«æºè¶³ãå§ããŸãããã©ã®ãªãŠã ãããããæž¬å®ããŸããïŒ èªã¿åãå€ã¯éåžžã«å¥åŠã«èŠããŸãã ãã®ããŒã¿ã·ãŒããæåããæåŸãŸã§èªããŸã§ããã®ã»ã³ãµãŒã§ãã調çããããšã¯ãªãããã§ãã
ããã¯åŸ
ã¡äŒãã§ãïŒ åºŠãšããŒã»ã³ãã§å
·äœçãªçµæãåŸãã«ã¯ãèšç®ãè¡ãå¿
èŠãããããšãããããŸãã ç¹å®ã®ã¬ãžã¹ã¿ãããã£ãªãã¬ãŒã·ã§ã³ããŒã¿ãæœåºããåºåçç·åœ¢è¿äŒŒã䜿çšããŠå€ãèšç®ããŸãã Cã§ã³ãŒããæžãã®ãé£ãããšããããã§ã¯ãããŸããããããŒã¿ã·ãŒããæ³šææ·±ã調ã¹ãããšã¯é¿ããããŸããã ã³ãŒãéãå¢å ãããã®çµæãå¥ã®åé¡ãçºçããŸãã-ãã€ã¯ãã³ã³ãããŒã©ãŒã®ã¡ã¢ãªãäžè¶³ããŠããŸãã åè·¯èšèšè
ã¯å
ã
ãããã16ãããã€ãã®ãã©ãã·ã¥ã§ç³ãæ·ããæ¹¿åºŠã»ã³ãµãŒã®ããŒãªã³ã°ã¯ããã«å²ãåœãŠãããã¿ã¹ã¯ã®ã»ãã®äžéšã§ãã 32ããããã€ã¯ãã³ã³ãããŒã©ãŒä»¥éãã³ãŒããšå®æ°ã«ã¯4Kã¯ãŒããããããŸããã éãHAL fireã䜿çšããŠããªããšããäºå®ãèæ
®ããŠããããã¯éåžžã«å°ããã§ãã ã¡ã¢ãªã®2åã®ãµã€ãºã®ãã€ã¯ãã³ã³ãããŒã©ãŒã®æ°ããããŒãžã§ã³ã賌å
¥ããããšãçŽæãããŸããã 調åã¯ã©ãïŒ ãããžã§ã¯ããããŒãžã£ãŒãåŒã³åºããŸãã æ°ããç³ã¯ãã§ã«å°çããŠããŸãããããŒãã«ã¯ãã ä»ããããŠããŸããã ããŒãã§ãšã©ãŒãæ€åºãããªãã£ãããšãå ±åããã®ãåŸ
ã£ãŠããããšãããããŸããã ããŠãç§ã¯å ±åããŠçããåŸãŸã-é±ã®çµããã«ã¯ãç³ã®è±ãããªãã«ç©ãŸãããããããŸããã ãã¡ãããããŒãã¯è€éã§ã¯ãªããèªåã§ã¯ãã ä»ãããããšãã§ããŸããããããã¯éåžžã«å°ããããã¢ãã©ã€ã€ãŒã§ã®æéã®ãããã¯ãã ä»ããå¿
èŠã§ãã ãããããã®ãããžã§ã¯ãã®ã€ã³ã¹ã¿ã¬ãŒã·ã§ã³ã§ç¹å¥ã«èšç·Žããã人ã
ãããŸããç¹ã«ç§ã®ã¹ã±ãžã¥ãŒã«ãéåžžã«ãã€ããæéãè²»ãã以å€ã«ã§ããããšã¯äœããªãã®ã§ããªã圌ããä»äºããé¢ããã®ã§ããã
ãã®ç¶æ³ã§ã¯ããããã°ãªãã§ã¯åé²ã§ããŸããã èšç®ã®ããã«ã¹ããŒã¹ã空ããããã«ããã§ã«æžãããã³ãŒãã®äžéšãã³ã¡ã³ãã¢ãŠãããå¿
èŠããããŸãã
ç·åœ¢è¿äŒŒåé¡ã¯ããŸãè€éã«èŠããŸãããã
ããããSTMã®éè¡åž«ãç¥ãããšã¯ãæ¢æã®ãœãªã¥ãŒã·ã§ã³ãæ¢ãæ¹ãè¯ãã§ãã 10åéã®ãµãŒãã£ã³
ããããšãèšç®æ¹æ³ã®èª¬æãšCã³ãŒãã®æçãå«ã
ã¢ããªã±ãŒã·ã§ã³ã衚瀺ãããŸã ã
ãªãå°é£ãªããšã ããè¡ãã®ã§ããïŒ
ããã°ã©ã ã«ã³ããŒããŸãã ãããã©ã³ãã¿ã€ã ã§ãã å°å¹³ç·äžã®æ£®ã®å°çãåæããŠèŠãŠãããã¯ã·ã·ã«ããã®ããã§ã¯ãªãããã§ãããèªç¶ã®äžã§ã®ãã¯ããã¯ã§ãã仿¥ãã£ã³ã»ã«ãããŠããŸãã å€é£ã¯å°ãå
æ°ã¥ããããå¿çšã®è©³çްãªç ç©¶ã«åããããŸãã ãã£ãªãã¬ãŒã·ã§ã³å€ãæã€ã¬ãžã¹ã¿ãçè§£ããŠããŸãã æåã«ã圌ãã®çµç¹ã¯ç§ãå°æãããããã¯ç¬ããåŒãèµ·ãããã»ãšãã©ãã¹ããªãã¯ã«ãªããŸãã STM補åã§ãã£ãŠããããéããæããããŸãã ãã®æç¹ã§ãç§ã¯ãã£ãšè©³ãã説æããããšæããŸãã
åçãèŠãŠãæèã®æµããè©äŸ¡ããããšããŸãã è¡šã®æåã®åã§ã¯ãã¢ãã¬ã¹ã¯16é²åœ¢åŒã§ã2çªç®ã®ååã3çªç®ã®ããŒã¿åã§ããã®åŸã«ãããã®èª¬æãç¶ããŸãã
å€ãs16ãšããŠããŒã¯ãããŠãããšããã¹ãŠãæç¢ºã«ãªããŸã-16ããã眲åãããæšæºã®è¿œå 圢åŒã§è¡šç€ºãããŸãã
30çªå°ãš31çªå°ã«ãã人ã¯ããã«æ¥œããã§ãã ãããã¯8ãããã§ãã ããããèšç®ã§ãããã䜿çšããã«ã¯ããããã®å€ã2ã€ã«åå²ããå¿
èŠããããŸãã æäžäœãããã äžäœ7ããããã¬ãžã¹ã¿ã«å
¥ããŠãæãå€ããããããŒãã®ãŸãŸã«ããã®ã¯æ¬åœã«å°é£ã§ãããïŒ
ãããããããã¯ãŸã è±ã§ããã ããªãŒã¯ãã¢ãã¬ã¹32ãš33ã«8ãããå€ã䜿çšããŸãããããã«2ããããäžè¶³ããŠããããšãããããŸãã-9çªç®ãš10çªç®ã äœããã®çç±ã§ãã¢ãã¬ã¹35ã®ã¬ãžã¹ã¿ã«æ ŒçŽãããŸãããã®ã¬ãžã¹ã¿ã«ã¯ã1ã€ã®ã¬ãžã¹ã¿ããã®2ã€ã®äžäœããããš32ã®ã¬ãžã¹ã¿ãã2ã€ã®äžäœããããå«ãŸããŠããŸãã ããããã«2ãã€ããå²ãåœãŠãŠå®å
šã«å€ãæžã蟌ãã®ã¯ç°¡åã§ã¯ãããŸããããã¹ãŠåãã§ãã¢ãã¬ã¹35ã®ã¬ãžã¹ã¿ã¯ç©ºã§ãã
ããããããã ãã§ã¯ãããŸããã æäœã®çµæã10ãããã®ã¬ãžã¹ã¿ãåŸãããŸãããèšç®ã«ã¯ãããã®äžäœ7ãããã®ã¿ãå¿
èŠã§ããããšãããããŸãã ãã®ããã3ã€ã®
æäžäœããããç Žæ£ããå¿
èŠããããŸã;
å€ã8ã§é€ç®ã ããã®åŸã®ã¿åŒã«ä»£å
¥ãã
å¿
èŠããããŸã ã
ã€ãŸããèšç®ã«å¿
èŠãªã®ã¯7ãããã ãã§ãã ãããã®æäœã8ãããã¬ãžã¹ã¿ã«ç°¡åã«åãŸãã®ã«ããªãããããã¹ãŠã®æäœãèŠæ±ãããã®ã§ããããã
æ¬åœã«ããçš®ã®è³ç Žè£ã ã¢ãã¬ã¹ã30ã31ã®ã¬ãžã¹ã¿å
ã®æ
å ±ã¯æ¬¡ã®ããã«ãªããŸãã
æ
å ±ãæœåºããããã«ãæ³åãçµ¶ããå®è¿ããããå¿
èŠã¯ãªããã¬ãžã¹ã¿ã®ã¡ã¢ãªã«ã¯ãŸã äœåãªããããæ®ã£ãŠããŸãã
æ°Žæãžã®æ

ããŠãç§ã¯ã¢ããã¹ããªãŒã ã§äžããããããã°ã©ã ããã§ãã¯ããŠããŸãã ãã¹ãŠã説æã«éåžžã«äŒŒãŠããããã§ãã ãã ããæåŸãã2è¡ç®ã¯æ¬¡ã®ãšããã§ãã
çžå¯Ÿæ¹¿åºŠã1000ããŒã»ã³ããè¶
ããå Žåã1000ããŒã»ã³ããšèŠãªããŸãã
ã¯ã©ã¹ã
ãã®çµæãå®éã«æž¬å®çµæãæçµçã«ç¢ºèªããŠããã®ã§ã2æéãçµã£ãŠããŸããã 圌ã¯ç§ãæããããŸãã ã»ã³ãµãŒã¯ãç§ã®éšå±ã®æ°è±¡æ¡ä»¶ããæ³åäžã®æ°Žæã®æµ·ã®åºã®ããŒã¿ã«éåžžã«è¿ãããšã瀺ããŠããŸãã æž©åºŠã¯ææ°500床ãè¶
ããæ¹¿åºŠã¯1000ããŒã»ã³ãçšåºŠã§ãã ç§ã¯å®å
šã«çšŒãã ããã§ããšã¢ã³ã³ããªã³ã«ããŸãã
ã»ã³ãµãŒã®èªã¿åãå€ããããã«åœ±é¿ãåããããšã倿ãããšããã³ãŒãã®ãã§ãã¯ãéå§ããŸãã STãã倧ãŸãã«æžããããã³ãã¬ãŒãã宿ãããã®ãæ§ããããšãã§ããŸããã§ããããçªç¶å°ç¡ãã«ãªããŸãããïŒ 30åãã§ãã¯ã§ã¯çµæãåŸãããŸããã å床ãããŒã¿ã·ãŒããæãäžããŠãç·åœ¢è£éæ³ã«ããèšç®ã§ã10ããšãããããã®å¥åŠãªä¹æ°ãã©ãããæ¥ãã®ããçè§£ããŸããã 30åã®äžå¯§ãªæ ¡æ£ãçµæããããããŸãã-æŽæ°é€ç®ã®ç²ŸåºŠãæ¹åããããšãç®çãšããåãã§ããããšãããããŸããã 確ãã«ãåºåã§ã¯çµæãããŒã»ã³ããŒãžã§ã¯ãªããæ¹¿åºŠã§ã¯ppmã§ã枩床ã§ã¯ææ°æž©åºŠã«10ãæããå€ã§åŸãããŸããã
ç§ã¯ããããã³ãŒãããå€ããŠãçªç¶äžå€®ã®è»ç·-29åºŠãæ¹¿åºŠ58ïŒ
ã«æ»ãããšããŸãã ã»ã³ãµãŒãæã§æŒããšãæž©åºŠã®æž¬å®å€ãéåžžã«éã34ã«å¢å ããŸãã
çªã®å€ãæããªããè²§ãã人ã
ãæ©éã«æ²¿ã£ãŠæ»ããã¢ã¹ã¯ã¯ã®é»è»ã®ä»äºããæ»ã£ãŠãããšããã ãã§ãã ããŠãå°ãªããšãå
¬åã«æ£æ©ã«è¡ããææ¥ã®æã«ã¶ã³ã®å°è»ãšäŒè©±ããæºåãããŸãã 圌ãã®äŒç€Ÿã¯ãBashneftãšã®ã«ããã«ã®èŒžå
¥ä»£æ¿ã§åœŒãã®éã詊ããŠã¿ãããšã«ããŸãããããªãã¯åœŒããç§ããäœãåŸãããšãæã¿ãå®éã«ç§ã圌ããå©ããããšãã§ãããã«ã€ããŠèããå¿
èŠããããŸãã
ä¹Ÿç¥æ®æž£
èŠããã«ãSTã¯ãéçºè
ã§ããå
åŒããåçŽãªãã©ã€ããŒãäœæããå Žåã§ããããã¥ã¢ã«ãæåããæåŸãŸã§èªã¿ãããã«ã¢ããªã±ãŒã·ã§ã³ã§èŠçãæããããã«ãã¹ãŠãè¡ããŸããã
- æ°ãã€ããèªã¿æžãããå Žåãã¬ãžã¹ã¿ã¢ãã¬ã¹ã倿Žããå¿
èŠããããŸãã
- å®éã®æž¬å®å€ã¯ããã£ãªãã¬ãŒã·ã§ã³å€ã䜿çšããŠèšç®ããå¿
èŠããããŸãã
- ãã£ãªãã¬ãŒã·ã§ã³å€èªäœã¯éåžžã«å¥åŠãªæ¹æ³ã§ã¡ã¢ãªå
ã«é
眮ããããããã䜿çšããŠãµãŒã«ã¹æäœãå®è¡ããããŒã¹ã«ãã£ãŠããããåéããå¿
èŠããããŸãã
- ã¢ããªã±ãŒã·ã§ã³ãã¡ã€ã«ã®ããã°ã©ã ããã¹ãã«ãšã©ãŒãå«ãŸããŠããŸãã
- ãã£ãªãã¬ãŒã·ã§ã³ããã³ããã¯ã¢ããã¬ãžã¹ã¿ã¯ç¡æã§èšé²ã§ããããã«éããŠããŸãã 誀ã£ãŠæ°ããå€ãèšé²ãããšãèšç®äžã«çµæãæªãããšã«ãªããŸãã
- çžå¯Ÿæ¹¿åºŠã¯ç°¡åã«100ïŒ
ãè¶
ããå¯èœæ§ããããããã¯ã¡ãŒã«ãŒããŸã£ããæ°ã«ããŸããã
æãåçŽãªãã©ã€ããŒãäœæããéçšã§ç§ãééããäžèšã®åé¡ã¯ã1å¶æ¥æ¥å以äžããããæ°äººã¯æ°æ¥éä»äºãæäŸããããšãã§ããŸããã
åè·¯ãšã©ãŒãããŒããŠã§ã¢ã®åé¡ãéä¿¡ãããã³ã«ã®ãã¥ã¢ã³ã¹ãããã³éä¿¡åç·ã®å質ãããããã®å¥åŠããšèª¬æã®äžæ£ç¢ºãã«å ããããå Žåãããçš®ã®PLCã¢ãã çšã®ãã©ã€ããŒãäœæããããšã«ã€ããŠèšããããšã¯äœã§ããã ãã€ã¯ãã³ã³ãããŒã©ããªã³ã¶ãã©ã€ã§ããŒã¿ãèªã¿åãããšã³ã³ãŒã/ãã³ãŒãããå¿
èŠããããå²ã蟌ã¿ã¡ã«ããºã ã䜿çšããŠãã¡ã¢ãªã¢ã¯ã»ã¹ãæå€§éã«ãã€ã¬ã¯ãããå¿
èŠãããå Žåã ããã«ãã³ãŒãã¯ãã·ã£ããŠã¢ãŒããã§å®è¡ããã¡ã€ã³ããã°ã©ã ã®ã³ãŒã¹ãžã®åœ±é¿ãæå°éã«æããå¿
èŠããããŸãã
è£œé æ¥è
ã¯ãæã«ã¯ããŸãå¿å°ãããã¥ã¢ã³ã¹ã«ã€ããŠæå³çã«é»ã£ãŠããããããŸãä¿¡é Œã§ããªãæ
å ±ãæäŸããããããšããäºå®ã«ã€ããŠã¯è©±ããŠããŸããã
ãã®ãããªç¶æ³ã§ã¯ãçµéšãåè·¯ã®ååãªç¥èãããã³ããã€ã¹ã®ç©çåŠããªããããéçºè
ã¯éåžžã«å³ããç¶æ
ã«ãªããªããã°ãªããŸããã
çµæãå ±åããæãæ¥ãŸãã
ãããŠæåŸã«ããã®ã»ã³ãµãŒãèšèšã«äœ¿çšããããšã«æ±ºãã人ã®çæŽ»ãæ¥œã«ããããã«ããŸãã 察å¿ãããœãããŠã§ã¢ã¢ãžã¥ãŒã«ã®ã³ãŒãã®äžã«å
¬éããŸãã ãã€ã¯ãã³ã³ãããŒã©ã亀æãã¹ãããŒãªã³ã°ã«äœ¿çšãããæ¥ç¶ããŒãã®æ°ãªã©ãç¹å®ã®å®è£
ã«å€§ããäŸåããŠãããããäœã¬ãã«ã®I2CããŒã¿äº€ææ©èœã¯å«ãŸããŠããŸããã
ã»ã³ãµãŒãšã®ããŒã¿äº€æã¯ãI2Cã€ã³ã¿ãŒãã§ãŒã¹ãä»ããŠå®è¡ãããŸãã æšæºãããã³ã«ããµããŒããã2ã€ã®é¢æ°ã䜿çšãããŸã;ããããèªåã§èšè¿°ããããæšæºã©ã€ãã©ãªã§æ€çŽ¢ããå¿
èŠããããŸãã
äžã®å³ã«ç€ºããããã³ã«ã«åŸã£ãŠãããŒã¿ãèšé²ããããã®ãã®
int WRsubAddr(unsigned char SAD,unsigned char SUB, unsigned char *data,unsigned int ByteCount);
ããŒã¿ãèªã¿åã2çªç®
int RDsubAddr(unsigned char SAD,unsigned char SUB, unsigned char *data,unsigned int ByteCount);
ããŒã¿ -
ããŒã¿ãããã¡
ByteCount-èªã¿æžãããããã€ãæ°ã
ããã°ã©ã ã³ãŒãã¯éåžžã«ã·ã³ãã«ã§ãã³ã¡ã³ããè±å¯ã«æäŸãããŠããŸãã ã»ã³ãµãŒãã©ã€ããŒãåæåããããšãèšç®çšã®å®æ°ãããããèªã¿åãããå¥ã®æ§é ã«é
眮ãããŸãã ãŸããèªã¿åãããŠèªã¿åãå¯èœãªåœ¢åŒã«å€æãããèªã¿åãå€ãå«ãŸããŸãã
ãã®ããã°ã©ã ã³ãŒãã¯ãå€å¿ãª2æ¥éã®ãã£ã¹ã«ãã·ã§ã³ããã»ã¹ã®åŸã«å€æŽãããŸããã ã¬ãžã¹ã¿H0_rH_x2ãH1_rH_x2ãH0_T0_OUTãH1_T0_OUTã®äžäœãããã䜿çšããŠã倿ã®ç²ŸåºŠãé«ããããšããŸããã æž©åºŠãèšç®ããå Žåãããã¯çµæã«å€§ããªåœ±é¿ãäžããŸããã§ãã;湿床ã®å Žåãããã¯äžååãªçµæã«ã€ãªãããŸããã èšç®ã«æµ®åå°æ°ç¹åã䜿çšããããšã§ãèªã¿åãå€ãå®éã®èªã¿åãå€ã«å€§å¹
ã«è¿ã¥ããããšãã§ããŸããã 32ããããã€ã¯ãã³ã³ãããŒã©ãŒã®å Žåãæµ®åå°æ°ç¹æ°ã®èšç®ã¯ããã»ã©é£ããã¿ã¹ã¯ã§ã¯ãªãããã®ã»ã³ãµãŒã䜿çšããå Žåã®é«éèšç®ã¯å¿
èŠãããŸããã ãã®ç¹å®ã®ããŒãžã§ã³ã®ããã°ã©ã ãèªè
ã®æ³šæãåèµ·ããŸãã
è°è«ã«åå ãããã¹ãŠã®ãŠãŒã¶ãŒãç¹ã«
mdn -tech ã
olartamonovãããã³
lorcã«æè¬ããŸãã ããã«ãã€ãããŒã·ã§ã³ã®äžã§ããå·çåŸã«èšäºãç·šéããå¯èœæ§ãã«ããŒããŠããªãã£ããšããäºå®ã«ãHabrããŒã ã«æè¬ããŸãã ããã«ãããã³ã¡ã³ãã®ãã£ã¹ã«ãã·ã§ã³ã®çµæã«å¿ããŠã³ã³ãã³ãã倿Žã§ããŸãã ç§ã¯ãã®æ©äŒãå©çšããããšããŸã-ç§ã¯ãšã©ãŒãä¿®æ£ããæã«ã¯è峿·±ãæ
å ±ã远å ããŸãã äœåºŠãç¹°ãè¿ããåŸãèšäºã¯ããé¢çœããªãããããã¯ãããå®å
šã«åæ ããæãéèŠãªããšã«ã¯ãšã©ãŒãå«ãŸããŠããŸããã
ããããŒãã¡ã€ã«ã³ãŒã
#ifndef HTS221_H #define HTS221_H #include "i2c.h"
SIããã°ã©ã ã³ãŒã
#include "HTS221.h" int WRHTS221reg(unsigned char addrREG, unsigned char *data,unsigned char ByteCount) {
䟿å©ãªè³æ
ã¡ãŒã«ãŒã®ã»ã³ãµãŒããŒãžãžã®ãªã³ã¯æçµèª¿æ»
è£œé æ¥è
ã¯ãã»ã³ãµãŒã«ã¯ãã§ã«çµæãåŠçããããã®ããžã¿ã«ä¿¡å·ããã»ããµãå«ãŸããŠãããšè¿°ã¹ãŸããã æ¬¡ã«ãæãç°¡åãªèšç®ãå®è£
ããŠããŒã¿ããŠãŒã¶ãŒãã¬ã³ããªãŒãªåœ¢åŒã§æäŸããããšãäžå¯èœã ã£ãçç±ã ãŸãã圌ã¯å¿ããããŸãããå°ãªããšããã£ãªãã¬ãŒã·ã§ã³ã¬ãžã¹ã¿ãéåžžã®æ¹æ³ã§é
眮ããå¿
èŠã¯ãããŸããã æãåçŽãªãã¢ã³ãŒãã«åçŽãªãã°ãããã®ã¯ãªãã§ããïŒ ãããŠãããã«å€ãã®çç±ã