Cov txheej txheem:

Nkag siab ICSP rau PIC Microcontrollers: 4 Cov Kauj Ruam (nrog Duab)
Nkag siab ICSP rau PIC Microcontrollers: 4 Cov Kauj Ruam (nrog Duab)

Video: Nkag siab ICSP rau PIC Microcontrollers: 4 Cov Kauj Ruam (nrog Duab)

Video: Nkag siab ICSP rau PIC Microcontrollers: 4 Cov Kauj Ruam (nrog Duab)
Video: nkag siab yuam kev part 36 lem hu nkauj mes kas 2024, Kaum ib hlis
Anonim
Nkag siab ICSP rau PIC Microcontrollers
Nkag siab ICSP rau PIC Microcontrollers

Kev tsim cov microcontrollers tsis nyuaj. Tsim tus programmer ua thawj qhov haujlwm hluav taws xob zoo. Lub hom phiaj ntawm cov lus qhia no yog piav qhia qhov yooj yim 'hauv kev ua haujlwm txheej txheem txheej txheem' siv nrog Microchip PICs.

Kauj Ruam 1: Vim Li Cas ICSP?

Vim li cas ICSP?
Vim li cas ICSP?

Kev teeb tsa DIP loj (los ntawm qhov) nti yog qhov yooj yim. Pop nws mus rau hauv lub programmer uas nyob ntsiag to, hlawv, thiab rov qab mus rau daim ntawv thov Circuit. Kuaj thiab rov ua dua.

Tej yam tau nyuaj dua nrog cov chips me me (saum npoo). Tsis muaj cov txheej txheem txheej txheem rau QFN, SSOP, QFP, lossis txawm tias loj SOIC.300 pob. Muaj cov nqi kim heev ($ 100s) cov yeeb yaj kiab uas tuaj yeem txuas rau, thiab program, cov chips no. Ib daim clip sib txawv xav tau rau txhua hom nti thiab tus lej suav koj siv. Muaj lwm txoj kev xaiv. Nws hu ua ICSP. ICSP txhais tau tias 'hauv Circuit program serial programmer (ing?)'. Nws yog ib txoj hauv kev ntawm kev tsim lub PIC thaum nws tseem txuas nrog daim ntawv thov Circuit Court. Yog lawm, tsis muaj kev sib pauv nti ntau. Vim li cas ICSP? 1. Tsis muaj cov phiaj xwm txheej txheem rau cov pob me me. Clips yog kim. 2. Nws qhov mob txav cov chips hauv & tawm ntawm tus programmer thaum lub sijhawm txhim kho. Tsis yooj yim sua rau ntu ntu ntu.

Kauj Ruam 2: ICSP yog dab tsi?

ICSP yog dab tsi?
ICSP yog dab tsi?
ICSP yog dab tsi?
ICSP yog dab tsi?
ICSP yog dab tsi?
ICSP yog dab tsi?
ICSP yog dab tsi?
ICSP yog dab tsi?

Tsib qhov kev sib txuas xav tau los ua haujlwm PIC thaum txuas rau daim ntawv thov kev pabcuam. Kuv ntxiv 5 tus pin header rau kuv cov laug cam kom ua qhov kev sib txuas sai thiab yooj yim. Cov hauv paus ntawm PIC cov phiaj xwm. Tsib qhov kev sib txuas yuav tsum tau ua haujlwm rau PIC. Lub zog, hauv av, lub zog hluav taws xob, moos, thiab cov ntaub ntawv.+ (Vdd)/-(Vss) Cov no yog lub zog & kev sib txuas hauv av (Vdd, Vss). Tus qauv zoo nkauj. Yog tias koj siv tus programmer nrog qib 'qhov tseeb' voltage (TSIS yog JDM2!), Koj daim ntawv thov tuaj yeem khiav los ntawm nws tus kheej lub zog siv thaum ua haujlwm, tshem tawm cov kev sib txuas no. Vpp Qhov no yog qhov program voltage. PICs nkag mus rau hom phiaj txheej txheem thaum ~ 13 volts tau muab tso rau ntawm MCLR/Vpp tus pin (feem ntau yog tus pin 1 ntawm PICs niaj hnub, ntau ntxiv nyob rau hauv qab no). Clock/Cov Ntaub Ntawv lossis PGC/PGD Lub moos thiab cov kab ntawv tau siv los sau thiab nyeem PIC firmware Cov no feem ntau yog tib tus pin zoo li PORTB6 & PORTB7. Exercise: Txheeb xyuas ICSP cov ntsiab lus txuas ntawm PICs hauv cov duab hauv qab no. Yog tias PIC haum, hnav nws Kuv tau txais ntau cov lus nug txog kuv JDM2 tsim ntawm cov lus qhia. Feem ntau yog "Nws puas yuav program PIC X? '"' - ntawm no yog qhov koj tuaj yeem qhia: 1) Saib cov ntaub ntawv. Nrhiav qhov 'Pin Diagram' uas zoo ib yam li daim duab hauv qab no. 2) Txheeb xyuas qhov chaw nyob ntawm tus pin uas yuav tsum txuas nrog rau lub cajmeem (Vpp, Vdd, Vss, Data, & Clock).3) Saib ntawm lub qhov (socket) txuas ntawm programmer. Koj puas tuaj yeem phim tus pin uas xav tau nrog lub qhov (socket) ntawm tus programmer?

Kauj Ruam 3: ICSP li cas?

