2012å¹´11æ14æ¥ ãå¾ ãããã¾ããã£ï¼SOP8ãã³ã®USB-ã·ãªã¢ã«å¤æICãå ¥è·ï¼ ãã©ã³ã¸ã¹ã¿æè¡ã®ä»é²ãªã©ã§ã®ãåãåãããå¤ãã£ãã SOP8ãã³ããã±ã¼ã¸ã®USB-ã·ãªã¢ã«å¤æICãPL2303SAããã¨ãã¨ãå ¥è·ãã¾ããï¼ â Prolific PL2303SA USB-ã·ãªã¢ã«å¤æIC è²©å£²ä¾¡æ ¼:150å ã»ã¼TX/RXã®ã¿ã®æå°éã®æ§æã§ä½ãããå¤æICã§ãå¨è¾ºé¨åãã·ã³ãã«ã«è£½ä½ãå¯è½ã§ãã ããã±ã¼ã¸:SOP8ãã³(1.27mmããã) é»æºé»å§:DC5V I/Oé»å§:1.8ã3.3V ãªããªãæã«å ¥ããããããããã¦ããæ¹ãããã£ããã£ãã¨æãã¾ãããããã§ã²ã¨å®å¿ã§ãããã¾ãã ãªããªãICåä½ã§æã«å ¥ããªãã¦å°ã£ã¦ããæ¹ãæ¯éãæ¤è¨ãã ããï¼ <æ å½:å ¥æ±> å ±ç«ã¨ã¬ã·ã§ããã«ãç»é²ãã¾ããã®ã§ãé販ãå¸æã®æ¹ã¯ ãå©ç¨ãã ããã USB-ã·ãªã¢ã«ããªãã¸ã³ã³
ä¹ ãã¶ãã«XMEGAã«ã¤ãã¦ã§ãã ä»åã¯ãUARTï¼USARTï¼ã¨EBIã試ãã¦ã¿ã¾ããã ä¸å¿è©¦ãã¦ããåè·¯ã®å ¨ä½åã§ãã XMEGAã«ç§æ300å液æ¶ã¨SRAMï¼CY62128EV30ï¼ãæ¥ç¶ãã¦ãã¾ãã SRAMãã¤ãªããã¨ã«ãã£ã¦ãä»ã¾ã§ã¯FLASHä¸ã«å®æ°é ç½®ãã¦ãã ã¤ã¡ã¼ã¸ãã¼ã¿ãSRAMã«ç½®ããã¨ãã§ããããã«ãªãã®ã§ã èªã¿åºãé度ã®åä¸ï¼çµæçã«ã¯SRAMã45nsãªã®ã§ãã¾ãåä¸ããªãã£ãï¼ã¨ ä½ãããã®æ¹æ³ã§å¤é¨ããã¤ã¡ã¼ã¸ãã¼ã¿ã転éãã¦SRAMã«æ ¼ç´ãã 表示ãããã¨ãã§ããããã«ãªãã¾ãã SRAMã¯Eagleã«ã¦å¤æåºæ¿ãè¨è¨ããå¦æ ¡ã®åºæ¿å å·¥æ©ã§åã£ã¦å®è£ ãã¦ãã¾ãã 以åã«ãå°ãæ¸ããè¦ããããã¾ããã XMEGAã§ã¯ã¤ãã«ã©ããã使ããã¨ãªããã¹ãåºããããã«ããªãã¾ããã»ã»ã»ãã ä»ã®æXMEGAã®ã·ãªã¼ãºã§ç©ççã«PORTLãåå¨ããªãã®ã§ã©ãã
UART(Universal Asynchronous Receiver Transmitter)(ã¦ã¼ã¢ã¼ã)ãããã¹ã¦ã¿ãã¨ãããã½ã³ã³ã®ã·ãªã¢ã«ãã¼ããªã©ã«ä½¿ãããéä¿¡åè·¯ã§ãã³ã³ãã¥ã¼ã¿ããéããã¦ãããã©ã¬ã«ä¿¡å·ãã·ãªã¢ã«ä¿¡å·ã«å¤æããããå¨è¾ºæ©å¨ããéããã¦ããã·ãªã¢ã«ä¿¡å·ããã©ã¬ã«ä¿¡å·ã«å¤æããããããã¨ããã¾ãã ã¤ã³ãã¢ãã¬ã¼ã³é¢é£ã§UARTã使ãæ©ä¼ãããã®ãã©ãããããã¾ããããã¨ããããåä½ãã¹ãã ããã¦ãããã¨æããã¡ãã®ããã°ã©ã ãåèã«ããã¦ããã ãã¾ããã ãã¼ãPCã«ã¯RS232Cãã¼ãããªãã®ã§ã以åç§æé»åã§è²·ã£ãUSBã»ã·ãªã¢ã«å¤æã±ã¼ãã«ã使ããã¨ã«ãã¾ããããã£ããVistaã®USBãã¼ãã«æ¥ç¶ããã¨ãããã©ã¤ããè¦ã¤ãããªãã¨ãããã¨ã§ããã¡ãããVistaç¨ã®ãã©ã¤ãããã¦ã³ãã¼ããã¦ã¤ã³ã¹ãã¼ã«ãã¾ãããåé¡ãªãCOMãã¼ãã¨ãã¦èªèããã
ATmega168ã¨ATmega8 å é±ãã«ãã§è²·ã£ãATmega168ã¨ããAtmel社ã®AVRãã¤ã³ã³ããåä½ãã§ãã¯ããã ããããç§æã®éããæ£ã«å¨åº«ç¡ãã£ãã®ã§ãè¨ã£ããä»åºèããåãå¯ãã¦ãããã â ATmega8âATmega168 ATmega168ã¯ATmega8系統ã®ãã³ã³ã³ãã(28pin)ã®ä¸ä½çãATmega8->ATmega48->ATmega88->ATmega168ã¨ããé åã HERO'S Downloadã®ãã¼ã¿ã·ã¼ã翻訳çããã£ã¨è¦ãéãã¯ä»¥ä¸ã®éãã ã»Flashã¡ã¢ãªã®å®¹éã2å ã»å ¨ã¦ã®ãã³ã«å¤é¨å ¥åå²ãè¾¼ã¿ãä»ãã ã»PWMã6ã¤ãã ã»ããã¤ãã®ã¬ã¸ã¹ã¿ã®ååãå¤ãã£ã 28ãã³ã¨ãããµã¤ãºã¨ãã®æ©è½ã俺ãã®ç¨éã«çµ¶å¦ãªã®ã§ãAT90S4433ã®é ãããã£ã¨ä½¿ã£ã¦ãããæè¿ã®ArduinoãATmega168ç¨ã®ãã¼ããã¼ãã
ATmega168ã§ADã³ã³ãã¼ã¿ã試ããã CdSï¼å éã»ã³ãµï¼ã¨10kΩã®æµæã使ã£ãã ADC0ã§ADå¤æããå¤ãæååã«å¤æãã¦ãUARTã§PCã«éã ADC0ã®å¤ã700以ä¸ã®æãLEDãç¹ç¯ãããã700以ä¸ã ã£ããæ¶ç¯ããã åãã¦ããã¨ãã â ã³ã¼ã SourceCode, hex, Makefile(avr-gcc 3.4.6) ADå¤æã®æºåã®adc_init()ãå®éã«ADå¤æãè¡ãªãå¤ï¼intï¼ãåãadc_convert(int pin)ãUSARTã§æååãéãé¢æ° usart_sendStr()ãintãStringã«å¤æããintToStr(int, buf)ãä½ã£ãã s.h.log: Arduino - UARTãLEDãADå¤æã試ããã§ãæ¸ããã ã·ãªã¢ã«éä¿¡ã§éä¿¡ã§ããã®ã¯8bitã¾ã§ãADå¤ã¯10bitã ãªã®ã§ããã®ã¾ã¾Serial
æ¨æ¥å±ããArduinoï¼å³ï¼ åãåã£ã¦1æéã§éæ»ã§åä½ãã§ãã¯ããã å·¦ã¯Wiringã Wiringã¯çµæ§ä½¿ã£ãäºããããproce55ingã®æ§ã«æ軽ã«é»åå·¥ä½ããã¹ã±ãããã§ãããé£ããCè¨èªã¨ããæ¸ããªãã¦ãç°¡åã«èµ¤å¤ç·ããµã¼ãã®å¶å¾¡ãã§ããããããã¼ã«ãæè¿ãavr-libcãªã©ã®ãããã¼ã¬ãã«ãªã©ã¤ãã©ãªãèªã¿è¾¼ãäºãã§ããããã«ãªã£ã¦é¢ç½ãã ãã ãã16bitã¿ã¤ã2ã¤ã¨8bitã¿ã¤ã1ã¤ãWiringã«å æããã¦ããã®ã§ãã¿ã¤ãå¦çï¼ã¹ã¬ããã®æ§ãªãã®ï¼ã使ããªããã¾ããå¤é¨å ¥åãUSARTåä¿¡ãªã©å ¨ã¦ã®å²ãè¾¼ã¿ã使ããªãã®ã§ã1ã¤ã®loop()ã¡ã½ããã®ä¸ã§å ¨ã¦ãå¦çããªããã°ãªããªããªããä¾ãã°ãdelay()ã§åæ¢ä¸ã«ã»ã³ãµããã®å ¥åããã£ã¦ãåãåããã¨ãã§ããªãã®ãå¼±ç¹ããã ãããããæã¯CPUãå¢ããï¼Wiring/Arudinoã2ã¤ä½¿ãï¼ã¨ãã
åå¹´åã«ACA302ã¨ããå é度ã»ã³ãµã試ããããç§æé»åã§æã«å ¥ããªããªã£ãï¼åãæ±ãåãACA302ããACB302ã«ãªã£ãï¼ã®ã§ã樹ã«è¦ããããKXM52-1050ã¢ã¸ã¥ã¼ã«ã試ãã¦ã¿ãã ACA302ã¯3.3Vãä½ããªããã°ãªããªãã£ãããKXM52ã®åä½é»å§ã¯2.7ï½5.5Vãã®ã¾ã¾ã§åããããã¤ãºãå ¨ç¶ç¡ãã®ã«ACB302ãã200åå®ããæ度ã6åã§ããæããPileus2å·æ©ã«æ¡ç¨ããäºå®ã ããããã°æè¿ACB302ã¯2000åãã1000åã«å¤ä¸ãã«ãªã£ããã©ã â ã¨ããããåããã¦ã¿ã SourceCode, hex, Makefile(avr-gcc 3.4.6) ATmega168ã®ADC0,1,2ã§X,Y,Z軸ã®åºåå¤ãADå¤æããæååã«å¤æãã¦UARTã§PCã«éã£ã¦ããã x,y軸ã®å¤ã¯é常520ãããã§ãå¾ããã¨730ï½300ãããã®éã§å¤ãããã
ä»åã®å宿ã®ã¢ã¸ã¥ã¼ã«å·¥æ¿ã«åãã¦ãããã¨ãã¦ãããã¨ã¯ã ã¦ã§ãããã天æ°æ å ±ãæã£ã¦ãã¦ã ææ¥ã®å¤©æ°ãæ´ãã ã£ããLEDã赤ãå ãããé¨ã ã£ããéãå ããã ã¦ãã¦ãå主ãã¤ãããã¿ãããªæãã WebServiceã ã¨ããPerlã ã¨ãã¯ç¿ããã®ããã°â â¡â¢ãåç §ã ããã§ã¯ãXPortã¨Arduinoãã¤ãªãã¦ã¿ã¾ããã XPortã¨UART-RS232Cå¤æå¨ãã¤ãªãã ã¨ãã¨åæ§ã«ã XPortã¨Arduinoãã¤ãªãã¾ãã LEDãæ´ãã»ãããã»é¨ã«åããã¦ï¼è²ç¨æããã¤ãªãã§ããã¾ãã UARTã§éä¿¡ãããæåã«ãã£ã¦ç¹æ» ããLEDãå¤ããããã«ãã¾ããã "s"ã¨éããã¦ããã赤ã®LEDã "c"ã¨éããã¦ãããé»è²ã®LEDã "r"ã¨éããã¦ãããç·ã®LEDãå ãã¾ãã 以ä¸ã¯Arduinoã®ã½ã¼ã¹ ï¼ç¿ããã®éå»ã®ããã°ãåç §ãã¾ããï¼ ***************
ç¿ããã®ããã°ã«ãæ¸ãã¦ããã¾ããã XPortãEthernet-UARTã³ã³ãã¼ã¿ã¨ãã¦ä½¿ãè¨å®ããã¾ããã 復ç¿ãã¦ãã¾ã¨ãã¦ã¿ã¾ãã XPortã¨ADM3202ã§èªä½ããUART-RS232Cå¤æå¨ãã¤ãªãã ï¼INãOUTãããããã¤ãªãã¾ãï¼ UART-RS232Cå¤æå¨ããã½ã³ã³ã®ã·ãªã¢ã«ãã¼ãã¨ã¤ãªãã¾ãã â»Arduinoããã¯é»æºãããã£ã¦ãã ãã§ãã âXPortã®è¨å® â XPortã®Webè¨å®ç»é¢ãéãããSerial Settingsããã¯ãªãã¯ãã Baud Rateãã9600bpsããData Bitsãã8bitãã«è¨å®ãããOKããã¯ãªãã¯ãã¾ãã â¡æ¬¡ã«ãConnectionããã¯ãªãã¯ããLocal Portãã50001ãã«è¨å®ãã ãOKããã¯ãªãã¯ãã¾ãã ï¼50000çªä»¥éã¯ã¦ã¼ã¶ã¼ãèªç±ã«ä½¿ã£ã¦ãããã¼ããããï¼ â¢ãApply Setti
2006å¹´11æ30æ¥ PSoC ã·ãªã¢ã«éä¿¡ (2) ã«ãã´ãªï¼ã«ãã´ãªæªåé¡ PSoC ã®ã·ãªã¢ã«éä¿¡ã¯åæ¹åã®UARTã¢ã¸ã¥ã¼ã«ã¨åä¿¡ã®RX8ã¨éä¿¡ã®TX8ããããã©ã¡ãã使ã£ãããããã ãã¼ãã¨ããããéä¿¡åä¿¡ãã§ããã°ããã®ã§UARTã使ãã㪠åä¿¡ã¯åããã¼ãããªãããã«å²ãè¾¼ã¿åä¿¡ãã§ããããã«UART setupã¨æå¾ã«å ¨ä½ã®å²ãè¾¼ã¿è¨±å¯ããã //UART setup UART_1_CmdReset();                     ãããããã//Initialize receiver/cmd buf. UART_1_IntCntl(UART_1_ENABLE_RX_INT);  //Enable RX interrupts UART_1_Start(UART_1_PARITY_NONE);      ã//Enable UART //CPU ALL
2006å¹´12æ08æ¥ PSoC UART Binary åä¿¡å²ã込㿠(7) ã«ãã´ãªï¼ã«ãã´ãªæªåé¡ PSoCã®UARTã¯åä¿¡å²ãè¾¼ã¿ã®è¨±å¯ UART_1_IntCntl(UART_1X_INT); //Enable RX interrupts ãè¡ãã¨ãã¤ããªã¼ã®åä¿¡å²ãè¾¼ã¿ãã§ããªããã§ãã UART_1_bCmdLength() ã§åä¿¡æ°ãå¾ã¦ UART_1_szGetParam()ã§åä¿¡æ°åãã¼ã¿ãå¾ããã¨ãã§ãã¾ãããã㦠UART_1_CmdReset()ã§åæã®ç¶æ ã«ãå度ãã®æ¹æ³ã§ç¹°ãè¿ãã¨åä¿¡å 容ã®ãã¼ã¿ãééã£ã¦ãã¾ããã ãããã¤ããªã¼ã®åä¿¡ã¯å²ãè¾¼ã¿è¨±å¯ã§å²ãè¾¼ã¿ã®åä¿¡ãã§ããªããã§ãããªãã¨ãè¯ãæ¹æ³ã¯ãªããã¨æãåä¿¡å²ãè¾¼ã¿ãï¼£è¨èªã ãã§å¦çãããã¨ã«ãã¾ããã #include <m8c.h>       //part specific constants
2006å¹´11æ26æ¥ PSoC UART RS-232Céä¿¡ã¨åä¿¡ ã«ãã´ãªï¼ã«ãã´ãªæªåé¡ PSoCåºæ¿ã®UART(RS-232C)ã®éä¿¡ã¨åä¿¡ã®å®é¨ãããã¹ããããªã¼ã»ãªããã¯ã¹ç¤¾ã®åºæ¿ã®åçã§ãã UART Module ã®é ç·å³ã§ããåä¿¡å ¥åã¯P0-0 éä¿¡åºåã¯P0-1ã§è¡ãã¾ããããã¼ãã®å¶ç´ã¯ããã¾ããã ã°ãã¼ãã«ãªã½ã¼ã¹ã®å 容ã§ããéä¿¡é度ã38400bpsã«è¨å®ãã¾ãããï½ï½ï½ï¼24MHz/6/13/8ã®è¨å®ã§ãPSoCã®éä¿¡é度ã®åæ°ã¯ï¼åã§ããè¨ç®çµæã¯384615ã«ãªã誤差ã¯1.6%ã¨ãªãã¾ãã1.6%ã®èª¤å·®ç¯å²ã¯éä¿¡ã«ã¯åé¡ãªãããã§ãã UARTã®ã¢ã¸ã¥ã¼ã«ã®ãã©ã¡ã¿ã¼ã®å 容ã§ãã command terminator = 13ã®å 容ã¯CR(0Dh)ã§åä¿¡ã³ãã³ããå¦çãã¦ããããã§ããããã¹ãã³ã¼ãã®ãããã³ã«ã§ä½¿ç¨ããã°ä¾¿å©ããããã¾ããã 以ä¸ãããã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}