ä»æ¥ã¯ã»ã³ãµãŒãæ¥ç¶ããŸãã

çºè¡ãµã€ã¯ã«ã®å 容ïŒ
- [ããŒã1]䜿çšããããœãããŠã§ã¢ããã³ããŒããŠã§ã¢ãœãªã¥ãŒã·ã§ã³ã®æŠèŠã
- [ããŒã2] FT800ã°ã©ãã£ãã¯ã¹ã³ã³ãããŒã©ãŒå ¥éã åšèŸºæ©åšã«æ¢è£œã®mbedã©ã€ãã©ãªã䜿çšããŸãã
- [ããŒã3] HYT-271ã»ã³ãµãŒã®æ¥ç¶ã åšèŸºæ©åšçšã®ç¬èªã®ã©ã€ãã©ãªãmbedã§äœæããŠå ¬éããŸãã
- [ããŒã4]ã¢ããªã±ãŒã·ã§ã³éçºïŒããã°ã©ã æ§é ãã¿ããã¹ã¯ãªãŒã³ã§ã®äœæ¥ã
- [ããŒã5]ã¢ããªã±ãŒã·ã§ã³éçºïŒç»åã®è¡šç€ºããã·ã¢åã®åé¡ã
- [ããŒã6]ããŠãžã³ã°éšåã®å°å·
3çªç®ã®éšåã¯ã«ããã®äžã«ãããŸãã
åã®èšäºã¯ãmbed IDEã§äœæãããRiverdiã®TFTãã£ã¹ãã¬ã€ã«2çªç®ã®ã«ãŠã³ã¿ãŒã®åºåãå®è£ ãããããžã§ã¯ãã®èª¬æã§çµãããŸããã
ä»æ¥ãHYTã·ãªãŒãºã®æž©åºŠããã³çžå¯Ÿæ¹¿åºŠã»ã³ãµãŒãæ¥ç¶ããŸãã ã»ã³ãµãŒã¯å®å šãªããžã¿ã«ãŠãããã§ãã湿床ã枬å®ããããã®å®¹éæ§æç¥çŽ åã枩床ã»ã³ãµãŒãä¿¡å·åŠçåè·¯ãå«ãŸããŠããŸããããã«ãã»ãšãã©ã®åæ§ã®ã»ã³ãµãŒãšåæ§ã«ãHYTã«ã¯å·¥å Žæ ¡æ£ããããŸãã ããã¯ãã¹ãŠ1ã€ã®ããšãæå³ããŸããã»ã³ãµãŒã䜿çšããã«ã¯ãã»ã³ãµãŒãå¶åŸ¡ã³ã³ãããŒã©ãŒã«æ¥ç¶ããã»ã³ãµãŒãããŒãªã³ã°ãããããã³ã«ããã¹ã¿ãŒããã ãã§ãã
ããã±ãŒãžã®åœ¢åŒãšãCã§ã®å¯Ÿå¿ããé¢æ°ã®å®è£ äŸã«ã€ããŠã¯ã ãã®èšäºã§è©³ãã説æããŸã ã ããã§ãæ¢ã«è¿°ã¹ãããšã®å€ããç¹°ãè¿ããªãããã«ããmbedãããžã§ã¯ãã§HYT-271 *ã»ã³ãµãŒã䜿çšããåé¡ã«çŠç¹ãåœãŠãŸãã
* HYTã·ãªãŒãºã¯ãHYT-271ãHYT-221ãããã³HYT-939ã®3ã€ã®ã¢ãã«ã§æ§æãããŠããŸãã ã±ãŒã¹ã®ã¿ãç°ãªããããHYT-271ããªã³ã«ããããšã«ã€ããŠç§ãæžãããã®ã¯ãã¹ãŠãä»ã®ã¢ãã«ã«ãé¢é£ããŠããŸãã

å å«åè·¯
HYTã·ãªãŒãºã»ã³ãµãŒãæ¥ç¶ããã«ã¯ãéåžžI2Cã€ã³ã¿ãŒãã§ã€ã¹ã䜿çšãããŸãïŒSPIä»ãã®ã»ã³ãµãŒã¯ãªã¯ãšã¹ãã«å¿ããŠå©çšå¯èœã§ãïŒã ãããã£ãŠãã»ã³ãµãŒãæ¥ç¶ããã«ã¯ã次ã®4ã€ã®ã©ã€ã³ãå¿ èŠã§ãã
- é»æºïŒ3.3 Vãš5 Vã®äž¡æ¹ãé©åã§ãïŒ
- å°ç
- SDAããŒã¿ã©ã€ã³
- SLCã¯ããã¯ã©ã€ã³

SDAããã³SLCã©ã€ã³ã®æšå¥šãã«ã¢ããæµæå®æ Œã¯2.4 kOhmã§ãã
ã»ã³ãµãŒããŒãªã³ã°æé
HYTã·ãªãŒãºã»ã³ãµãŒã¯ãããã€ãã®ã¿ã€ãã®ã³ãã³ãããµããŒãããŠããŸãã 枬å®èŠæ±ããã³ããŒã¿ãã§ããã³ãã³ãã¯ãã»ã³ãµãŒãçŽæ¥ããŒãªã³ã°ããããã«äœ¿çšãããæ®ãã®åœä»€ã¯ãI2Cãã¹äžã®æšæºã»ã³ãµãŒã¢ãã¬ã¹ãå€æŽããå¿ èŠãããå Žåã«ã®ã¿å¿ èŠã«ãªããŸãã
mbed-library HYTã«ã¯ãI2Cã¢ãã¬ã¹ãå€æŽããæ©èœããªãããšãããã«èšããªããã°ãªããŸããã ãã®çç±ã¯ãç§ã®èªç¶ãªæ ãšçŽæ¥çãªå¿ èŠæ§ã®æ¬ åŠã§ããã»ãšãã©ã®å Žåãåäžã®ã»ã³ãµãŒããã¹ã«ã¶ãäžãã£ãŠããŠãåäœã®ããã«ããŒãªã³ã°ãšæž¬å®çµæã®åä¿¡ãå®è£ ããã®ã«ååã§ãã

ãããã£ãŠã枬å®èŠæ±ã³ãã³ããåä¿¡ãããšãHYTã»ã³ãµãŒã¯ã¹ãªãŒãã¢ãŒããçµäºãã枬å®ãè¡ãã枩床ãšæ¹¿åºŠã®ããŒã¿ãå«ãããã±ãŒãžãçæããŸãã ããŒã¿ãåä¿¡ããã«ã¯ãData Fetchã³ãã³ããã»ã³ãµãŒã«éä¿¡ããå¿ èŠããããããã2ã€ã®ã³ãã³ãã®éä¿¡ã®éã«100ããªç§ã®é 延ãæäŸããå¿ èŠããããŸãã ããã¯ãã»ã³ãµãŒãããã±ãŒãžã枬å®ããŠåœ¢æããã®ã«ãããæéã§ãã
枬å®èŠæ±ã¯ãããããŒãã€ãïŒã»ã³ãµãŒã¢ãã¬ã¹ãšã¬ã³ãŒããã©ã°ïŒã®ã¿ã§æ§æããããã±ããã§ãã 察å¿ããMRCommandïŒïŒé¢æ°ã¯ã空ã®ãã±ãããI2Cã«éä¿¡ããŸãã
Data Fetchã³ãã³ãã¯ãèªã¿åããã©ã°ãšãã³ã³ãããŒã©ãŒãã»ã³ãµãŒããåä¿¡ãã4ãã€ãã®ããŒã¿ãå«ãããããŒãã€ãã§ãã

