Cov txheej txheem:

Yuav hloov kho Firmware li cas ntawm USBasp-Clone Pheej Yig: 9 Kauj Ruam
Yuav hloov kho Firmware li cas ntawm USBasp-Clone Pheej Yig: 9 Kauj Ruam

Video: Yuav hloov kho Firmware li cas ntawm USBasp-Clone Pheej Yig: 9 Kauj Ruam

Video: Yuav hloov kho Firmware li cas ntawm USBasp-Clone Pheej Yig: 9 Kauj Ruam
Video: Hloov Kev Xav, Lub Neej Hloov 2024, Kaum ib hlis
Anonim
Yuav Ua Li Cas Hloov Kho Lub Firmware ntawm USBasp-Clone Pheej Yig
Yuav Ua Li Cas Hloov Kho Lub Firmware ntawm USBasp-Clone Pheej Yig

Nov yog cov lus qhia me me kom ua kom pom lub firmware tshiab mus rau USBasp-clone zoo li kuv. Phau ntawv qhia no tau sau tshwj xeeb rau USBasp-clone pom hauv cov duab, txawm li cas los xij nws tseem yuav tsum ua haujlwm nrog lwm tus. Cov kab hluav taws xob tau qhia ntawm theem 5, muaj TL; DR ntawm qib 9.

Txaus siab rau!

Kauj Ruam 1: Teeb Meem

Teeb meem
Teeb meem
Teeb meem
Teeb meem

Avrdude qhia rau kuv tias tus programmer kuv tab tom siv tau kho vajtse qub dhau lawm. Lub jumper ib txwm rau tus kheej lub cajmeem tsis muaj nyob ntawm kuv lub rooj tsavxwm. Nov yog yuav kho li cas. Cov duab rau USBasp tuaj yeem nrhiav tau ntawm fischl.de.

Kauj Ruam 2: Cov Ntaub Ntawv Xav Tau

Koj yuav xav tau…

  • Ib qho hlau txuas
  • Ib qho Arduino (nyiam dua Nano)
  • Qee cov xov hlau jumper
  • Ib lub PC nrog Arduino IDE thiab avrdude tau teeb tsa

Kauj Ruam 3: Cov Tshuaj

Cov Tshuaj
Cov Tshuaj
Cov Tshuaj
Cov Tshuaj
Cov Tshuaj
Cov Tshuaj

Txhawm rau kom peb nyem lub khoos phis tawj tshiab mus rau ATmega8, peb yuav tsum tau tswj hwm nws tus pin RESET. Feem ntau, lub jumper ntawm USBasp tuaj yeem raug kaw kom ua haujlwm rau tus kheej, txawm li cas los xij cov chaw tsim khoom ntawm kuv lub rooj tsavxwm tsis suav nrog ib qho.

Ntawm ATmega8, tus pin RESET yog tus pin 29, tus pin thib plaub nyob rau sab saum toj ntawm sab laug. Nws txuas nrog lub 10k rub-up resistor rau 5V. Peb yuav tsum txuas nws mus rau tus pin 5 ntawm ICSP lub taub hau.

Peb tuaj yeem sim ua kom xaim ncaj qha mus rau tus tiv thaiv lossis tus pin nws tus kheej, txawm li cas los nws yog qhov nyuaj thiab tuaj yeem ua rau koj lub rooj tsavxwm puas tsuaj. (Kuv sim nws thiab ripped tawm lub rub-resistor, Kuv tsis pom zoo nws) Tsis tas li ntawd, muaj txoj hauv kev yooj yim dua!

Txawm hais tias cov chaw tsim khoom tsis suav nrog lub jumper tiag los pab tus kheej lub cajmeem, nws tau tso lub taub hau hauv qab lub microcontroller. Peb tuaj yeem yooj yim xaim hlau hla thiab …

Kauj ruam 4: Tau kawg

Voilà!
Voilà!

Peb tau txuas ob lub pin pib dua! Ob qhov nyob hauv qab txuas tus pin 29 thiab tus pin 14 ntawm lub microcontroller.

Kauj Ruam 5: Teeb tsa Arduino

Txhawm rau teeb tsa lub firmware tshiab rau tus programmer, peb xav tau lwm tus programmer, hauv qhov no yog Arduino nrog ArduinoISP kos duab rau nws. Tsuas yog kom paub tseeb tias koj teeb tsa zoo ib yam, thov tsis suav nrog kab 81

// #define USE_OLD_STYLE_WIRING

Tam sim no txuas Arduino nrog ICSP header ntawm koj tus programmer.

Arduino USB Cov

5V Pin 2 (VCC) GND Pin 4/6/8/10 (GND) Pin 10 Pin 5 (Reset) Pin 11 Pin 9 (MISO) Pin 12 Pin 1 (MOSI) Pin 13 Pin 7 (SCK)

USBasp tseem tsis tau txuas ntawm lub PC.

Qhib lub davhlau ya nyob twg thiab hom

avrdude -cavrisp -pm8 -b19200 -P [Koj tus lej chaw nres nkoj mus ntawm no, nws yuav tsum zoo ib yam li hauv Arduino IDE]

Yog tias txhua yam mus zoo, avrdude yuav tsum luam tawm qee cov ntaub ntawv hais txog ATmega8 (fuses, kos npe, thiab lwm yam)

Kauj Ruam 6: Teeb nyem ATmega8

Txhawm rau nyem lub nti, peb tseem xav tau cov firmware. Lub taub hau mus rau fisch.de thiab rub tawm qhov hloov tshiab tshaj plaws. Tshem cov ntawv khaws cia thiab mus rau nws siv lub plhaub.

Ua ke cov cai tsis ua haujlwm rau kuv, tab sis hmoov zoo cov ntawv khaws cia muaj tag nrho cov kev suav sau ua haujlwm hauv qab no

rau/firmware

Ntawm no koj yuav tsum pom peb.hex cov ntaub ntawv. Xaiv ib lub npe uas zoo ib yam li koj tus ntiv tes. Kuv tus programmer siv ATmega8, yog li kuv tau xaiv

usbasp.atmega8.yyyy-mm-dd.hex

Nrog kev sib txuas ua haujlwm rau ATmega8, nyem nws yuav tsum tsuas yog ntaus ntawv

avrdude -cavrisp -pm8 -b19200 -P [PORT] -U nyem: w: [hex file]

Yog tias txhua yam tau ua tiav kom raug, avrdude yuav tsum sau thiab txheeb xyuas qhov xaiv firmware.

Kauj Ruam 7: Ua Kom Paub Tus Kws Ua Haujlwm Ua Haujlwm

Ua kom ntseeg tau tias Programmer Ua Haujlwm
Ua kom ntseeg tau tias Programmer Ua Haujlwm

Txhawm rau siv USBasp ua tus programmer dua, peb yuav tsum tshem tawm qhov txuas ntawm tus pin 29 thiab tus pin 14. Txiav lub jumper rau hauv qab yuav tsum txaus, txawm li cas los tshem tawm nws tsis tuaj yeem ua mob ib yam.

Koj tuaj yeem sim nws los ntawm ntsaws nws rov qab rau hauv PC thiab ntaus ntawv

avrdude -cusbasp -pm8

Txawm hais tias avrdude tsis tuaj yeem ncav cuag lub hom phiaj, nws yuav tsum tsawg kawg lees paub lub firmware tshiab ntawm peb tus programmer.

Kauj ruam 8: Troubleshooting

Teeb meem
Teeb meem

Yuav tsum avrdude qhia qhov ua yuam kev zoo li qhov no, nws tej zaum yuav muaj qee yam ua nrog pib kho dua tshiab ntawm Arduino. Txhawm rau hla qhov no, thov ntxiv lub capacitor nruab nrab ntawm RESET thiab GND ntawm Arduino. Feem ntau nws pom zoo kom siv 10µF capacitor, txawm li cas los xij hauv kuv qhov xwm txheej, 100µF capacitor ua haujlwm tau zoo xwb.

Koj yuav tsum tau txais qhov yuam kev zoo li

avrdude: yuam kev: programm pab: lub hom phiaj tsis teb. 1

lossis daim ntawv kos npe tsis raug xa rov qab, thov txheeb xyuas koj cov xov hlau. Kuv muaj teeb meem nrog kuv cov kab hluav taws xob xeb thiab tsis ua hluav taws xob ntxiv lawm. Kuv pom zoo txheeb xyuas txhua lub xov hlau jumper ua ntej.

Kuj tseem nco ntsoov hloov tus pin 11 thiab tus pin 12 ntawm Arduino, yog tias qhov teeb meem tshwm sim.

Thov kuj nco ntsoov teeb tsa tus nqi baud kom raug rau Arduino li ISP, 19200. Nws tuaj yeem teeb nrog qhov kev xaiv

ib 19200

Yog tias koj muaj lus nug lossis pom pom qhov ua yuam kev, thov qhia rau kuv paub:)

Kauj Ruam 9: TL; DR

  1. Siv tus xaim hla ob tus pin rau hauv qab ntawm lub rooj tsavxwm
  2. Teeb tsa Arduino ua ISP, ua kom ntseeg tau tias muaj peev xwm txuas xov tooj qub
  3. Txuas Arduino rau tus programmer los ntawm ICSP header
  4. Nyem qhov firmware tshiab rau tus programmer
  5. Tshem qhov kev sib txuas hauv qab
  6. Tsis txhob tshem tawm ib qho SMD resistors

Pom zoo: