PICKit > PIC
PIN-01 > Vpp/MCLR PIN-02 > Vdd(Target) PIN-03 > Vss(Ground) PIN-04 > PGD(ICSPDAT) PIN-05 > PGC(ICSPCLK) PIN-06 > PGM(LVP)
http://www.microchip.co.jp/download/index.php
File > New Project
Project > Microchip Embedded > Standalone Project
Device > PIC10F200
Header > None
Tool > PICkit3
Compiler > XC8
Name > LED
Encoding > UTF-8
File > New File
C > C Source File
Name > main
main.c
#include <xc.h>
#include <htc.h>
#define _XTAL_FREQ 4000000
#define DELAY_CNTS 100
void main(void) {
TRISGPIO = 0b0000 ; // GP0 = OUTPUT(0)
GPIO = 1 ;
while(1) {
GPIO = 1 ; // ON(5V)
for (int i = 0 ; i < DELAY_CNTS ; i++) {
__delay_ms(10) ;
}
GPIO = 0 ; // OFF(0V)
for (int i = 0 ; i < DELAY_CNTS ; i++) {
__delay_ms(10) ;
}
}
return ;
}
Run > Clean and Build Main Project
Output > BUILD SUCCESSFUL
File > Project Properties
PICkit3 > Power > Target from PICkit3
PICkit3 > Power > Voltage at 4.5 V (for USB)
PIN-01 > Vpp/MCLR > PIC10F200(8-PIN) PIN-02 > Vdd(Target) > PIC10F200(2-PIN) PIN-03 > Vss(Ground) > PIC10F200(7-PIN) PIN-04 > PGD(ICSPDAT) > PIC10F200(5-PIN) PIN-05 > PGC(ICSPCLK) > PIC10F200(4-PIN) PIN-06 > PGM(LVP) > None LED > GP0 > PIC10F200(5-PIN)
Make and Program Device Main Project
Caution > OK