Cov txheej txheem:

Attiny85 Programming (ntaub thaiv npog) Siv Arduino UNO: 7 Cov Kauj Ruam
Attiny85 Programming (ntaub thaiv npog) Siv Arduino UNO: 7 Cov Kauj Ruam

Video: Attiny85 Programming (ntaub thaiv npog) Siv Arduino UNO: 7 Cov Kauj Ruam

Video: Attiny85 Programming (ntaub thaiv npog) Siv Arduino UNO: 7 Cov Kauj Ruam
Video: exit status 1 error compiling for board arduino, FIX. 2024, Hlis ntuj nqeg
Anonim
Attiny85 Programming (ntaub thaiv npog) Siv Arduino UNO
Attiny85 Programming (ntaub thaiv npog) Siv Arduino UNO
Attiny85 Programming (ntaub thaiv npog) Siv Arduino UNO
Attiny85 Programming (ntaub thaiv npog) Siv Arduino UNO
Attiny85 Programming (ntaub thaiv npog) Siv Arduino UNO
Attiny85 Programming (ntaub thaiv npog) Siv Arduino UNO

Ua si nrog koj Arduino yog kev lom zem heev. Txawm li cas los xij, qee zaum qhov loj me tseem ceeb.

Arduino UNO yog qhov me me, tab sis yog tias koj xav kom koj txoj haujlwm nyob hauv ib lub thawv me me, UNO yuav loj heev. Koj tuaj yeem sim siv NANO lossis MINI, tab sis yog tias koj xav mus me me, koj mus me me, Attiny kom raug.

Lawv yog cov me me, cov chips pheej yig (feem ntau yog Arduinos me me) thiab tuaj yeem ua haujlwm hauv Arduino IDE, txawm li cas los xij koj yuav pom tias tsis muaj USB txuas. Yog li peb yuav ua nws li cas ???

Rau txhua qhov teeb meem, muaj kev daws teeb meem. Koj tuaj yeem yooj yim ua koj Arduino UNO rau hauv tus programmer, txuas nws nrog Attiny thiab program nws li ntawd.

Tam sim no, yog tias koj ua nws ib zaug, qhov ntawd yog qhov kev xaiv zoo, txawm li cas los xij yog tias koj nkag mus rau hauv kev ua si nrog koj Attiny, koj yuav pom tias txuas tag nrho cov xov hlau no ib zaug dhau ib zaug tau txais kev cuam tshuam zoo nkauj.

Yog tias tsuas muaj qee txoj hauv kev peb tsuas tuaj yeem txuas Attiny rau Arduino yam tsis tas yuav siv lub khob cij thiab tag nrho cov xov hlau. Thiab muaj!

Hauv qhov tsis muaj tseeb no kuv yuav qhia koj yuav ua li cas thiaj ua tau koj tus kheej Arduino Attiny shield, uas ua haujlwm nrog Attiny25/45/85.

Koj tuaj yeem ua rau nws ntawm lub khob cij (uas zoo nkaus li tsis zoo) lossis koj tuaj yeem siv PCB.

BTW, Cov Lus Qhia no tau nkag mus rau hauv PCB Kev Sib Tw, yog li yog tias koj nyiam qhov Qhia Ntawv no, txiav txim siab muab nws koj qhov pov npav thaum kawg ntawm Cov Lus Qhia.

Kauj ruam 1: Yam Koj Yuav Tsum Tau

Yam Koj Yuav Tsum Tau
Yam Koj Yuav Tsum Tau

Rau qhov haujlwm no koj yuav xav tau:

-Arduino IDE (qhov tshiab tshaj tawm tau pom zoo, tab sis txhua yam 1.6.x lossis tshiab dua yuav tsum ua haujlwm)

-Attiny25/45/85 (koj tsis xav tau nws los ua tus programmer, tab sis tsis muaj ib qho tseem ceeb hauv kev ua tus programmer yog tias koj tsis muaj tus nti)

-2pcs 4pin txiv neej lub taub hau (koj tuaj yeem yuav ib kab ntawm 40 thiab ua tib zoo so 4 tawm)

-1 electrolytic capacitor (nyob qhov twg los ntawm 10uF txog 100uF zoo)

-8pin qhov (lossis koj tuaj yeem siv 2pcs ntawm 4pin poj niam lub taub hau)

-Arduino UNO (tau kawg clones ua haujlwm ib yam nkaus)

-1 pcb lub rooj tsavxwm uas haum rau UNO (lossis lub khob cij thiab qee cov xov hlau yog tias koj tsuas yog xav sim cov khoom tawm)

Rau cov ntawm koj uas xav tau kev daws teeb meem zoo dua hauv pob me dua, Kuv pom zoo xaj xaj pcb los ntawm JLCPCB (10pcs tus nqi kwv yees li 10usd nrog rau suav nrog suav nrog). Koj tuaj yeem pom cov ntaub ntawv gerber hauv qib 4.

