スポンサーリンク

久しぶりにPICマイコンを使ってみました|MPLAB IDEのインストール

スポンサーリンク
スポンサーリンク
スポンサーリンク

PICマイコン

ブログを書いている人の夫です。

10年くらいPICマイコンを触っていなかったため、やり方を思い出すために秋月電子でマイコン(16F648A)を購入しました。本当は、ネットでも記事が充実している16F84Aを利用したかったのですが、思ったよりも値段が高かったので、高性能かつ内部クロックをもっており、PIN配置も同じで安いといういいことずくめだったので、16F648Aを利用しました。久々に触ってできるか不安でしたが、マイコンのデータシートみながら、試行錯誤して何とか目的(LEDの制御)は達成できました。

16F84Aを使っているときは、外部クロックを使っていたのですが、今回はセラミック発振子を取りつけるのが面倒(買うのも面倒)だったので、内部クロックを使いました。内部クロックを利用するときは、以下のように#fusesの部分にINTRCを書いてあげると使えました。(PIN_A2に接続されたスイッチを押すと、PIN_B2に接続されたLEDが5秒光るプログラム)

#include <16F648A.h>
#fuses INTRC,NOWDT,NOPROTECT,PUT,BROWNOUT,NOLVP
#use delay(clock=4000000)

void main(void){
		for(;;){
			if(input(PIN_A2)==0){
				output_bit(PIN_B2,1);
				delay_ms(5000);
				output_bit(PIN_B2,0);
				}
			else{}
			}			
		}

MPLAB IDEのダウンロードリンク

PICマイコンへプログラムするときの統合開発環境は、MPLAB X IDEを使うことが主流ですが、私が昔使っていたCCS Cコンパイラは、残念ながらMPLAB Xに対応していませんでした。

仕方なく、旧バージョンのMPLAB IDEを探したのですが、これが意外と探すのに時間がかかりました。(いろいろなサイトで紹介されているダウンロードページのリンクが、結構リンク切れを起こしているんですよね。。)

自分用の備忘録ですが、マイクロチップ社のアーカイブページへのリンクとMPLAB IDEの各バージョンの直リンクをここに残しておこうと思います。

〇マイクロチップ社のアーカイブページ:https://www.microchip.com/en-us/tools-resources/archives/mplab-ecosystem

バージョンリンク
MPLAB IDE v8.92https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_8_92.zip
MPLAB IDE v8.91https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_8_91.zip
MPLAB IDE v8.89https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_8_89.zip
MPLAB IDE v8.88https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_8_88.zip
MPLAB IDE v8.87https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_8_87.zip
MPLAB IDE v8.86https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_8_86.zip
MPLAB IDE v8.85https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_8_85.zip
MPLAB IDE v8.84https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_8_84.zip
MPLAB IDE v8.83https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_8_83.zip
MPLAB IDE v8.80https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_8_80.zip
MPLAB IDE v8.76https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_8_76.zip
MPLAB IDE v8.73ahttps://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_8_73a.zip
MPLAB IDE v8.70https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_v8_70.zip
MPLAB IDE v8.66https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_v8_66.zip
MPLAB IDE v8.63https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_v8_63.zip
MPLAB IDE v8.60https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_v8_60.zip
MPLAB IDE v8.56https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_v8_56.zip
MPLAB IDE v8.53https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_8_53.zip
MPLAB IDE v8.50https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_8_50.zip
MPLAB IDE v8.46https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_8_46.zip
MPLAB IDE v8.43https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_8_43.zip
MPLAB IDE v8.40https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_8_40.zip
MPLAB IDE v8.36https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_8_36.zip
MPLAB IDE v8.33https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_IDE_8_33.zip
MPLAB IDE v8.30https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_8.30.zip
MPLAB IDE v8.20ahttps://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_8.20a.zip
MPLAB IDE v8.15https://ww1.microchip.com/downloads/en/DeviceDoc/mplab_v815a.zip
MPLAB IDE v8.14https://ww1.microchip.com/downloads/en/DeviceDoc/MP814.zip
MPLAB IDE v8.10https://ww1.microchip.com/downloads/en/DeviceDoc/mp810.zip
MPLAB IDE v8.00https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB_v8.zip
MPLAB IDE v7.60https://ww1.microchip.com/downloads/en/DeviceDoc/mp760a.zip
MPLAB IDE v7.50https://ww1.microchip.com/downloads/en/DeviceDoc/mp750.zip
MPLAB IDE v7.40https://ww1.microchip.com/downloads/en/DeviceDoc/mp740_full.zip
MPLAB IDE v7.31https://ww1.microchip.com/downloads/en/DeviceDoc/MP731_Full.zip
MPLAB IDE v7.30https://ww1.microchip.com/downloads/en/DeviceDoc/MP730b_Full.zip
MPLAB IDE v7.20https://ww1.microchip.com/downloads/en/DeviceDoc/MP730b_Full.zip
MPLAB IDE v7.10https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB710.exe
MPLAB IDE v7.10https://ww1.microchip.com/downloads/en/DeviceDoc/MPLAB710.exe