# MicrochipのMPLAB® X IDE（パート4 LinuxでHello World）（ PIC18F16Q20 ）

**URL:** <https://forum.digikey.com/t/microchip-mplab-x-ide-4-linux-hello-world-pic18f16q20/71612>\
**Category:** 技術的なヒント\
**Tags:** microchip-technology\
**Created:** [August 27, 2026, 1:36pm UTC](https://forum.digikey.com/t/microchip-mplab-x-ide-4-linux-hello-world-pic18f16q20/71612 "2026-08-27T13:36:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tsuneharu\_Fuji](https://avatars.discourse-cdn.com/v4/letter/t/54ee81/32.png) [@Tsuneharu\_Fuji](https://forum.digikey.com/u/Tsuneharu_Fuji)\
**Post date:** [August 27, 2026, 1:36pm UTC](https://forum.digikey.com/t/microchip-mplab-x-ide-4-linux-hello-world-pic18f16q20/71612/1 "2026-08-27T13:36:59Z")

</div>

この記事の目的は、以下に示す [**PIC18F16Q20** CURIOSITY NANO](https://www.digikey.jp/ja/products/detail/microchip-technology/EV73T25A/21802913)ボード用のHello Worldプロジェクトを紹介することです。

[![image](https://global.discourse-cdn.com/digikey/original/3X/1/7/17666517af4fdf14c4a4bcee1557ee4a0db0d0e0.jpeg)](https://www.digikey.jp/ja/products/detail/microchip-technology/EV73T25A/21802913)

これらの手順に進む前に、[MPLAB X IDEに関する前回の記事](https://forum.digikey.com/t/microchip-mplab-x-ide-3-linux-6198/71607)に従って、XC8コンパイラをインストールしてください。以下のように、正しくインストールされていることを確認してください。

```auto
/opt/microchip/xc8/v3.10/bin$ ./xc8-cc --version
Microchip MPLAB XC8 C Compiler V3.10
Build date: Aug 13 2025
Copyright (C) 2025 Microchip Technology Inc

```

Linuxシステムに、このコンパイラへのパスを追加してください。Hello Worldプロジェクトの[pic18f16q20-nano-digikey-hello-world.zip](https://forum.digikey.com/uploads/short-url/5idcE9mXfDttKQ6nLJiKrrz64EN.zip)（1.2MB）をダウンロードし、任意のディレクトリに展開してください。 **main.c** ソースコードファイルを開いてください。

 ![image](https://global.discourse-cdn.com/digikey/original/3X/5/1/51b11853f2196973a75759274b7536d5372224a2.png)

このプログラムは、そのアスキーアートをUSBポート経由でホストに表示し、BLINK\_DELAYパラメータ（この場合は50ms）に応じてボード上のLEDを点滅させます。次に、そのディレクトリへ移動し、以下のようにプロジェクトをビルドします。

```auto
digikey_cofffe_cup@ make build

...
...
18F16Q20 Memory Summary:
    Program space used CA6h ( 3238) of 10000h bytes ( 4.9%)
    Data space used 58h ( 88) of 1000h bytes ( 2.1%)
    Configuration bits used Dh ( 13) of Dh words (100.0%)
    EEPROM space used 0h ( 0) of 100h bytes ( 0.0%)
    ID Location space used 0h ( 0) of 40h bytes ( 0.0%)

```

正しくビルドできたら、[**PIC18F16Q20** CURIOSITY NANO](https://www.digikey.jp/ja/products/detail/microchip-technology/EV73T25A/21802913)ボードをUSBポートに接続してください。この時点で、Linuxシステムの設定に応じて、Curiosity Nanoが自動的にマウントされ、表示されます。

 ![image](https://global.discourse-cdn.com/digikey/original/3X/4/8/4806208a99d256a48e421575f8e9e44a1f42a949.png)

minicomターミナルを開きます。

```auto
digikey_coffee_cup@ sudo minicom -D /dev/ttyACM0

Welcome to minicom 2.10

OPTIONS: I18n 
Port /dev/ttyACM0, 13:04:31 [U]

Press CTRL-A Z for help on special keys

```

[**PIC18F16Q20** CURIOSITY NANO](https://www.digikey.jp/ja/products/detail/microchip-technology/EV73T25A/21802913)ボードに **HEX** ファイルを書き込んでください  
（このHEXファイルは、プロジェクトフォルダ内の **pic18f16q20-nano-digikey-hello-world/dist/free/production** にあります）。そのフォルダから、以下の手順を行ってください。

```auto
digikey_cofffe_cup@ cp pic18f16q20-cnano-out-of-the-box-mplab-mcc.X.production.hex /media/engineer/CURIOSITY

```

minicomターミナルには、次の内容が表示されます。

 ![image](https://global.discourse-cdn.com/digikey/original/3X/2/e/2e54cf7b88dd44fa1e3b1b8df74169851c4fbcbe.png)

また、以下の動画に示すように、ボード上のLEDも点滅するはずです。

これで、このボードをLinuxで使用するHello Worldデモは完了です。[DigiKey](https://www.digikey.jp/)で入手可能な低価格評価プラットフォームの [**PIC18F16Q20** CURIOSITY NANO](https://www.digikey.jp/ja/products/detail/microchip-technology/EV73T25A/21802913)および [PIC16F13145-CNANO](https://www.digikey.jp/ja/products/detail/microchip-technology/EV06M52A/22248488)に関する次回の記事も、ぜひご覧ください。

どうぞ素晴らしい一日を！

この記事はスペイン語で[こちら](https://forum.digikey.com/t/microchip-mplab-x-ide-parte-4-hello-world-en-linux-pic18f16q20/69343)からご覧いただけます。

Este artículo está disponible en español [aquí.](https://forum.digikey.com/t/microchip-mplab-x-ide-parte-4-hello-world-en-linux-pic18f16q20/69343)

[オリジナル・ソース（English）](https://forum.digikey.com/t/microchip-mplab-x-ide-part-4-hello-world-in-linux-pic18f16q20/69235)