ICSP li cas?
ICSP li cas?
ICSP li cas?
ICSP li cas?
ICSP li cas?
ICSP li cas?
ICSP li cas?
ICSP li cas?

Nyob ntawm koj tus qauv, tam sim no koj tuaj yeem ua txhua qhov kev sib txuas xav tau thiab ua haujlwm koj li PIC. Muaj qee qhov kev ntes uas koj yuav tsum paub txog. Kev tsim rau ICSP yog qhov tseem ceeb. Microchip muab daim ntawv thov PDF zoo txog kev tsim rau ICSP. https://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en011744 Nov yog qee cov lus qhia thiab piv txwv ntawm ICSP tsim los ntawm kuv cov lus qhia yav dhau los. thiab DATA pins (feem ntau RB6 & RB7, PGC & PGD). Tsis txhob ua. Muaj xwm txheej uas hom kev siv tshuab ntse heev tau khiav nrog nws, tab sis tsis txhob ua nws. Cov khoom txuas nrog tus pin yuav ua rau lub moos thiab cov ntaub ntawv teeb tsa, ua rau muaj kev cuam tshuam tsis tau qhov program. Ib qho ntxiv, yog tias koj ib txwm xav siv qhov debugger hauv Circuit Court, koj ua tsis tau. Tsis txhob ua nws. Tip #2 Kev hem thawj: Kev tawg Ib txwm siv lub diode nruab nrab ntawm cov phiaj xwm hluav taws xob thiab lub zog hluav taws xob. Qhov no kuj yog tus pin uas koj yuav thov ~ 13 volts txhawm rau nkag mus rau hom kev ua haujlwm. Kuv muab 1n4148 (sib npaug) diode nruab nrab ntawm tus tiv thaiv thiab MCLR/Vpp tus pin (raws li qhia hauv cov duab thiab ua hauv qab no). Qhov no ua kom cov phiaj xwm hluav taws xob nyob ntawm Vpp tus pin, tiv thaiv kev puas tsuaj ntawm lwm yam khoom ntawm koj lub rooj tsavxwm. Kuv yeej tsis tau pom nws ua haujlwm (xwm yeem) nrog kuv tus kheej lub qhov muag. Tsuas yog tom lub mos txwv thiab siv $ 2.50 los tsim tus programmer JDM2.

Kauj Ruam 4: Cov Neeg Tsim Qauv ICSP

ICSP Cov Kws Tsim Kho
ICSP Cov Kws Tsim Kho
ICSP Cov Kws Tsim Kho
ICSP Cov Kws Tsim Kho

ICSP tsis xav tau cov txheej txheem txheej txheem sib txawv. Lub khoos phis tawj-based programmer twb tsim cov cim qhia tau xav tau, tab sis xa nws mus rau lub qhov hluav taws xob ntau dua li ntawm cov xov hlau. Feem ntau cov neeg tsim hluav taws xob tuaj yeem siv ua ICSP los ntawm kev xaim hluav taws xob los ntawm lub qhov (socket) mus rau daim ntawv thov hluav taws xob. Piv txwv li, tus thawj JDM2 programmer (ntawm no: https://www.jdm.homepage.dk/newpic.htm) ua ICSP cov phiaj xwm los ntawm nqa 5 lub cim xav tau rau lub taub hau. Qhov no tuaj yeem pom hauv tus programmer ntawm no: https://www.belza.cz/digital/jdm.htm. Txhawm rau ua kom yooj yim, Kuv rov kho qhov kev tsim qauv no hauv Eagle Cad thiab txuas nws rau qhov kev qhia no. Saib cov transistor kev taw qhia, ib qho ntawm cov hneev taw yuav tsis raug (Kuv tau ua qhov no ntau dua li ib xyoos dhau los, Kuv tsis nco qab lawm). Ib yam li ntawd, kuv tus khoos phis tawj JDM2 tshiab (ntawm no: https://www.instructables.com/id/EN28KZDDYVEP286GRI/) tuaj yeem siv rau ICSP los ntawm txuas cov xov hlau rau hauv DIP qhov thiab txuas lawv mus rau lub hom phiaj PIC. ***** JDM2s siv qhov hluav taws xob txaus luag … txuas nws mus rau hauv Circuit Court yam tsis muaj lub zog sab nraud (lossis txawm tias hauv av) txuas nrog rau daim ntawv thov Circuit. Tshem tawm ICSP kev sib txuas ua ntej thov lub zog. Kev ua tsis tiav qhov no tsis yog kev puas tsuaj, tab sis yuav ua rau txoj haujlwm tsis ua haujlwm ******* Lwm qhov kev xaiv yog (ib nrab) qhov tsim nyog ICD programmer. ICD tso cai rau koj los tswj kev ua tiav firmware ntawm koj PIC los ntawm teeb tsa cov ntsiab lus tawg hauv cov cai lossis nyeem tawm nco thiab chaw nres nkoj qhov tseem ceeb. ICD kuj tseem tuaj yeem ua kom muaj kev ua tiav ntawm cov cai, ua haujlwm rau daim ntawv thov Circuit Court, thiab ua haujlwm PIC. Nws ua txhua yam no los ntawm tib tus pin 5 tus pin ICSP peb tau tham. Ob peb ICSP clones uas koj tuaj yeem ua rau koj tus kheej tuaj yeem pom ntawm no: https://www.icd2clone.com/wiki/Main_Page. Kuv tau tsim PiCS (rev B) ob peb lub hlis dhau los thiab nyiam nws.

Pom zoo: