19
PIC18F Programming with MPLAB C Compiler ภภภภภภภ ภ. ภภภภภภภภภภ MPLAB ภภภ MPLAB C18 1. ภภภภภภภภภภ MPLAB ภภภ MPLAB C18 Compiler ผผผผผผผผผผผผผผผผผผผผผผผผผผผผผผผผผผ MPLAB ผผผ MPLAB C18 Compiler ผผผผผผผผผผผผผผผผ ผผผผผผผผ www.microchip.com ผผผผผผผผผผผผผ ผผผผผผผผผผผ MPLAB ผผผ MPLAB C18 Compiler ผผ ผผผผผผ 1.1 ภภภภภภภ MPLAB IDE 1. ผผผผผผผผผผผผผผผผ Install_MPLAB_v8.36.exe (ผผผผผผผผผผผผผผผ ผผผผผผผ) ผผผผผผผผผผผผผผผผผผผผผผผผผผผผผผผ ผผผผผผผผผผผผผผผผผผ ผผผผผผผผผ 1.1 ผผผผ ผผผผผผผผผผผ Next

PIC18F Programming With MPLAB C Compiler

Embed Size (px)

Citation preview

Page 1: PIC18F Programming With MPLAB C Compiler

PIC18F Programming with MPLAB C Compiler

ภาคผนวก ก. การติ�ดติ �ง MPLAB และ MPLAB C18

1. การติ�ดติ �ง MPLAB และ MPLAB C18 Compiler ผู้��อ่�านสามารถที่ �จะดาวน�โหลดโปรแกรม MPLAB และ MPLAB

C18 Compiler ได�โดยตรงผู้�านที่างเว บไซต� www.microchip.com ขั้$%นตอ่นการต&ดต$%งโปรแกรม MPLAB

และ MPLAB C18 Compiler ม ด$งน % 1.1 ติ�ดติ �ง MPLAB IDE