æåã®ãã€ãã®æåã®ãããã¯ããµãŒãã¹CModeãããã§ãã ã1ãã«èšå®ãããŠããå Žåãã»ã³ãµãŒã¯ç¹å¥ãªåäœã¢ãŒãã«ããããã¹äžã®ã¢ãã¬ã¹ãå€æŽã§ããŸãã
æåã®ãã€ãã®2çªç®ã®ãããã¯ããµãŒãã¹ã®å€ããããã§ãã ã1ãã«èšå®ãããŠããå Žåã次ã®æž¬å®ãµã€ã¯ã«ãå®è¡ããåŸãåã®ãµã€ã¯ã«ãšåã枩床ãšæ¹¿åºŠã®å€ãååŸãããŸãã
次ã®14æ¡ã¯çžå¯Ÿæ¹¿åºŠããšã³ã³ãŒããã次ã®14æ¡ã¯æž©åºŠããšã³ã³ãŒãããŸãã 次ã¯2ã€ã®éèŠã§ãªããããã§ãã
察å¿ããé¢æ°DFCommandïŒïŒã¯ã察å¿ãããã±ãããI2Cã«éä¿¡ããã»ã³ãµãŒããåä¿¡ããããŒã¿ããã³ãŒãããŸãã çžå¯Ÿæ¹¿åºŠãšæž©åºŠã¯ã次ã®åŒã䜿çšããŠèšç®ãããŸãã
RH [ïŒ ] =ïŒ100 /ïŒ2 14-1ïŒïŒ* RH in
T [°C] =ïŒ165 /ïŒ2 14-1ïŒïŒ* T in -40
ãããã£ãŠãHYTã»ã³ãµãŒããŒãªã³ã°ã©ã€ãã©ãªã¯ãMRCommandïŒïŒãšDFCommandïŒïŒã®2ã€ã®é¢æ°ãå®è£ ããå¿ èŠããããŸãã
mbedã§ã©ã€ãã©ãªãäœæããŠå ¬éãã
mbedã¯ãããŸããŸãªARMãã©ãããã©ãŒã ãšé¢é£ããã€ã¹ ïŒã³ã³ããŒãã³ãïŒ-ãã£ã¹ãã¬ã€ããã©ã€ããã»ã³ãµãŒããã©ã³ã·ãŒããŒãªã©ããµããŒãããŠããããšãæãåºãããŠãã ããã
åœç¶ããã€ã¯ãã³ã³ãããŒã©ã®ã¡ãŒã«ãŒã®ã¿ãæ°ãããããã°ããŒãã®ãµããŒããæäŸã§ããŸãããæ°ããåšèŸºã³ã³ããŒãã³ãã®ãµããŒãã«ããããã¹ãŠãããèå³æ·±ããã®ã«ãªããŸãã æ°ãæåããã¹ãŠã®ãŠãŒã¶ãŒãæ°ããããã€ã¹ãè¿œå ãããµããŒããããŠããã³ã³ããŒãã³ãã®ãªã¹ãã®äžã«[æ°ããã³ã³ããŒãã³ããè¿œå ]ãã¿ã³ããã³ã°ããŠããŸããã çŸåšãARMã¯ããªã·ãŒãå€æŽããŠããŸãïŒç»é²æžã¿ã®ãŠãŒã¶ãŒã¯æ°ããã³ã³ããŒãã³ãã®ã©ã€ãã©ãªãšèª¬æãå ¬éã§ããŸããããµããŒããããŠããã³ã³ããŒãã³ãã®ãªã¹ãã«ãã©ã€ããŒãè¿œå ããã«ã¯ãæ¡åŒµæš©éãå¿ èŠã§ãïŒç§ã¯ããããæã£ãŠããŸããhee hee heeïŒã
åšèŸºæ©åšçšã®mbedã©ã€ãã©ãªã¯ãã¹ãŠãããã€ã¹ã®æäœã«å¿ èŠãªæ©èœãå«ãC ++ã¯ã©ã¹ã§ãã ååãšããŠããã®ãããªã¯ã©ã¹ã®ã³ã³ã¹ãã©ã¯ã¿ãŒã¯ãã³ã³ããŒãã³ããæ¥ç¶ãããŠããå ¥å/åºåè¡ãå ¥åãšããŠåãåããŸãã ããã€ã¹ã®æ¥ç¶æã«ç¹å®ã®åæåæé ãå¿ èŠãªå Žåããã®æé ã¯ã¯ã©ã¹ã³ã³ã¹ãã©ã¯ã¿ãŒã«å«ããããšãè«ççã§ãã åæåæé ãå«ãã©ã€ãã©ãªã®äŸãšããŠã¯ãFT800ã°ã©ãã£ãã¯ã¹ã³ã³ãããŒã©ã©ã€ãã©ãªããããŸãã詳现ã«ã€ããŠã¯ã åã®èšäºã§èª¬æããŸãã ã
HYTã»ã³ãµãŒã®å Žåããã¹ãŠãã¯ããã«ç°¡åã§ããã»ã³ãµãŒã®åæåã¯äžèŠã§ã枬å®çµæãååŸããããã«å¿ èŠãªæ©èœã¯2ã€ã ãã§ãã
HYT.hãã¡ã€ã«
#define HYT_ADDR 0x50 // 01010000 class HYT { public: /** * HYT constructor. * * @param sda mbed pin to use for SDA line of I2C interface. * @param scl mbed pin to use for SCL line of I2C interface. * * Remember about pull-up resistors on sda and scl. Recommended value is 2.4 kΩ */ HYT(PinName sda, PinName scl); /** * @brief The totals (temperature in Celsius, relative humidity in percentages) */ float humidity; float temperature; /** * @brief Send "Measuring Request" command * @details Initiates a measuring cycle of HYT sensor * @details More information: http://www.ist-ag.com/eh/ist-ag/resource.nsf/imgref/Download_AHHYTM_E2.2.5.pdf/$FILE/AHHYTM_E2.2.5.pdf */ void MRCommand(void); /** * @brief Send "Data Fetch" command & processing the data * @details Fetch the last measured value of humidity and temperature from sensor * @details Calculate values of temperature in Celsius, relative humidity in percentages * @details More information: http://www.ist-ag.com/eh/ist-ag/resource.nsf/imgref/Download_AHHYTM_E2.2.5.pdf/$FILE/AHHYTM_E2.2.5.pdf * @returns 0 if no errors, -1 if no new value received from sensor. */ int DFCommand(void); private: I2C _i2c; };
HYT.cppãã¡ã€ã«
#include "HYT.h" #include "mbed.h" HYT::HYT(PinName sda, PinName scl) : _i2c(sda, scl) { } /*************************************************************************************************************************/ void HYT::MRCommand(void) { _i2c.write(HYT_ADDR, 0, 0); } /*************************************************************************************************************************/ int HYT::DFCommand(void) { char dataI2C[4]; int stateBit; int humidityRaw; int temperatureRaw; _i2c.read(HYT_ADDR, dataI2C, 4); stateBit = (dataI2C[0] & 0x40) >> 6; if (stateBit == 0) { humidityRaw = ((dataI2C[0] & 0x3F) << 8) | dataI2C[1]; temperatureRaw = ((dataI2C[2] << 8) | dataI2C[3]) >> 2; if (temperatureRaw < 0x3FFF && humidityRaw < 0x3FFF) { temperature = ((float)(temperatureRaw) * 165.0f / 16383.0f) - 40.0f; humidity = (float)humidityRaw * 100.0f / 16383.0f; } else { // sensor returns wrong data (1111...11) return -1; } } else { // no new value received from sensor return 0; } return 0; }
ç¬èªã®ãããžã§ã¯ãã§ã©ã€ãã©ãªã䜿çšããã«ã¯ãããŒãžãžã®ãªã³ã¯ã«ãã®èª¬æãå ¥åããã©ã€ãã©ãªããªã³ã©ã€ã³ã³ã³ãã€ã©ã«ã€ã³ããŒãããã ãã§ãã