Yog tias koj tsis paub tias yog dab tsi … koj tsis tas yuav tsum paub, tsuas yog rub tus zip thiab rub nws mus rau JLCPCB qhov chaw, tom qab ntawv xaj khoom. Xav paub ntau ntxiv txog qhov no hauv cov kauj ruam tom ntej.

JLCPCB ua daim ntaub thaiv ncaj ncaj rau koj Arduino UNO, koj tsuas yog yuav tsum tau muab tshuaj txhuam ntawm cov khoom siv thiab koj tau txais lub zoo meej, compact Attiny programmer ntawm koj tus kheej.

Kauj ruam 2: Pinout thiab Kev Sib Txuas

Pinout thiab Kev Sib Txuas
Pinout thiab Kev Sib Txuas
Pinout thiab Kev Sib Txuas
Pinout thiab Kev Sib Txuas

Nov yog daim duab ntawm Attiny85 pinout. Nws zoo ib yam rau Attiny25 thiab Attiny45. Pom lub voj voos me me nyob rau sab saud. Ua tib zoo mloog. Nws nyob ntawd yog li koj tsis ntsaws nws mus rau hauv Circuit Court rov qab los ntawm qhov yuam kev.

Ib nrab ntawm lub voj voos yog sawv cev los ntawm qhov me me dub ntawm lub nti (hauv daim duab nrog kev sib txuas hauv Circuit Court)

Rau txhua tus neeg uas tau ua lub rooj tsavxwm los ntawm kos, kev sib txuas yuav tsum yog raws li hauv qab no:

UNO ----- Attiny

Pin 10 --- Pin 1

Pin 11 --- Pin 5

Pin 12 --- Pin 6

Tus Pin 13 --- Tus Pin 7

5V -------- Pin 8

Gnd ------ Pin 4

TSIS TXAUS SIAB kom txuas lub capacitor ntawm Gnd thiab tus pin rov pib dua ntawm Arduino UNO.

Kuv pom zoo kom koj muab tus txiv neej lub taub hau tso rau hauv UNO tus poj niam lub taub hau, tso lub rooj tsavxwm tso rau saum toj kom txhua yam tseem nyob li qub tau thiab tom qab ntawd pib siv lub tshuab kom nws yuav haum txhua tom qab.

Thaum koj tau txuas nrog txhua yam, txheeb xyuas qhov kev sib txuas dua thiab qhov tseeb ntawm Attiny. (nco qhov me me ntawm lub nti)

Yog tias tsis muaj qhov ua yuam kev, koj tuaj yeem txav mus rau ntu software hauv qib 4 lossis koj tuaj yeem txav mus rau kauj ruam 3 thiab saib yuav ua li cas thiaj li ua tus kws tshaj lij ua PCB uas zoo li zoo dua thiab raug nqi ib yam tsis muaj dab tsi.

Kauj Ruam 3: Ua PCB

Ua PCB
Ua PCB

Koj tuaj yeem ua koj tus kheej PCB los ntawm kev sib txuas hauv cov kauj ruam txuas ntxiv lossis koj tuaj yeem yuav ib qho ua tiav los ntawm JLCPCB. (Tsis yog tus txhawb nqa, tab sis kuv xav tias lawv yog)

Tsis txhob txhawj xeeb, koj tsis tas yuav paub tias koj tab tom ua dab tsi, tsuas yog ua raws cov duab.

- Ua ntej rub tawm cov ntaub ntawv gerber (zip cov ntaub ntawv uas suav nrog kuv qhia) Tsis txhob unzip nws.

- Mus rau JLCPCB lub vev xaib, ntawm no.

- Luag thiab xa cov ntawv ZIP uas nws hais tias "Ntxiv koj gerber ntawm no" (raws li qhia hauv daim duab)

- Tsis tas yuav hloov lwm txoj hauv kev, yog li tsuas yog nyem rau "Txuag rau lub laub"

- Ib nplooj ntawv tshiab yuav qhib, tsuas yog nyem "Txheeb xyuas kom nyab xeeb"

- Ntawm nplooj ntawv tom ntej, koj yuav tsum tau sau koj cov ntaub ntawv thauj khoom thiab them nyiaj. Kuv pom zoo kom koj them nyiaj siv paypal thiab siv tus nqi pheej yig ntawm kev xa khoom (tus nqi tshaj tawm tab sis nws yuav tsum nyob ntawm koj lub qhov rooj tsis pub dhau 5 hnub), txawm li cas los xij qhov pheej yig tsis siv sijhawm ntev li ob peb lub lis piam.

- Nyem txuas ntxiv, them nyiaj rau koj cov laug cam thiab qhov ntawd yog nws. Koj yuav tau txais cov khoom ua tau zoo tshaj plaws rau ib sab tsis muaj dab tsi.

Tam sim no yog tias koj tsis xav tos JLCPCB los ua thiab xa koj cov laug cam lossis koj tsuas yog nyiam ua rau koj txhais tes qias neeg thiab tsis mloog qhov kawg cov khoom saib tsis meej, tsuav nws ua haujlwm, koj tuaj yeem ua koj tus kheej lub rooj tsavxwm siv hom kab txaij los ntawm kev yooj yim ua cov kev sib txuas tau hais hauv qib 3.

Kauj Ruam 4: Teeb Tus IDE

Kev teeb tsa IDE
Kev teeb tsa IDE
Kev teeb tsa IDE
Kev teeb tsa IDE
Kev teeb tsa IDE
Kev teeb tsa IDE

Thawj qhov koj yuav tsum tau ua yog qhib qhib Arduino IDE.

Mus rau File-> Preferences

Hauv "Tus Thawj Saib Xyuas Ntxiv URLs:" muab lo rau qhov no:

raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json

thiab nyem OK

Tom ntej no mus rau Cov Cuab Yeej-> Boards-> Tus Thawj Saib Xyuas Haujlwm (nyob rau sab saum toj ntawm cov npe)

Hauv "Lim koj qhov kev tshawb nrhiav …" hom attiny. Nws yuav tsum tsuas pom ib qho kev xaiv. Nyem rau nws thiab ntaus Nruab.

Thaum nws ua tiav kev teeb tsa, kaw IDE yog li txhua yam pib dua.

Nrog koj zoo siab! Koj nyuam qhuav ua tiav qhov nyuaj, tab sis koj tseem xav tau npaj koj li UNO rau program Attiny.

Kauj Ruam 5: Npaj UNO rau Kev Ua Haujlwm

Npaj UNO rau Txoj Haujlwm
Npaj UNO rau Txoj Haujlwm

Txhawm rau program Attiny, koj yuav tsum (ib txwm) ua ntej tshaj tawm cov duab tshwj xeeb rau UNO ua ntej.

Koj tuaj yeem pom cov duab kos hauv File-> Piv txwv-> ArdionoISP-> ArduinoISP

Thaum uas qhib, mus rau cov cuab yeej-> Cov laug cam thiab xaiv koj UNO

Upload cov duab kos rau nws raws li koj ib txwm xav tau.

Thaum qhov ntawd ua tiav, koj UNO tau hloov pauv mus ua tus programmer rau Attiny.

Mus tom ntej thiab ntsaws rau hauv daim ntaub thaiv uas koj tau ua hauv cov kauj ruam dhau los, ua tib zoo txuas cov pins raug thiab muab Attiny rau hauv txoj kev yog!

Tam sim no ntawm qhov tau tshaj tawm qhov program rau Attiny!

Kauj Ruam 6: Programming Attiny

Programming lub Attiny
Programming lub Attiny
Programming lub Attiny
Programming lub Attiny
Programming lub Attiny
Programming lub Attiny

Qhib IDE dua (ntaus Cov Ntaub Ntawv thiab nyem Tshiab) thiab mus rau Cov Cuab Yeej-> Boards

Yog tias koj nqes mus, nyob ntawd koj yuav pom tias tam sim no koj tuaj yeem xaiv Attiny25/45/85 ua pawg thawj coj.

Mus tom ntej thiab xaiv Attiny25/45/85 qhov kev xaiv thiab tam sim no rov qab mus rau Cov Cuab Yeej thiab hauv "Tus Txheej Txheem:" xaiv qhov uas Attiny koj xav siv.

Tab sis qhov ntawd tsis yog tag nrho.

Koj kuj yuav tsum hloov qhov "Programmer" xaiv rau: Arduino li ISP (tsis yog ArduinoISP, ceev faj)

Tam sim no ib zaug ua tiav, koj yuav tsum tuaj yeem xa koj cov cai mus rau Attiny tib txoj kev ib yam li koj ib txwm siv Arduino.

Kauj Ruam 7: Cov Lus Qhia Ntxiv

Cov Lus Qhia Ntxiv
Cov Lus Qhia Ntxiv

Yog tias koj xav hloov lub moos nrawm ntawm Attiny, koj tuaj yeem ua li ntawd los ntawm nias Cov Cuab Yeej-> Sab Hauv X MHz thiab tom qab ntawd nyem rau Hlawv bootloader, thaum koj Attiny txuas rau hauv UNO.

Qhov no yuav qhia rau Attiny kom hloov lub moos nrawm mus rau qhov nrawm uas koj tau xaiv. (Yog tias koj ncua sijhawm 1s thiab qhov ncua sijhawm tiag tiag yog luv dua lossis ntev dua li qhov ntawd, koj yuav tsum tau sim hloov lub moos nrawm)

Tsis tas li thaum koj yuav xav coj tus Attiny tawm ntawm tus programmer, kuv pom zoo siv qee tus tweezers lossis qee yam me me thiab tiaj tus, yog li koj tuaj yeem plam nws hauv qab Attiny thiab nqa txhua sab laug thiab sab xis tib lub sijhawm. Txoj kev ntawd koj yuav tsis khoov tus pin thaum nqa nws.

Yog tias koj nyiam qhov Qhia Ntawv no, txiav txim siab mus ntsib kuv nplooj ntawv Fundrazr ntawm no. Thiab tau kawg, qhia tawm.

Pom zoo: