ãã¾ããPICãããã¦AVRã«ç§»è¡ãã¹ã10ã®çç±
é»åå·¥ä½ç¨ã®ãæ軽ãªã¯ã³ããããã¤ã³ã³ã¨è¨ãã°ãAVRã¨PICã§ãããæ°å¹´åãå½å
ã§ã¯PICã®ã»ããæ¥æ¬èªã§ã®æ
å ±ãå¤ããå½å
ã§ã®å
¥ææ§ãè¯ãã£ãã®ã§PICã°ãããæ®åãããPICæ¬ã§æåãªå¾éããã®å績ã大ããã ããã
ã ãããã¾ããå§ãããªãééããªãPICã§ã¯ãªãAVRã«ããã¹ãã ãããå¤æ®µçã«ãPICã¨å¤§å·®ãªãããå½å ã§ãAVRãã¤ã³ã³ãããç¨åº¦èª¿éã§ããããã«ãªã£ã¦ããã
ã§ã¯ããã¾PICããã£ã¦ãã人ã¯AVRã«ç§»ãã¹ããï¼
è¿·ã£ã¦ãã人ã®ããã«ãããã¾ããPICãããã¦AVRã«ç§»è¡ãã¹ã10ã®çç±ãã¨ããã®ãæ¸ãã¦ã¿ãã
1) AVRãªããã»ã¨ãã©ã®ã¢ãã«ã§Cã§éçºãããã¨ãã§ããããã¡ãããããªã¼ã®ç°å¢ã(AVRStudio + WinAVR)
PICã®ä¸ä½ã¢ãã«éå®ã®ããã«60æ¥ããããæé©åã¬ãã«ãä¸ããã©ã£ãã®ä½é¨ç(?)ã®Cã¨ã¯å¤§éãã
2) AVRã®ã¢ã»ã³ãã©ã¯PICã»ã©å¤æ ãªã¢ã¼ããã¯ãã£ãããªãã
AVRã¯ã¬ã¸ã¹ã¿ãå¤ããç´äº¤æ§ã«ãåªãã¦ããã
3) AVRã®ã©ã¤ã¿ã¯100åãããã§ä½ããã*1 ã»ã¨ãã©ã®AVRã«æ¸ãè¾¼ã¿å¯è½ã
æ°ããããã¤ã¹ã«ã©ã¤ã¿ã対å¿ãã¦ããå¿é ããªããç³ãé¸ã°ãªãã¦ã¯ãããªãPICã¨ã¯å¤§éããæ¸ãè¾¼ãã¨ãã«PICã®ããã«é«é»å§(12V)ããããªãã¦è¯ãã®ã大ããã
4) AVRã©ã¤ã¿ã®å®æåãè²·ãã¨ãã¦ããã¸ããã§USBæ¥ç¶ã®ã2100åãé»æºä¸è¦ã
æ°ããããã¤ã¹ã«å ¨ã対å¿ããªãããã«å¤é¨é»æºãå¿ è¦ã§USBã§æ¸ãè¾¼ããã¨ããã¨å¥éUSB-ã·ãªã¢ã«å¤æå¨ã®å¿ è¦ãªç§æã®è ã£ãPICã©ã¤ã¿ã¨ã¯å¤§éãã
5) ç§æã«ATmega88 , ATmega164 , ATmega644ã®DIPãå ¥è·ãããã
ATmega644ã¯64KBã¨ä½è£ã®å¤§å®¹éã40pin(I/O 32pin) 550åã
AVRã¯è¿å¹´ãå
±ç«é»åãªã©ã§ãæ±ãããã«ãªã£ã¦ããã
6) AVRã¯1ã¯ããã¯ã§1å½ä»¤å®è¡ããã
PICã¯ããã¦ã4ã¯ããã¯ã§1å½ä»¤ããå®è¡ã§ããªãããã¾ãã«ã¬ã¸ã¹ã¿ã«ç´äº¤æ§ããªãã®ã§Cã§çæãããã³ã¼ãã¯å¹çã®æªããã®ã«ãªã£ã¦ãããåä¸ã¯ããã¯ã§åä½ããPICã¨AVRã¨ãæ¯è¼ããã¨ã5ã8åãããå¦çé度ãéãã
7) AVRã¯I/Oã«å¯¾ãã¦å®å ¨ãª read - modify - writeãåºæ¥ãã
AVRã«ã¯I/Oã®ç¹å®ã®ãããã ããset / resetããå½ä»¤ããããPICã§ã¯ãããåºæ¥ãªãã
PICã¯åºåã¬ã¸ã¹ã¿ã®ç¶æ ã¯ãã³ããèªãããã«ä½ããã¦ããã
ä¾ãã°ãPICã§ãRA4ã«LEDãã¶ãä¸ãã¦LEDãç¹ç¯ããããã¨ãèãããRA4ã¯ãªã¼ãã³ãã¬ã¤ã³ã§ãããLEDã®æ¶è²»é»åãæãããã1.5Vã®é»æºãLEDã®ã¢ãã¼ãã«æµæãä»ãã¦æ¥ç¶ãã¦ããã¨ããã
ãã¾ãLEDãOFF(RA4ã«'1'ãæ¸ãåºã)ã«ãããã¨ãRA0ãã¼ãã'0'ã«ãããã¨ãèããããã¼ãã®å 容ãèªã¿è¾¼ã¿ããã®ãã¼ã¿ã«ä¿®æ£ãå ãã¦ãã¼ãã«æ¸ãåºãã®ã ããRA4ãã¼ãã¯LEDã®é»æºãä½ã(1.5V)ã®ã§èªã¿è¾¼ãã¨'0'ã«ãªãã
ãã®ãããRA0ã®å¤æ´ã®ããã«RAãã¼ãã¾ããã¨èªã¿è¾¼ã¿ãRA0ã®bitã ãæ¸ãæãã¦RAãã¼ãã«æ¸ãåºãã¨ãRA4ã®å 容ã¾ã§å¤æ´ãã¦ãã¾ããPICã®BCF/BSTã¯ããããåä½ã«ãªã£ã¦ããã(åè : AVRãã¤ã³ã³ã»ãªãã¡ã¬ã³ã¹ã»ããã¯âAVRã®CPUã¢ã¼ããã¯ãã£ãè±å¯ãªå èµå¨è¾ºæ©è½ã詳細解説 (ãã¤ã³ã³æ´»ç¨ã·ãªã¼ãº))
ãã®ããã«ãread - modify - writeå½ä»¤ãç¨æããã¦ããªãPICã¯ããã°ã©ãã³ã°ãä½ãã¨é¢åã§ããã*2
8) AVRãæ¥æ¬èªã®è³æãå å®ãã¦ãã
ãã®ããã«AVRã®ã»ããåªãã¦ãããã¨ã¯çãããã®ãªãäºå®ã ããæ¥æ¬èªã®è³æãä¸è¶³ãã¦ãããã¨ãé·ããåé¡ã§ãã£ãã è¿å¹´ããã¼ã¿ã·ã¼ããæ¥æ¬èªã«ç¿»è¨³ãã¦ãã人*3ãç¾ããããAVRãæ±ã£ãæ¸ç±ãåºã¦ãããAVRã®æ¥æ¬èªwiki*4ãå å®ãã¦ããã |
9) æµ·å¤ã§ã¯AVRã®ã»ããå¢ãããã
æµ·å¤ã§ã¯PICããAVRã®ã»ãã(趣å³ã®é»åå·¥ä½ãªã©ã«ã¯)ãã使ããã¦ããããã®åãæµ·å¤ã§ã¯AVRã®ã»ããæ å ±ãå¤ãã
10) JTAGICE mkII ã® cloneãå®ã
id:yaneurao:20080226ã§æ¸ããããã«AVRã®JTAGICE mkIIã®cloneã$49.95ã§è²·ããã
Cã§æ¸ããããã°ã©ã ãICEã§ãããã°ã¨ãããããªãã¨ãAVRãªãããããªåºè²»ã ãã§å¯è½ã ãJTAGICE mkIIã¯ãPICã®ICD2ããå¼·åã§è¿ éãªãããã°ãåºæ¥ãã¨è©å¤ã ã
â ãé¢é£è¨äº
PICãå©ãå£ãã¦ããããã»ã©æããã17ã®çç±
http://d.hatena.ne.jp/yaneurao/20080723
*1:http://elm-chan.org/works/avrx/report.html
*2:PIC18F以éã¯LATxã¬ã¸ã¹ã¿ãããããããã®åé¡ã¯èµ·ããªãã