æ°ããã³ã³ããŒãã³ãã®mbedã©ã€ãã©ãªãå ¬éãããšããã³ãŒããäœæããŠé©åã«ææžåããã ãã§ãªãã ããã«ãã©ã€ãã©ãªã«ããŒããŠã§ã¢ã¢ãžã¥ãŒã«ãäžè¬çãªããã€ã¹ã¹ã€ããã³ã°åè·¯ãããã³Hello Worldããã°ã©ã ã®èª¬æïŒã©ã€ãã©ãªã䜿çšããç°¡åãªäŸïŒãæäŸããããšãæãŸããã§ãã ãã®ãããªäŸãäœæããããã«ãç§ã¯ãã®çºè¡ãµã€ã¯ã«ã®æåã®èšäºã®ãã©ãããããžã§ã¯ããåã³äœ¿çšããŸã ã
ãã©ãããããžã§ã¯ãã¯ãã·ãªã¢ã«ã€ã³ã¿ãŒãã§ã€ã¹ïŒä»®æ³COMããŒãïŒã«2çªç®ã®ã«ãŠã³ã¿ãŒã衚瀺ããåçŽãªããã°ã©ã ã§ãã
#include "mbed.h" Serial pc(USBTX, USBRX); Ticker timeKeeping; volatile uint64_t seconds = 0; void secondsCallback(void) { pc.printf("Number of seconds: %x\r\n", seconds); seconds ++; } int main() { timeKeeping.attach(&secondsCallback, 1.0f); while(1) {} }

HYTã©ã€ãã©ãªãŒããã©ãããããžã§ã¯ãã«æ¥ç¶ããããã€ãã®ç°¡åãªå€æŽãè¡ããŸãã
- ã¯ã©ã¹HYTã®SENSORãªããžã§ã¯ããäœæããI2Cã€ã³ã¿ãŒãã§ã€ã¹ãåŒæ°ãšããŠå©çšå¯èœãªçµè«ã®ååãæž¡ããŸã
- ã»ã³ãµãŒdataUpdateïŒïŒãããŒãªã³ã°ããæ©èœãè¿œå ããç¡éã«ãŒãã§åŒã³åºããŸã
- 2çªç®ã®ã«ãŠã³ã¿ãŒã®ä»£ããã«ãã·ãªã¢ã«ã€ã³ã¿ãŒãã§ã€ã¹ã«æž©åºŠãšçžå¯Ÿæ¹¿åºŠã®ããŒã¿ã衚瀺ããŸã
ãããã£ãŠãäœæãããã©ã€ãã©ãªã®ãã¢ãååŸããŸãã
#include "mbed.h" #include "HYT.h" Serial pc(USBTX, USBRX); Ticker timeKeeping; HYT SENSOR (PD6, PD7); // sda, scl [SLSTK3400A] //HYT SENSOR (D14, D15); // sda, scl [WIZwiki-W7500P] //HYT SENSOR (PA08, PA09); // sda, scl [ATSAMD21-XPRO] // HYT sensor polling cycle void dataUpdate(void) { SENSOR.MRCommand(); wait_ms(100); SENSOR.DFCommand(); } void secondsCallback(void) { pc.printf("Humidity level: %.1f\r\n%", SENSOR.humidity); pc.printf("Temperature level: %.1f\r\n%", SENSOR.temperature); pc.printf("-------------------------------\r\n%", SENSOR.temperature); } int main() { timeKeeping.attach(&secondsCallback, 1.0f); while(1) { dataUpdate(); } }
ãã®ãããžã§ã¯ãã¯developer.mbed.orgã§å ¥æã§ããARM mbedã§ãµããŒããããŠããããŸããŸãªãããã°ããŒãã§æ£åžžã«åäœããŸãã

䜿çšäŸãå ¬éããããšãHYTã»ã³ãµãŒçšã®ã©ã€ãã©ãªãäœæããããã»ã¹ãçµäºããŸãã
ç¬èªã®ãããžã§ã¯ãã§ã©ã€ãã©ãªã䜿çšãã
ããã§ã¡ã€ã³ãããžã§ã¯ãã«æ»ããTFTã¿ããã¹ã¯ãªãŒã³ã«2çªç®ã®ã«ãŠã³ã¿ãŒã§ã¯ãªããHYT-271ã»ã³ãµãŒããåä¿¡ããããŒã¿ã衚瀺ããŸãã
ãããè¡ãã«ã¯ãmbedã§æ°ãããããžã§ã¯ããäœæããããã«HYTããã³FT800_2ã©ã€ãã©ãªãã€ã³ããŒãããŸãã
次ã«ãI2Cããã³SPIã€ã³ã¿ãŒãã§ãŒã¹ã䜿çšå¯èœãªI / Oã©ã€ã³ã®ååãåŒæ°ãšããŠäœ¿çšããŠãHYTããã³FT800ã¯ã©ã¹ã®ãªããžã§ã¯ããäœæããŸãã
HYT SENSOR (PD6, PD7); // sda, scl [SLSTK3400A] FT800 TFT (PE10, PE11, PE12, PE13, PB11, PD4); // mosi, miso, sck, ss, int, pd [SLSTK3400A] //HYT SENSOR (D14, D15); // sda, scl [WIZwiki-W7500P] //FT800 TFT (D11, D12, D13, D10, D9, D8); // mosi, miso, sck, ss, int, pd [WIZwiki-W7500P] //HYT SENSOR (PA08, PA09); // sda, scl [ATSAMD21-XPRO] //FT800 TFT (PA18, PA16, PA19, PA17, PA20, PA21); // mosi, miso, sck, ss, int, pd [ATSAMD21-XPRO]
ã»ã³ãµãŒããŒãªã³ã°æ©èœãè¿œå ããŸãã
void dataUpdate(void) { SENSOR.MRCommand(); wait_ms(100); SENSOR.DFCommand(); }
衚瀺ãªã¹ããäœæããŠã°ã©ãã£ãã¯ã³ã³ãããŒã©ãŒã«èªã¿èŸŒãé¢æ°ãè¿œå ããŸãã
- ããã©ã«ãã®è²ãšããŠçœãèšå®ããŠã衚瀺ã·ãŒãã®å§ãŸã
- é»è²ã®èšå®ã2ã€ã®ããã¹ãè¡ã®åºå
- èšå®ã¯æ¿ãç·è²ã§ãã°ã©ãã£ãã¯ããªããã£ããé·æ¹åœ¢ãã®åºåã§ãã
- çœãè²ãèšå®ããããã¹ãæååãšæ°å€ïŒçžå¯Ÿæ¹¿åºŠå€ïŒã衚瀺ãã
- èšå®ã¯æ¿ãéã§ãã°ã©ãã£ãã¯ããªããã£ããé·æ¹åœ¢ãã®åºåã§ãã
- çœãè²ãèšå®ããããã¹ãæååãšæ°åïŒæž©åºŠå€ïŒã衚瀺ãã
- é»ãããã¹ãæåååºåã®èšå®
- ã°ã©ãã£ãã¯ããªããã£ããã¹ãã¬ãŒãã©ã€ã³ãã®çµè«
- ãã£ã¹ãã¬ã€ã«ç»åãããŒããããã£ã¹ãã¬ã€ãªã¹ãã®æåŸ
void drawTimeScreen(void) { TFT.DLstart(); TFT.DL(CLEAR_COLOR_RGB(255, 255, 255)); TFT.DL(CLEAR(1, 1, 1)); TFT.DL(COLOR_RGB(0, 0, 0)); TFT.Text(11, 15, 30, 0, "Demo-project for habrahabr.ru"); TFT.Text(13, 15 + 40, 28, 0, "Using FT800 library and HYT library"); TFT.DL(COLOR_RGB(9, 40, 3)); TFT.DL(BEGIN(RECTS)); TFT.DL(VERTEX2II(11, 105, 0, 0)); TFT.DL(VERTEX2II(11 + 222, 105 + 100, 0, 0)); TFT.DL(COLOR_RGB(255, 255, 255)); TFT.Text(11 + 10, 105 + 10, 28, 0, "Relative humidity, %"); TFT.Number(11 + 10, 105 + 10 + 30, 31, 0, SENSOR.humidity); TFT.DL(COLOR_RGB(9, 3, 40)); TFT.DL(BEGIN(RECTS)); TFT.DL(VERTEX2II(11 + 222 + 14, 105, 0, 0)); TFT.DL(VERTEX2II(11 + 222 + 14 + 222, 105 + 100, 0, 0)); TFT.DL(COLOR_RGB(255, 255, 255)); TFT.Text(11 + 222 + 14 + 10, 105 + 10, 28, 0, "Temperature, C"); TFT.Number(11 + 222 + 14 + 10, 105 + 10 + 30, 31, 0, SENSOR.temperature); TFT.DL(COLOR_RGB(0, 0, 0)); TFT.Text(300, 105 + 100 + 35, 28, 0, "e-mail: xk@efo.ru"); TFT.DL(BEGIN(LINES)); TFT.DL(LINE_WIDTH(8)); TFT.DL(VERTEX2II(11, 15 + 40 + 30, 0, 0)); TFT.DL(VERTEX2II(460, 15 + 40 + 30, 0, 0)); TFT.DL(DISPLAY()); TFT.Swap(); }
ãããŠãç¶ç¶çã«ããŒã¿ãæŽæ°ããŠè¡šç€ºããŸãïŒ
int main() { while(1) { dataUpdate(); drawTimeScreen(); } }
ãããžã§ã¯ãã¯developer.mbed.orgã§å ¥æã§ããŸãã
ãããžã§ã¯ãéçºã®æ®ãã®æ®µéãšåæ§ã«ãSiLabsã®SLSTK3400AãAtmelã®ATSAMD21-XPROãWiznetã®WIZwiki-W7500Pã®3ã€ã®ç°ãªãããŒãã§çµæã®ããã°ã©ã ãå®è¡ããŸãã

ååã®èšäºã§ãTFTãã£ã¹ãã¬ã€ã«æ å ±ã衚瀺ãããã¢äŸãèŠããšãããããŒãããå¥ã®ããŒãã«åãæ¿ããå¿ èŠããããŸããã
aïŒã¿ãŒã²ãããã©ãããã©ãŒã ïŒã³ã³ãã€ã©ã®å³äžé ïŒãå€æŽããŸãã
bïŒãã£ã¹ãã¬ã€ã®æ¥ç¶ã«äœ¿çšãããçµè«ãïŒã³ãŒãã§ïŒåå²ãåœãŠãã
cïŒãã£ã¹ãã¬ã€ãæ°ããããŒãã«æ¥ç¶ããŸãã
移è¡ã¯ã¹ã ãŒãºã«é²ã¿ãmbedããã°ã©ã ã¯ããã«3ã€ã®ããŒããã¹ãŠã§æ©èœãå§ããŸããã HYTã»ã³ãµãŒãããŒãªã³ã°ããããã°ã©ã ã«ã¯ã次ã®ãã®ãå¿ èŠã§ãã
dïŒã»ã³ãµãŒã®æ¥ç¶ã«äœ¿çšãããçµè«ãïŒã³ãŒãã§ïŒåå²ãåœãŠãã
dïŒãã«ã¢ããæµæãå¿ããã«ãã»ã³ãµãŒãæ°ããããŒãã«æ¥ç¶ããŸãã
ã»ã³ãµãŒãæ¥ç¶ããããšããããã°ããŒãã®éããããããæããã«ãªãå§ããŸããã
Wiznetã¯é©ãããšãªãåäœããŸãããæšå¥šã¹ããŒã ã«åŸã£ãŠã»ã³ãµãŒãæ¥ç¶ãããã¡ãŒã ãŠã§ã¢ãããŠã³ããŒãããã ãã§ååã§ããã
SiLabsããŒãããã®ããŒã¿ã¯ãåå¥ã®æµæã䜿çšããªããŠãååŸãããŸããã å®éããã¹ãŠã®GPIOãã€ã¯ãã³ã³ãããŒã©ãŒEFM32ã«ã¯ãã«ã¢ããæµæãçµã¿èŸŒãŸããŠããããããã¹ã¯ãããIDE Simplicity Studioã§äœæ¥ããå Žåãåã©ã€ã³ã®åäœã¢ãŒãïŒãªãŒãã³ãã¬ã€ã³ããã·ã¥ãã«ãªã©ïŒã¯æåã§æ§æãããŸãã ã©ããããmbedã¯SDAãšSCLãå®è£ ãããŠããã©ã€ã³ãèªåçã«ãã«ããŸããã

ãããŠä»æ¥ãAtmelãæã匱ããªã³ã¯ã§ããããšã宣èšããŸã-ATSAMD21-XPROããŒãã§ã¯ãI2Cã€ã³ã¿ãŒãã§ã€ã¹ïŒTWIãšãåŒã°ããŸãïŒã¯ãAtmel Embedded Debuggerãåæã«äœ¿çšããåç·ã§å©çšã§ããŸãã ãã®åé¡ã詳现ã«ç解ããŠããŸããã§ããããäºå®ã¯æ®ããŸããããŒãã«USBããé»åãäŸçµŠããããšã2ã3ç§åŸã«I2CããŒã¿ã®åä¿¡ãåæ¢ããŸãã å¥ã®5.0V INã³ãã¯ã¿ã«é»æºãäŸçµŠããå Žåãããã°ã©ã å šäœãæ£ããåäœããŸãã
ãã ãããœãããŠã§ã¢ã®åäœã«ã€ããŠèŠæ ããªãã£ãããšãèªããå¿ èŠããããŸããã€ãŸããmbedã䜿çšããŠéçºãç¶ç¶ããããšãçã«ããªã£ãŠããŸãã
次ã®èšäºã§ã¯ãããã°ã©ã æ§é ã®ç°¡åãªæŠèŠãšãRiverdi TFTã¢ãžã¥ãŒã«ã§ã¿ããå ¥åãæäœããããã®è©³çŽ°ãªæé ã説æããŸãã ãããã£ãŠãç§ãã¡ã¯æ¬æ Œçãªã¢ããªã±ãŒã·ã§ã³ã«ã©ãã©ãè¿ã¥ããŠããŠããããã®åäœã¯ãããªã§å®èšŒãããŠããŸãã
ãããã«
çµè«ãšããŠãç§ã¯äŒçµ±çã«èªè ã®æ³šæã«æè¬ããHabréã«ã€ããŠæžããŠãã補åã®äœ¿çšã«é¢ãã質åã¯ãç§ã®ãããã£ãŒã«ã§æå®ãããã¡ãŒã«ã¢ãã¬ã¹ã«ãéä¿¡ã§ããããšãæãåºãããŸãã