Cov txheej txheem:

Program a ATtiny With Arduino: 7 Kauj Ruam (nrog Duab)
Program a ATtiny With Arduino: 7 Kauj Ruam (nrog Duab)

Video: Program a ATtiny With Arduino: 7 Kauj Ruam (nrog Duab)

Video: Program a ATtiny With Arduino: 7 Kauj Ruam (nrog Duab)
Video: How to Program an ATtiny with Arduino (Up to Date) 2024, Hlis ntuj nqeg
Anonim
Program ATtiny Nrog Arduino
Program ATtiny Nrog Arduino

Cov hauv qab no yog cov lus qhia rau kev ua haujlwm ATtiny microcontrollers siv Arduino IDE. Hauv cov lus Askiv yooj yim, qhov no yog yuav ua li cas program 8-pin Atmel chips zoo li koj ib txwm yog Arduino. Qhov no yog qhov txias vim tias ATtiny me me, thiab - zoo - qhov no tso cai rau koj los ua cov khoom me me uas tsis xav tau loj ol 'microcontroller loj.

Cov lus qhia kuv tau tshaj tawm ntawm no zoo ib yam nkaus li cov lus qhia tau muab los ntawm qhov tsis txaus ntseeg High-Low Tech Tutorial. Kuv tshaj tawm kuv cov lus qhia ntawm no vim tias kuv npaj yuav ua ob peb txoj haujlwm yav tom ntej siv ATtiny chips thiab xav tias kuv yuav qhia kuv cov txheej txheem.

Kauj ruam 1: Mus Tau Cov Khoom

Mus Tau Cov Khoom
Mus Tau Cov Khoom

Koj yuav xav tau:

- Arduino - Breadboard - ATtiny85 (lossis ATtiny45) - 10uF electrolytic capacitor- 220ohm 1/4 watt resistor - LED - txuas txuas hlau

Thov nco ntsoov tias qee qhov txuas ntawm nplooj ntawv no muaj Amazon cov koom nrog txuas. Qhov no tsis hloov tus nqi ntawm ib yam ntawm cov khoom muag. Txawm li cas los xij, Kuv khwv tau nyiaj me me yog tias koj nyem rau ntawm ib qho ntawm cov txuas thiab yuav dab tsi. Kuv rov nqis peev cov nyiaj no rau hauv cov ntaub ntawv thiab cov cuab yeej rau cov phiaj xwm yav tom ntej. Yog tias koj xav tau lwm txoj kev tawm tswv yim rau tus xa khoom ntawm ib qho ntawm cov khoom, thov qhia rau kuv paub.

Kauj Ruam 2: Txhim Kho Cov Hluav Taws Xob

Hlau Circuit
Hlau Circuit
Hlau Circuit
Hlau Circuit
Hlau Circuit
Hlau Circuit
Hlau Circuit
Hlau Circuit

Txuas Arduino rau ATtiny raws li hauv qab no:

  • Arduino +5V - Tus Pin Pin 8
  • Arduino Av - ATtiny Pin 4
  • Arduino Pin 10 - ATtiny Pin 1
  • Arduino Pin 11 - ATtiny Pin 5
  • Arduino Pin 12 - Tus Pin Pin 6
  • Arduino Pin 13 - ATtiny Pin 7

Kauj ruam 3: Program Arduino

Program Arduino
Program Arduino
Program Arduino
Program Arduino
Program Arduino
Program Arduino

Xaiv "ArduinoISP" kos duab los ntawm "Piv txwv" ntawv qhia zaub mov.

Xa cov duab kos rau koj Arduino zoo li koj xav tau lwm yam duab kos.

Koj Arduino tam sim no tau teeb tsa ua tus programmer uas tuaj yeem ua haujlwm rau lwm cov chips.

Kauj Ruam 4: Lim Cap

Lim Cap
Lim Cap

Muab 10uF capacitor nruab nrab ntawm hauv av thiab Arduino pib dua tus pin. Nco ntsoov khaws lub qhov muag ntawm lub capacitors polarity (hauv av rau hauv av!).

Nws yog lus xaiv koj tsuas xav tau qhov no rau Arduino Uno, tab sis kuv tau pom nws tau pab teeb meem kom suav nrog nws nrog cov ntawv ua ntej ib yam nkaus. Yog tias koj pom tias nws tsis ua haujlwm hauv cov kauj ruam tom ntej, tshem tawm nws yooj yim thiab pom tias qhov ntawd pab tau.

Kauj ruam 5: ATtiny Core Cov Ntaub Ntawv

ATtiny Core Cov Ntaub Ntawv
ATtiny Core Cov Ntaub Ntawv
ATtiny Core Cov Ntaub Ntawv
ATtiny Core Cov Ntaub Ntawv

Nco tseg ntawm koj phau ntawv teev cov duab kos los ntawm Arduino cov ntawv qhia ua nyiam.

Tsim cov ntawv tshiab hauv koj phau ntawv teev npe sketchbook hu ua "hardware"

Tom qab ntawd, mus rau nplooj ntawv no thiab rub tawm cov ntawv: attiny45_85.zip

Unzip cov ntawv no thiab tso nws rau hauv cov ntawv kho vajtse tshiab.

Thaum kawg, rov pib dua Arduino qhov chaw ib puag ncig. Tam sim no cov cores tshiab yuav tsum tau thauj khoom.

Nco ntsoov tias tseem muaj cov ntaub ntawv tseem ceeb rau tus lej ntawm lwm cov ATtiny chips. Nplooj ntawv no yog qhov pib zoo rau cuam tshuam nrog ntau yam ntawm lawv siv Arduino.

Kauj Ruam 6: Program ATtiny

Program qhov ATtiny
Program qhov ATtiny

Xaiv los ntawm cov ntawv qhia saum toj kawg nkaus: Cov Cuab Yeej Cuab Yeej ATtiny85 (w/ Arduino ua ISP)

(Tau kawg, koj yuav xav xaiv qhov sib txawv rau qhov no yog tias koj siv ib qho.)

Tom qab ntawd qhib qhov piv txwv ntsais muag yooj yim thiab hloov tus lej tus lej los ntawm 13 txog 0.

Thaum kawg, upload nws li koj xav tau lwm yam duab.

Nws yuav tsum muab qhov yuam kev hauv qab no ob zaug: avrdude: thov txhais PAGEL thiab BS2 cov cim hauv cov ntaub ntawv teeb tsa rau ntu ATtiny85 avrdude: thov txhais PAGEL thiab BS2 cov cim hauv cov ntaub ntawv teeb tsa rau ntu ATtiny85

Tsuas yog tsis quav ntsej cov lus yuam kev thiab koj yuav tsum zoo mus.

Kauj Ruam 7: Xeem Circuit

Kuaj Circuit Court
Kuaj Circuit Court
Kuaj Circuit Court
Kuaj Circuit Court
Kuaj Circuit Court
Kuaj Circuit Court

Txuas 220 ohm resistor rau tus pin 5.

Txuas tus LED ntawm tus tiv thaiv thiab +5V.

Nws yuav tsum ntsais muag.

Nrog koj zoo siab. Koj ua tiav

Duab
Duab

Koj puas pom qhov no muaj txiaj ntsig, lom zem, lossis lom zem? Ua raws @madeineuphoria kom pom kuv cov phiaj xwm tshiab kawg.

Pom zoo: