Cov txheej txheem:

JDM Programmer Rov Ntsuam Xyuas: 9 Kauj Ruam
JDM Programmer Rov Ntsuam Xyuas: 9 Kauj Ruam

Video: JDM Programmer Rov Ntsuam Xyuas: 9 Kauj Ruam

Video: JDM Programmer Rov Ntsuam Xyuas: 9 Kauj Ruam
Video: МАШИНА КАК ИЗ КИБЕРПАНКА! 2024, Kaum ib hlis
Anonim
JDM Programmer Rov Ntsuam Xyuas
JDM Programmer Rov Ntsuam Xyuas

JDM yog tus nyiam PIC programmer vim tias nws siv lub chaw nres nkoj txuas, yam tsawg kawg nkaus ntawm cov khoom siv thiab tsis xav tau lub zog siv. Tab sis muaj qhov tsis meej pem tawm, nrog ntau tus programmer hloov pauv ntawm net, yam twg ua haujlwm nrog PICs twg? Hauv qhov "qhia tau" no peb muab JDM rau qhov kev sim thiab kuv ua qauv qhia yuav ua li cas simulate kev siv lub Spice uas yuav teb tag nrho koj cov lus nug!

Khoom siv

LTspice uas tuaj yeem rub tawm los ntawm cov cuab yeej sib piv ntawm no.

Koj kuj xav tau JDM cov ntaub ntawv hluav taws xob ntawm no.

Kauj ruam 1: Serial Port Requirements

Cov Chaw Nkag Nkag Yuav Tsum Tau Ua
Cov Chaw Nkag Nkag Yuav Tsum Tau Ua

JDM xav tau lub rooj sib tham txuas chaw nres nkoj EIA232 qhov tshwj xeeb, hom phiaj nrog +12/-12 Voltage qib.

Raws li Texas Instruments Kab Tsav Tsheb MC1488 daim ntawv (daim duab 3)

Output impedance = 4V/8mA = 500 ohm.

Kev txwv luv luv tam sim no = 12mV, tsis muaj lub sijhawm txwv - tsis muaj kev puas tsuaj rau nti.

Cov tswv yim cuam tshuam ntawm kab txais = 3k txog 7k ohm pom zoo.

Cov chaw nres nkoj hauv cov PCs qub siv +12v/-12V ua tau raws qhov xav tau no.

Cov chaw nres nkoj txuas ntawm lub khoos phis tawj laptop tshiab siv hluav taws xob qis. JDM yuav lossis tsis ua haujlwm - cov lus teb yog qhov nyuaj dua.

Kauj Ruam 2: PIC Txoj Cai Xav Tau

PIC Txoj Cai Xav Tau
PIC Txoj Cai Xav Tau

Cov ntaub ntawv hais txog PIC cov txheej txheem xav tau yog tau los ntawm Microchip. Saum toj no yog rau cov cuab yeej raug.

Kauj Ruam 3: JDM Kev Qhia Tshwj Xeeb

Specification ntawm JDM
Specification ntawm JDM

Puas yog JDM lub vev xaib qub tau ploj hauv qhov huab cua ntawm lub sijhawm? Qhov no yooj yim rau peb kwv yees dab tsi tus tsim qauv tau xub npaj rau qhov tshwj xeeb.

  1. Muab VDD = 5V, thiab mus txog IDD = 2mA siab tshaj (rau "hauv qhov ntsaws" version)
  2. Muab VHH = 13V, thiab mus txog IHH = 0.2mA siab tshaj.
  3. MCLR Sijhawm TVHHR = 1uS max.
  4. ICSP version yuav tsum muaj peev xwm rub MCLR qis tawm tsam 22k rub tawm ntawm lub hom phiaj.

Kauj Ruam 4: Kev piav qhia Circuit

Kev piav qhia Circuit
Kev piav qhia Circuit

Daim duab JDM1 yog ua raws "tus qauv" JDM Circuit coj los ntawm PICPgm lub vev xaib. Nov yog "PIC hauv Qhov Ntsuas" programmer qhov twg PIC siv lub zog los ntawm TX thiab RTS pins. Daim duab qub yog qhov nyuaj rau nkag siab yog li kuv tau rov sau nws siv qhov kev pom zoo ib txwm muaj ntawm cov dej ntws tam sim no los saum toj mus rau hauv qab. Thiab kuv tau ntxiv LED ntsuas "RESET", "PROG" thiab "RTS" uas tsim nyog thaum tsim kho thiab ntsuas. Vam tias cov no tsis muaj kev cuam tshuam rau tus cwj pwm.

Kev pom zoo ib txwm muaj ntawm kev tsim hluav taws xob yog rau txhua qhov chaw, tab sis qhov tseem ceeb ntawm JDM yog qhov chaw nres nkoj hauv av (GND) txuas nrog VDD. Qhov no tsim kev tsis meej pem raws li cov cim qhia chaw nres nkoj tau ntsuas nrog kev hwm rau GND, PIC cov cim nrog kev hwm rau cov laj thawj hauv paus (VSS).

Thaum TX mus siab dua, Q1 coj zoo li ob txoj hauv kev tsis ncaj ncees diodes. (Q1 tus neeg khaws khoom tsis rov qab tsis zoo ib yam li kev ua haujlwm transistor ib txwm muaj). Q1 tus neeg sau nqi C2, uas raug kaw ntawm VDD+8V los ntawm Zener (D3). Q1 tus xa tawm xa 13V rau MCLR rau Txoj Haujlwm/Txheeb Xyuas Hom.

Thaum TX mus qis nws, capacitor C3 raug them los ntawm D1 thiab VSS raug kaw ntawm VDD-5V los ntawm zener (D5). Tsis tas li TX tau kaw ntawm (VSS-0.6) los ntawm D1. Q1 tawm, C1 tuav nws lub luag haujlwm rau cov phiaj xwm tom ntej mem tes. MCLR raug kaw ntawm 0V los ntawm D2, yog li PIC tam sim no Pib dua.

Thaum RTS siab, lub moos xa mus rau PGC. D4 clamp PGC ntawm VDD logic siab. Thaum RTS qis, lub tshuab hluav taws xob C3 raug them los ntawm D6 thiab VSS raug kaw ntawm VDD-5V los ntawm zener (D5). D6 clamps PGC ntawm VSS lossis logic 0.

Thaum lub sijhawm ua haujlwm, cov ntaub ntawv xa tawm ntawm DTR tau nyeem ntawm PGD, uas PIC teeb tsa raws li cov tswv yim. Thaum DTR siab, Q2 ua "emitter follower" thiab PGD voltage hais txog (VDD-0.6) lossis logic 1. Thaum DTR qis, Q2 ua haujlwm tsis zoo transistor (emitter thiab collector pins thim rov qab). Q2 rub PGD qis, uas yog clamped los ntawm D7 ntawm VSS lossis logic 0.

Thaum lub sijhawm txheeb xyuas PIC teeb tsa PGD ua qhov tso tawm rau xa cov ntaub ntawv mus rau chaw nres nkoj txuas. DTR yuav tsum tau teeb tsa siab, thiab cov ntaub ntawv raug nyeem ntawm CTS. Thaum PGD tso zis siab, Q2 tawm, CTS = DTR = +12V. Thaum PGD tso zis tsawg, Q2 nyob. Q2 tus neeg nqa khoom tam sim no (12V+5V)/(1k+1k5) = 7mA los ntawm DTR, thiab rub CTS qis, mus rau VSS.

Kauj Ruam 5: Npaj rau Simulation

Npaj rau Simulation
Npaj rau Simulation

Rub LT cov txuj lom, khaws thiab qhib cov ntaub ntawv hauv Circuit (*.asc) muab rau ntawm no. Txhawm rau sim qhov Circuit Court, peb yuav tsum muab nws qee qhov kev nkag mus, tom qab ntawd "taug qab" cov txiaj ntsig. V1, V2 V3 simulate 12V serial chaw nres nkoj nrog cov zis impedance R11, R12, R13.

  • V1 tsim 2 Program Pulses ntawm TX los ntawm 0.5ms txog 4.5ms
  • V2 tsim kev tawg ntawm cov ntaub ntawv pulses ntawm DTR los ntawm 1.5 txog 4.5ms
  • V3 tsim kev tawg ntawm lub moos pulses ntawm RTS ntawm 0.5 txog 3.5ms

Cheebtsam V4, X1, R15 thiab R16 yog ib feem ntawm qhov simulation.

  • V4 tsim 2 lub plhaub los ntawm 2.5 txog 4.5ms rau txheeb xyuas cov ntaub ntawv.
  • Jumper X1 simulates OUTPUT ntawm PGD.
  • R15, R16 simulate "thauj khoom" ntawm PIC ntawm VDD thiab MCLR.