1.คล&กเร ยกโปรแกรม Install_MPLAB_v8.36.exe (หร(อ่เวอ่ร�ชั$นที่ �ส�งกว�า) หล$งจากที่ �เร ยกโปรแกรมแล�วจะได�หน�าต�างการต&ดต$%ง ด$งร�ปที่ � 1.1 คล&กป*+มค,าส$ �ง Next

Page 2: PIC18F Programming With MPLAB C Compiler

ร�ปที่�� 1.1 ไดอ่ะล อ่ก MPLAB Tools 8.36 เร&�มต�นการต&ดต$%งโปรแกรม

2.คล&กเล(อ่กป*+มอ่อ่ปชั$น “I accept..” คล&กป*+มค,าส$ �ง Next ด$งร�ปที่ � 1.2

PIC18F Programming with MPLAB C Compiler

Page 3: PIC18F Programming With MPLAB C Compiler

ร�ปที่�� 1.2 ไดอ่ะล อ่กแสดงรายละเอ่ ยด License Agreement

3.คล&กเล(อ่กป*+มอ่อ่ปชั$นเล(อ่กร�ปแบบการต&ดต$%ง ผู้��อ่�านสามารถที่ �จะเล(อ่ก Complete เพื่(�อ่ต&ดต$%งโปรแกรมที่ �ม มาพื่ร�อ่มก$บ MPLAB Tools ที่$%งหมดหร(อ่เล(อ่ก Custom เพื่(�อ่เล(อ่ก

โปรแกรมที่ �จะต&ดต$%งด�วยตนเอ่ง (แนะน,าให�เล(อ่กแบบ Complete) คล&กป*+มค,าส$ �ง Next ด$งร�ปที่ � 1.3

Page 4: PIC18F Programming With MPLAB C Compiler

ร�ปที่�� 1.3 เล(อ่กร�ปแบบการต&ดต$%งแบบ Complete

4.ก,าหนดโฟลเดอ่ร�ขั้อ่งโปรแกรมที่ �จะที่,าการต&ดต$%ง คล&กป*+มค,าส$ �ง Next ด$งร�ปที่ � 1.4

Page 5: PIC18F Programming With MPLAB C Compiler

PIC18F Programming with MPLAB C Compiler

ร�ปที่�� 1.4 ก,าหนดการต&ดต$%งไปที่ � C:\Program Files\Microchip\

5. คล&กเล(อ่กป*+มอ่อ่ปชั$น “I accept..” คล&กป*+มค,าส$ �ง Next ด$งร�ปที่ � 1.5

Page 6: PIC18F Programming With MPLAB C Compiler

ร�ปที่�� 1.5 แสดงรายละเอ่ ยดโปรแกรม Maestro License

5.คล&กเล(อ่กป*+มอ่อ่ปชั$น “I accept..” คล&กป*+มค,าส$ �ง Next ด$งร�ปที่ � 1.6 (MPLAB IDE เวอ่ร�ชั$นใหม� ๆ จะร�วม MPLAB

C32 Compiler (ส,าหร$บไมโครคอ่นโที่รลเลอ่ร� PIC32)มาให�พื่ร�อ่มก$บต$ว MPLAB IDE)

Page 7: PIC18F Programming With MPLAB C Compiler

PIC18F Programming with MPLAB C Compiler

ร�ปที่�� 1.6 แสดงรายละเอ่ ยด MPLAB C32 License

6.แสดงรายละเอ่ ยดขั้อ่งโปรแกรมที่ �จะถ�กต&ดต$%ง คล&กป*+มค,าส$ �ง Next ด$งร�ปที่ � 1.7

Page 8: PIC18F Programming With MPLAB C Compiler

ร�ปที่�� 1.7 รายละเอ่ ยดโปรแกรมที่ �จะถ�กต&ดต$%ง

8. เร&�มต�นการต&ดต$%งโปรแกรม แสดงด$งร�ปที่ � 1.8

PIC18F Programming with MPLAB C Compiler

Page 9: PIC18F Programming With MPLAB C Compiler

ร�ปที่�� 1.8 ก,าล$งด,าเน&นการต&ดต$%งโปรแกรม

9. แสดงไดอ่ะล อ่กแจ�งว�าจะต&ดต$%งโปรแกรม HI-TECH C หร(อ่ไม� ให�คล&กป*+มค,าส$ �ง No ด$งร�ปที่ � 1.9

ร�ปที่�� 1.9 โปรแกรม HI-TECH C

Page 10: PIC18F Programming With MPLAB C Compiler

10. การต&ดต$%งเสร จสมบ�รณ์� แสดงด$งร�ปที่ � 1.10 หากต�อ่งการบ�ตเคร(�อ่งใหม� คล&กป*+มค,าส$ �ง Finish หากไม�ต�อ่งการบ�ตเคร(�อ่ง ให�คล&กเล(อ่กป*+มอ่อ่ปชั$น “No…” ก�อ่น แล�วจ2งคล&กป*+มค,าส$ �ง Finish

ร�ปที่�� 1.10 แสดงการต&ดต$%งโปรแกรมเสร จสมบ�รณ์�

PIC18F Programming with MPLAB C Compiler

หล$งจากที่ �ได�ต&ดต$%งโปรแกรม MPLAB Tools เสร จแล�ว ในขั้$%นตอ่นต�อ่ไปจะต&ดต$%งโปรแกรม MPLAB C18 Compiler หร(อ่ MPLAB C18

Page 11: PIC18F Programming With MPLAB C Compiler

1.2 ติ�ดติ �ง MPLAB C18 Compiler

1. แตกไฟล� MPLAB-C18-Std-Eval-v3_35.zip คล&กเร ยกโปรแกรม MPLAB-C18-Std-Eval-v3_35.exe (หร(อ่เวอ่ร�ชั$นที่ �ส�งกว�า) หล$งจากที่ �เร ยกโปรแกรมแล�วจะได�หน�าต�างการต&ดต$%ง ด$งร�ปที่ � 1.11

ร�ปที่�� 1.11 แสดงรายละเอ่ ยดเวอ่ร�ชั$น MPLAB C18 Standard Evaluation

2. คล&กเล(อ่กป*+มอ่อ่ปชั$น “I Accept” คล&กป*+มค,าส$ �ง Next ด$งร�ปที่ � 1.12

Page 12: PIC18F Programming With MPLAB C Compiler

ร�ปที่�� 1.12 แสดงรายละเอ่ ยด License Agreement

PIC18F Programming with MPLAB C Compiler

3. แสดงโฟลเดอ่ร�ที่ �โปรแกรมจะถ�กต&ดต$%ง คล&กป*+มค,าส$ �ง Next

ด$งร�ปที่ � 1.13

Page 13: PIC18F Programming With MPLAB C Compiler

ร�ปที่�� 1.13 โฟลเดอ่ร�ที่ �โปรแกรมจะถ�กต&ดต$%ง

4. แสดงรายละเอ่ ยดขั้อ่งไฟล�ที่ �จะต&ดต$%ง คล&กป*+มค,าส$ �ง Next ด$งร�ปที่ � 1.14

Page 14: PIC18F Programming With MPLAB C Compiler

ร�ปที่�� 1.14 แสดงรายละเอ่ ยดไฟล�ที่ �จะต&ดต$%ง

5. คล&กเชั คบ อ่กซ�ที่$ %งหมด คล&กป*+มค,าส$ �ง Next ด$งร�ปที่ � 1.15

และ 1.16

Page 15: PIC18F Programming With MPLAB C Compiler

PIC18F Programming with MPLAB C Co

ร�ปที่�� 1.15 ก,าหนดรายละเอ่ ยดขั้อ่ง PATH ไฟล�

Page 16: PIC18F Programming With MPLAB C Compiler

ร�ปที่�� 1.16 ปร$บปร*งโปรแกรม MPLAB ให�ใชั�งาน MPLAB C18

7.เร&�มต�นต&ดต$%งโปรแกรม MPLAB C18 Compiler คล&กป*+มค,าส$ �ง Next ด$งร�ปที่ � 1.17 และ 1.18

Page 17: PIC18F Programming With MPLAB C Compiler

ร�ปที่�� 1.17 แสดงการเร&�มต�นต&ดต$%งโปรแกรม

PIC18F Programming with MPLAB C Compiler

ร�ปที่�� 1.18 ก,าล$งด,าเน&นการต&ดต$%งโปรแกรม

Page 18: PIC18F Programming With MPLAB C Compiler

7. การต&ดต$%งโปรแกรมเสร จสมบ�รณ์� คล&กป*+มค,าส$ �ง Finish ด$งร�ปที่ � 1.19

ร�ปที่�� 1.19 การต&ดต$%งโปรแกรมเสร จสมบ�รณ์�

--APPSOFTTECH--

Page 19: PIC18F Programming With MPLAB C Compiler