Cov txheej txheem:

Yuav Ua Li Cas Program PIC MCU Nrog PICkit Programmer Siv Breadboard: 3 Kauj Ruam
Yuav Ua Li Cas Program PIC MCU Nrog PICkit Programmer Siv Breadboard: 3 Kauj Ruam

Video: Yuav Ua Li Cas Program PIC MCU Nrog PICkit Programmer Siv Breadboard: 3 Kauj Ruam

Video: Yuav Ua Li Cas Program PIC MCU Nrog PICkit Programmer Siv Breadboard: 3 Kauj Ruam
Video: Leap Motion SDK 2024, Kaum ib hlis
Anonim
Yuav Ua Li Cas Program PIC MCU Nrog PICkit Programmer Siv Breadboard
Yuav Ua Li Cas Program PIC MCU Nrog PICkit Programmer Siv Breadboard

Koj tsis xav tau cov cuab yeej kim thiab ntse los ua si nrog PIC (lossis lwm yam) microcontrollers. Txhua yam koj xav tau yog daim ntawv qhia zaub mov qhov twg koj sim koj lub Circuit thiab programming. Tau kawg qee yam ntawm tus programmer thiab IDE yog qhov tsim nyog. Hauv cov lus qhia no kuv yuav siv MPLAB X IDE thiab PICkit3 programmer.

Kuv tau xaiv PIC18F14K22. Tsis muaj qhov laj thawj tshwj xeeb rau qhov tshwj xeeb PIC, Kuv tsuas yog siv nws tam sim no. Nws ua haujlwm nyob rau qhov ntsuas hluav taws xob nruab nrab ntawm 2.3 V thiab 5.5 V. Cov txheej txheem txheej txheem yuav pom nrog cov lej yooj yim uas tso cai rau LED ntsais ntsais ib ntus.

Kauj Ruam 1: Yam Peb Xav Tau

Yam Peb Xav Tau
Yam Peb Xav Tau
Yam Peb Xav Tau
Yam Peb Xav Tau
  • PICkit3 programmer
  • daim ntawv qhia zaub mov
  • PIC18F14K22 MCU NCO
  • 6-tus pin header
  • qee cov kab
  • tog twg los 4.5 V roj teeb lossis USB cable (koj tuaj yeem siv qee qhov los ntawm nas qub lossis keyboard lossis ua rau koj tus kheej)
  • ib qho xim LED thiab 470 resistor rau kev ntsuas lub hom phiaj

Cov ntaub ntawv:

PIC18F14K22

PICKIT 3

Kauj ruam 2: Kev thaiv kab

Thaiv
Thaiv
Thaiv
Thaiv
Thaiv
Thaiv
Thaiv
Thaiv

PICkit 3

Cia peb saib PICkit3 programmer. Pom qhov 6-tus pin poj niam lub taub hau nyob hauv qab. Tus lej tus lej ib tus tau kos npe nrog daim duab peb sab dawb yog li los ntawm lub hauv ntej pins tus lej los ntawm sab xis mus rau sab laug. Pins cov lus piav qhia:

  1. MCLR
  2. Vdd
  3. Hauv av
  4. Cov ntaub ntawv ICSP
  5. ICSP Moos
  6. Tsis txuas nrog

Cov qhob cij

Thawj qhov 6-tus pin header thiab PIC kaw txaus rau ib leeg ntawm lub khob cij. Hauv PIC cov ntaub ntawv peb yuav tsum nrhiav kom paub cov phiaj xwm ua haujlwm:

  1. Vd - pin 1
  2. Vss (hauv av) - tus pin 20
  3. PGD (ICSP Cov Ntaub Ntawv) - tus pin 19
  4. PGC (ICSP Moos) - tus pin 18
  5. MCLR - pin 4
  6. RC0 - tus pin 16 (tus pin uas LED yuav tsav)

Cov phiaj xwm hluav taws xob tau qhia hauv daim duab Fritzing.

Hwj chim

Raws li nws tau hais ua ntej lub Circuit tuaj yeem siv tau los ntawm 4.5 V roj teeb lossis USB qhov hluav taws xob (5 V). Kom ua kom pom tseeb 5 V zoo rau qhov tshwj xeeb PIC tab sis tsis tas yuav yog rau lwm tus. Ib txwm tshuaj xyuas cov ntawv teev tseg rau qhov ntau qhov hluav taws xob siv rau lub cuab yeej.

Kauj ruam 3: Programming

Programming
Programming
Programming
Programming
Programming
Programming
Programming
Programming

Kuv tau npaj cov cai yooj yim zoo nkauj rau kev ntsuas lub hom phiaj. Thaum koj muaj MPLAB txoj haujlwm npaj rau kev ua haujlwm txuas rau PICkit3 rau tus pin lub taub hau ntawm lub khob cij. Tsis txhob hnov qab kom muaj lub tshuab hluav taws xob txuas ntxiv yog li kev sib txuas ntawm PIC thiab tus programmer tsis ua haujlwm. Nyem rau "Ua thiab Program Device Device Main Project" khawm thiab tos kom txog thaum lub program tiav. Tom qab ntawd LED yuav tsum ntsais - 500 ms rau thiab 500 ms tawm.

Pom zoo: