Cov txheej txheem:

JALPIC Ib Pawg Neeg Loj Hlob: 5 Kauj Ruam (nrog Duab)
JALPIC Ib Pawg Neeg Loj Hlob: 5 Kauj Ruam (nrog Duab)

Video: JALPIC Ib Pawg Neeg Loj Hlob: 5 Kauj Ruam (nrog Duab)

Video: JALPIC Ib Pawg Neeg Loj Hlob: 5 Kauj Ruam (nrog Duab)
Video: Plab Plab Ntswg..(Pluav Pluav Ntswg) Maiv Twm New Song 2023-2024 2024, Hlis ntuj nqeg
Anonim
JALPIC Ib Pawg Neeg Loj Hlob
JALPIC Ib Pawg Neeg Loj Hlob

Yog tias koj ua raws kuv Cov Lus Qhia ua haujlwm koj paub tias kuv yog tus kiv cua loj ntawm JAL cov lus programming ua ke nrog PIC Microcontroller. JAL yog Pascal zoo li cov lus programming tsim rau 8-ntsis PIC microcontrollers ntawm Microchip. Cov neeg feem coob paub Arduino siv ATMEL microcontroller. Ib qho ntawm qhov zoo ntawm Arduino pawg thawj coj yog tias koj tuaj yeem tsim kho lub microcontroller yam tsis xav tau cais tus programmer.

Qhov tsis muaj qhov xav tau programmer tau coj kuv mus rau txoj haujlwm no. Kuv xav ua Arduino Uno zoo li lub rooj tsavxwm rau PIC microcontroller txhim kho software rau pawg thawj coj ntawd nrog rau hauv JAL cov lus programming. Lub rooj tsavxwm tsis tas yuav muaj qhov loj me ntawm Arduino Uno board tab sis cov txuas ntawm lub rooj tsavxwm yuav tsum muaj - qhov ua tau - kev sib txuas zoo ib yam li kev sib txuas ntawm Arduino Uno. Thiab yog li JALPIC Ib pawg thawj coj txhim kho tau yug los.

Kauj Ruam 1: Tsim Pawg Thawj Coj

Tsim Pawg Thawj Coj
Tsim Pawg Thawj Coj
Tsim Pawg Thawj Coj
Tsim Pawg Thawj Coj

Ua ntej kuv pib tsim, Kuv tau saib zoo ntawm Arduino tsim thiab txiav txim siab hauv qab no:

  • Kuv xav kom lub rooj tsavxwm tau tsim nrog cov qauv txheej txheem yog li tsis muaj Surface Mount Design (SMD). Qhov laj thawj rau qhov no yog tias nws yuav yooj yim dua rau cov nyiam ua haujlwm los sib sau ua ke.
  • Cov txuas yuav tsum nqa ntau li ntau tau ua tau zoo ib yam li Arduino Uno. Hauv daim duab pem hauv ntej kuv tseem tsis tau sau cov khoom sib txuas.
  • Kev tswj hwm ntawm pawg thawj coj yuav tsum tau ua los ntawm PIC thiab PIC no yuav tsum tau ua haujlwm siv JAL cov lus programming.
  • Rau kev ntsuas lub hom phiaj pawg thawj coj yuav tsum muaj LED uas koj tuaj yeem tswj hwm los ntawm PIC uas khiav daim ntawv thov. Cov yam ntxwv no tseem muaj nyob ntawm Arduino Uno.
  • PIC uas sau daim ntawv thov yuav tsum muaj lub cim xeeb txaus thiab RAM rau kev txhim kho daim ntawv thov yooj yim.

Hauv daim duab kab ntawv txuas nrog koj pom qhov tsim ntawm JALPIC Ib pawg thawj coj txhim kho. Kuv kuj suav nrog lub screenshot ntawm PCB. Ib yam li Arduino lub rooj tsavxwm tuaj yeem siv tau los ntawm USB chaw nres nkoj los ntawm sab nraud DC lub zog xa khoom thaum siv sawv ib leeg.

Kuv ntxiv ib daim duab uas qhia txog Arduino thiab JALPIC Ib pawg thawj coj txhim kho.

Daim ntawv thov PIC ntawm lub rooj tsav xwm tau teeb tsa siv cov ntawv hex uas tau tsim los ntawm JAL tus neeg sau.

Kauj Ruam 2: Cov Cheeb Tsam Xav Tau

Yuav tsum tau Cheebtsam
Yuav tsum tau Cheebtsam

Koj yuav tsum muaj cov khoom siv hauv qab no rau txoj haujlwm no tom ntej ntawm lub rooj tsavxwm nws tus kheej:

IC

  • 1 * LM2940CT-5.0: IC1
  • 1 * LM3940IT-3.3: IC2
  • 1 * PIC16F18557P: IC3 (daim ntawv thov PIC)
  • 1 * PIC16F1455P: IC4 (tswj PIC)

Crystal

  • 1 * 20 MHz: Q1
  • 1 * 12 MHz: Q2

Diode

  • 1 * 1N4004: D1
  • 1 * 1N4148: D2

LED

  • 1 * Daj LED: LED1
  • 1 * Amber LED: LED2
  • 1 * Liab LED: LED3

Txuas

  • 1 * Lub Hwj Chim Jack: J1
  • 1 * USB Txuas: X1
  • 2 * 6-pin header: SV2, SV5
  • 2 * 8-pin header: SV1, SV4
  • 1 * 10-pin header: SV3
  • 1 * 3-pin jumper: JP1
  • 1 * 2-pin jumper: JP2

Capacitor

  • 4 * 22 pF: C1, C3, C11, C13
  • 5 * 100 nF: C2, C6, C7, C8, C 9
  • 1 * 470 nF/Ceramic: C10

Electrolytic Capacitor

3 * 10 uF/25V: C4, C5, C12

Resistor

  • 2 * 22 Ohm: R10, R11
  • 2 * 330 Ohm: R1, R8
  • 6 * 1 kOhm: R2, R3, R4, R5, R6, R7
  • 1 * 33 kOhm: R9

Hloov

1 * Omron Pushbutton: S1

Hauv qhov teeb tsa txuas ntawm lub rooj tsavxwm koj tuaj yeem pom qhov twg txhua qhov kev tivthaiv yuav tsum mus.

Kauj Ruam 3: Pawg Tswj Xyuas Software

Feem ntau ntawm kev ua haujlwm yog kev txhim kho software tswj rau kev tswj PIC ntawm pawg thawj coj. Pawg thawj coj muaj cov lus txib yooj yim teeb tsa kom tshem tawm daim ntawv thov PIC, teeb tsa daim ntawv thov PIC thiab qee qhov lus txib ntxiv. Raws li tau hais nws tau sau hauv JAL. Muaj 3 lub hauv paus tseem ceeb hauv software:

  1. Txoj haujlwm tseem ceeb uas muab kev cuam tshuam nrog USB, txhais cov lus txib thiab xa cov lus teb.
  2. Cov hex file parser uas txheeb xyuas cov ntsiab lus ntawm hex file, rho tawm qhov chaw nyob thiab cov ntaub ntawv los ua haujlwm.
  3. Tus programmer uas lwv lub cim xeeb ntawm daim ntawv thov PIC thiab teeb tsa daim ntawv thov PIC nrog cov ntaub ntawv los ntawm tus neeg cais tawm.

Txij li kev tswj PIC tsis muaj lub cim xeeb sab hauv loj, kev txheeb xyuas cov ntaub ntawv hex tau ua tiav lub sijhawm tiag tiag thiab ntawm kab ntawm kab ib puag ncig tom qab uas cov ntaub ntawv raug xa mus rau lub software software uas tom qab ntawd tseem ua haujlwm thov PIC ntawm kab los ntawm kab hauv paus.

Cov ntawv hex uas txuas nrog tuaj yeem siv los teeb tsa tus tswj hwm PIC.

Kauj Ruam 4: Qhov Kev Thov Daim Ntawv Thov Zoo Li Cas

Txij li kho vajtse ntawm daim ntawv thov PIC tau paub, ib qho yooj yim suav nrog cov ntaub ntawv tuaj yeem siv los txheeb xyuas txhua yam kev teeb tsa xav tau rau daim ntawv thov PIC kom ua haujlwm. Tus neeg sau qhov program tuaj yeem tsom mus rau qhov program nws tus kheej. Ib qho yooj yim blink-a-led program hauv JAL ces zoo li hauv qab no:

suav nrog jalpic_one - suav nrog pawg thawj coj txhais cov ntawv

enable_digital_io () - ua txhua tus pin digital I/O

alias coj yog pin_a0 - alias rau tus pin nrog LED

pin_a0_direction = OUTPUT

daim ntaub ib txwm

coj = ON

_usec_delay (100_000)

coj = OFF

_usec_delay (400_000)

kawg lub voj

Txoj haujlwm no siv LED uas yog tam sim no ntawm JALPIC Ib pawg thawj coj txhim kho. Thaum qhov haujlwm tau ua tiav, tsuas yog 1 nyem rau ntawm lub pob hauv tus kws kho mob hu ua JalEdit txaus los sau cov program thiab rub nws mus rau hauv pawg thawj coj. Cov vis dis aus luv qhia seb qhov no ua haujlwm li cas.

Kauj Ruam 5: Tsim Pawg Thawj Coj Koj Tus Kheej

Kuv tsis tuaj yeem piav qhia txhua yam hauv Phau Ntawv Qhia no tab sis tag nrho pawg thawj coj tsim, software thiab ntaub ntawv tuaj yeem rub tawm los ntawm ib qho ntawm Jallib tso tawm hauv qab daim nplaub tshev 'project / jalpic_one'.

Txij li qhov kev txhim kho tshiab no tseem tsis tau raug tso tawm hauv qhov tshiab Jallib, nws yuav tsum tau rub tawm siv qhov tseeb 'muv-pob' los ntawm JAL qhov chaw rub tawm.

Lub vev xaib rub tawm tuaj yeem pom ntawm: Tsuas Yog Lwm Lub JAL Lub Vev Xaib

Muaj kev lom zem tsim koj tus kheej txoj haujlwm thiab tos ntsoov rau koj cov kev xav.

Pom zoo: