PIC

PICKit > PIC

  • ピン番号は上から見てマークから半時計回り
  • Vpp/Vdd の間は 4.7-10.0 kOhm の抵抗で接続
  • 別に外部電源が確保できるならば Vdd に繋ぐ
  • 接地(Ground)は Vss に繋ぐ
  • 書き込む時は PIN-06 は接続しなくても良い
  • PIC10F200は 2.0-5.5 V で使用可能(4.5V)
PIN-01 > Vpp/MCLR
PIN-02 > Vdd(Target)
PIN-03 > Vss(Ground)
PIN-04 > PGD(ICSPDAT)
PIN-05 > PGC(ICSPCLK)
PIN-06 > PGM(LVP)
  • Vddに100uFを超えるコンデンサを接続しない
  • MCLRにコンデンサを接続しない
  • PGC/PGDにプルアップ抵抗を接続しない
  • PGC/PGDに多重化しない
  • PGC/PGDにコンデンサを接続しない
  • PGC/PGDにダイオードを接続しない
  • 推奨ケーブルより長い物は使用しない

http://www.microchip.co.jp/download/index.php

  • 制御するためのピンはGPと書いてある部分
  • N/Cのピンは使用不可能 (Normally Closed)

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

Daiphys is a professional-service company for research and development of leading-edge technologies in science and engineering.
Get started accelerating your business through our deep expertise in R&D with AI, quantum computing, and space development; please get in touch with Daiphys today!

Name*


Email*


Message*




* Indicates required field

Daiphys Technologies LLC - https://www.daiphys.com/

  • Last modified: 2022/12/16 06:40
  • by Daiphys