Kauj Ruam 6: Hloov kho rau ICSP

Kev hloov kho rau ICSP
Kev hloov kho rau ICSP
Kev hloov kho rau ICSP
Kev hloov kho rau ICSP

Daim duab JDM3 qhia qhov version rau "hauv Circuit" programming. Kev hloov kho los ntawm thawj yog

  1. Hloov ZIF qhov (socket) nrog ICSP txuas.
  2. Tam sim no PIC tau siv hluav taws xob los ntawm cov khoom siv rau cov phiaj xwm phiaj xwm (V5).
  3. Tshem tawm 5V zener (D5).
  4. Me me 100pF capacitor (C4) tau txav mus ib sab ntawm PIC ntawm lub phiaj xwm phiaj xwm.
  5. LEDs siv hluav taws xob los ntawm pawg thawj coj saib qhov twg ua tau.
  6. MCLR rub tawm tus tiv thaiv (R10) thiab diode (D10) yog xav tau ntawm cov phiaj xwm phiaj xwm.
  7. CEEB TOOM. Pawg phiaj xwm phiaj xwm yuav tsum muaj "ntab" khoom, lub roj teeb zoo.
  8. Tsis txhob txuas lub hom phiaj hauv av (VSS) mus rau lub khoos phis tawj/PC hauv av los ntawm kev txuas lwm lub khoos phis tawj chaw nres nkoj tib lub sijhawm zoo li JDM.

Tom qab sim JDM1, qhov teeb meem ntawm lub sijhawm them ntev ntawm C2 tau pom tseeb. Tom qab ntawv nyeem Fruttenboel nws zoo li C2 thiab Q1 tau ntxiv ua qhov kev hloov kho rau qhov qub. Kuv tsis tuaj yeem xav tias C2 thiab Q1 tau npaj ua dab tsi los ntawm kev tsim teeb meem. Yog li rau JDM4, peb rov qab mus rau qhov tsim qauv qub ntawm Fruttenboel uas yog qhov yooj yim thiab yooj yim to taub. D1 thiab D3/LED2 clamp MCLR ntawm VSS thiab VDD+8V. Tus nqi ntawm R1 raug txo mus rau 3k3, tsuas yog txaus kom pom kev pom LED2 ntawm 12V.

JDM4 kuj tseem tsim los ua haujlwm nrog cov chaw nres nkoj tsis muaj zog. Thaum TX mus siab (+9V), TX tam sim no qhov chaw = (9-8)/(1k +3k3) = 0.2ma, tsuas yog txaus rub MCLR siab txawm hais tias tsis txaus los teeb LED2. Thaum TX mus qis (txog -7V), TX tam sim no dab dej = (9-7)/1k = 2mA. LED1 tam sim no = (7-2 rau coj)/(2k7) = 1.8mA. MCLR rub tawm tam sim no = 7-5.5/3k3 = 0.5mA.

Lub voj voog no tseem tau sim (JDM5 simulation) kom pom tias muaj dab tsi tshwm sim nrog cov chaw nres nkoj txuas ntxiv +/- 7V yam tsawg kawg nkaus, qhov twg tsis muaj hluav taws xob txaus los txhawb nqa VHH = 13V. Lub hom phiaj ntawm C1 tam sim no tau pom tseeb, C1 tsim luv +ve txhawb rau MCLR, 33us nce siab ntawm ntug kev nce ntawm TX, txaus ntev txaus rau PIC nkag mus rau hom kev ua haujlwm, tej zaum? Tab sis tshem tawm jumper X2 (lov tes taw LED1) raws li muaj qhov tsis txaus tam sim no los rub MCLR qis thiab teeb pom kev zoo LED1 ua ke. Thaum TX mus qis, TX tam sim no dab dej = (7V-5.5V)/(1k+3k3) = 0.3mA, tsuas yog txaus los rub MCLR qis tiv thaiv rub tawm R10.

Kauj Ruam 7: Simulation Results

Simulation Results
Simulation Results
Simulation Results
Simulation Results
Simulation Results
Simulation Results

Txhawm rau saib cov duab nraaj, nws yog qhov zoo dua rau nyem rau kab ntawv txuas hauv qab no, tom qab ntawd xaiv "Qhib qhov txuas hauv Tab Tshiab"

Simulation 1: kab ntawm MCLR, VSS, thiab RTS rau thawj JDM1. Kev soj ntsuam tam sim ntawd 1, 2 thiab 3 yog qhov pom tseeb.

Simulation 2: kab ntawm MCLR thiab VSS, thiab RTS rau hloov JDM2, uas kho cov teeb meem yav dhau los.

Simulation 3: kab ntawm PGD, VSS thiab PGC rau JDM2 xa cov ntaub ntawv hauv hom haujlwm. Soj Ntsuam 4 ntawm 3.5mS.

Simulation 4: kab ntawm PGD, VSS thiab CTS rau JDM2 hauv kev txheeb xyuas hom (jumper X1 tso). OK

Simulation 5: kab ntawm MCLR, VSS, PGD thiab PGC rau JDM3. ICSP siv hluav taws xob los ntawm Circuit daws ntau yam teeb meem.

Simulation 6: kab ntawm MCLR, VSS, PGD thiab PGC rau JDM4 nrog +/- 9V qhov chaw nres nkoj. MCLR nce tam sim ntawd, ua haujlwm tag nrho.

Simulation 7: kab ntawm MCLR, VSS, thiab TX rau JDM5 nrog +/- 7V qhov chaw nres nkoj thiab jumper X2 raug tshem tawm. C1 tsim kom muaj +ve txhawb nqa (nce siab) ntawm qhov nce ntawm MCLR, tsuas yog txaus kom thawb MCLR siab dua TX mus rau 13V.

Kauj Ruam 8: Cov lus xaus

Spice yog qhov zoo tiag tiag ntawm kev qhia "zais zais" ntawm kev ua haujlwm hauv Circuit. Pom tseeb tias JDM Circuit Court ua haujlwm thiab sib xws nrog ntau PIC chips, tab sis cov kev soj ntsuam hauv qab no qhia tawm qhov ua tau txwv/teeb meem sib xws/ua tsis raug?

  1. Lub sijhawm ntev ntawm MCLR thaum C2 tsub rau VPP ntawm thawj lub plawv dhia ntawm TX. Tsis paub meej 3.
  2. Qhov chaw nres nkoj txuas tus nqi C2 thaum TX mus siab thiab RTS mus qis. Tab sis RTS kuj tseem muaj txoj haujlwm them C3. Thaum ob qho tib si tshwm sim nyob rau tib lub sijhawm no ua rau muaj kev thauj khoom ntau ntxiv ntawm RTS, yog li C3 poob qis (VSS nce) ntawm 2ms ntawm kev simulation. Tsis paub meej 1.
  3. C3 poob tus nqi (VSS pib nce) tom qab lub moos pulses nres ntawm 3.5ms.
  4. Lub hom phiaj ntawm C2, nws xav tau txhua?

Daws teeb meem

  1. Tej zaum PICPgm siv software "ua haujlwm ib puag ncig". Nws yuav tsum siv lub sijhawm TX ntev mus rau them ua ntej rau C2, tom qab ntawv tsuas yog nkag mus rau hom kev ua haujlwm tom qab TX thib ob mem tes? Rau kev sim kuv txo tus nqi C2 rau 1uF kom muab sijhawm nce ntawm 1ms. Tsis yog ib qho kev daws teeb meem zoo.
  2. Sib cais C2 thiab C3 yog li lawv them tus kheej. Ib qho kev hloov pauv me me rau JDM2, C2 raug xa mus rau GND tsis yog VSS.
  3. Kev daws los ntawm JDM3. ICSP muaj kev ntseeg tau ntau dua li PIC tau siv los ntawm phiaj xwm phiaj xwm.
  4. JDM4 daws teeb meem 1. Qhov no yog kev tsim ncaj qha tshem tawm C2 zoo rau nws.

Kauj Ruam 9: Thiab Thaum Kawg

Thiab Thaum Kawg
Thiab Thaum Kawg

Cov ntawv pov thawj ntawm paj npleg yog nyob hauv kev noj mov. Qhov JDM no ua haujlwm yog li siv nws.

Thiab kuv cov lus pom zoo yog:

  • siv JDM2 rau hauv lub qhov (socket) programming thiab 12V serial ports,
  • siv JDM4 rau ICSP programmer thiab serial ports saum toj no +/- 9V,
  • siv JDM4 nrog jumper X2 tshem tawm rau cov chaw nres nkoj ntau dua +/- 7V.

Cov ntaub ntawv:

Cov khoom siv sib piv LT txuj lom

picpgm

Fruttenboel

Ua raws ntau qhov PIC cov phiaj xwm ntawm lub kaum ntse ntse

Pom zoo: