Cov txheej txheem:

DIY Attiny Programming Shield: 8 Kauj Ruam (nrog Duab)
DIY Attiny Programming Shield: 8 Kauj Ruam (nrog Duab)

Video: DIY Attiny Programming Shield: 8 Kauj Ruam (nrog Duab)

Video: DIY Attiny Programming Shield: 8 Kauj Ruam (nrog Duab)
Video: Good bye Arduino? Welcome ATtiny 1-Series!! UPDI --geil!! 2024, Kaum ib hlis
Anonim
Image
Image
DIY Attiny Programming Shield
DIY Attiny Programming Shield
DIY Attiny Programming Shield
DIY Attiny Programming Shield

Yog tias koj tab tom nrhiav me me thiab qis zog Arduino pawg thawj coj saib Attiny yog qhov kev xaiv zoo tiag tiag, nws muaj qhov xav tsis thoob rau nws qhov loj me. Nws muaj 5 GPIO pins, 3 ntawm uas yog Analog pins thiab 2 uas muaj PWM tso tawm. Nws kuj tseem yoog tau rau qhov hluav taws xob uas nws khiav tawm (2.7V txog 5.5V) yog li nws zoo tshaj rau kev khiav tawm roj teeb. Puas yog kuv tseem hais nws tsuas yog tus nqi kwv yees li $ 1!? peb yuav mus dhau qhov kev qhia no.

Twb muaj ntau cov lus qhia rau kev tsim cov ntaub thaiv npog, tab sis muaj cov kauj ruam uas ploj lawm thaum siv cov tshiab ntawm Arduino IDE hauv software teeb tsa hauv txhua qhov uas kuv tau txheeb xyuas tias kuv yuav hla ntawm no ib yam nkaus. Txheeb tawm cov vis dis aus saum toj no Kuv mus dhau txhua cov ntaub ntawv uas muaj nyob hauv phau ntawv qhia no.

Cia peb mus rau nws!

Kauj Ruam 1: Breadboard Programmer Circuit

Breadboard Programmer Circuit
Breadboard Programmer Circuit

Kuv xav tias nws tsim nyog sau cia tias koj tuaj yeem siv daim phiaj ua mov ci los ua haujlwm rau qhov zoo ib yam yog tias koj xav kom tsis tas yuav tsim daim thaiv npog. Kuv xav tau daim ntaub thaiv yog li kuv yuav muaj qee yam ruaj khov siv yav tom ntej. Yog tias koj xaiv rau tus kws ua zaub mov noj, cov software tom qab ntawd yog qhov zoo ib yam li rau daim ntaub thaiv. Hla mus rau kauj ruam 5 rau qhov no.

Kauj ruam 2: Yam Koj Yuav Tsum Tau

Yam Koj Yuav Tsum Tau
Yam Koj Yuav Tsum Tau
Yam Koj Yuav Tsum Tau
Yam Koj Yuav Tsum Tau

Koj yuav xav tau cov hauv qab no los tsim tus programmer:

Attiny85* - Tej zaum yuav xav tau ib qho ntawm no:) Protoboard (10 daim)*Txiv neej Header Pins*120 Daim Capacitor Teeb (muaj 10uF uas peb xav tau)*IC qhov (20 pob)*Cov khoom pib pib (muaj LED thiab 1K resistor uas peb xav tau)*

Mega board kuv siv* - ib qho Mega lossis Uno yuav ua haujlwm txawm hais tias.

Koj tseem yuav xav tau cov hlau txuas thiab qee cov xov hlau, *= Cov koom nrog txuas

Kauj Ruam 3: Txheej txheej ntawm daim ntaub thaiv npog

Layout ntawm Shield
Layout ntawm Shield
Layout ntawm Shield
Layout ntawm Shield
Layout ntawm Shield
Layout ntawm Shield
Layout ntawm Shield
Layout ntawm Shield

Hauv cov duab saum toj no koj tuaj yeem pom qhov txheej txheem ntawm daim ntaub thaiv peb yuav ua. Kuv pom cov duab nrog cov khoom sib txuas thiab cov xov hlau yog me me heev vim li ntawd kuv tau tsim cov khoom siv hluav taws xob tsuas yog cov xov hlau thiab tsuas yog cov khoom siv kom yooj yim nyeem.

Koj tsis tas yuav siv tus pin ntau npaum li kuv tau ua, Kuv tau kos rau hauv daim duab kawg ntawm cov koob uas xav tau tiag tiag, Kuv tsuas yog xav tias nws yuav yooj yim dua los ntsaws rau hauv daim ntaub thaiv hauv qhov chaw raug yog tias nws siv txhua tus pin ntawm sab saum toj thiab hauv qab.

Kauj Ruam 4: Tsim Shield

Txhim Kho Shield
Txhim Kho Shield
Txhim Kho Shield
Txhim Kho Shield
Txhim Kho Shield
Txhim Kho Shield

Nws yog txoj kab ncaj nraim rau pem hauv ntej kom tsim, qhov nyuaj tshaj plaws yog tej zaum tsuas yog tau txais cov koob raug.

Qhov uas kuv tau ua tus pin yog:

  • Txiav tus txiv neej lub hau taub hau kom lawv haum rau saum thiab hauv qab kab ntawm koj Mega/Uno.
  • Ntxig lawv rau hauv Arduino.
  • Muab lub protoboard tso rau saum thiab kos lawv siv rab riam ntse.
  • Tshem cov headers los ntawm arduino.
  • Thawb cov yas ntawm lub taub hau rau ib kawg ntawm tus pin (Kuv siv lub protoboard rau qhov no, tsuas yog thawb nws mus rau ntawm lub rooj). Lawv yuav tsum zoo li cov pins hauv daim duab saum toj no
  • Muab cov pins hla dhau ntawm lub protoboard (yas saum)
  • Muab lawv tso rau hauv qhov chaw, cov laug tsuas yog txaus los tuav hauv qhov chaw tam sim no.

Tom qab ntawd nws tsuas yog rooj plaub ntawm kev tsim lub Circuit Court, ntxig koj cov khoom sib txuas los ntawm thiab khoov tus pin ntawm qhov uas koj xav tau txuas rau lawv thiab ua kom sib txuas sib txuas ua ke. Kuv nyiam siv cov xim xiav los tuav kuv cov khoom nyob hauv qhov chaw thaum kuv tab tom siv. Kuv tau suav nrog daim duab tiav hauv qab ntawm kuv lub rooj tsavxwm kom pom tias kuv li zoo li cas. Nco ntsoov xyuas ob zaug ntawm kev coj ua ntawm LED thiab Capacitor ua ntej muab nws tso rau. Rau LED tus tiv thaiv yuav tsum txuas nrog lub luv coj ntawm LED. Rau lub tshuab hluav taws xob txhais ceg nrog cov nyiaj cim sab saud nws yuav tsum txuas nrog hauv av. Thaum kawg nws yog lub tswv yim zoo los muab koj tus kheej qee qhov cim lossis hint kom ceeb toom koj txog kev taw qhia ntawm Attiny thaum ntsaws nws. Yog tias koj txheeb xyuas qhov kawg duab saum toj no kuv qhia ib daim duab ntawm kuv khij lub kaum sab laug hauv qab, qhov no kom phim nrog cov teev ntawm qhov kev xav.

Yog tias koj muaj ntau lub ntsuas, kuv xav hais qhia ntsuas cov pins rau ib qho txuas nruab nrab ntawm, tshwj xeeb tshaj yog cov hauv qab pins vim lawv yog lub hwj chim pins.

Kauj Ruam 5: Teeb Koj Tus Kheej

Teem Koj Tus Kheej
Teem Koj Tus Kheej
Teem Koj Tus Kheej
Teem Koj Tus Kheej
Teem Koj Tus Kheej
Teem Koj Tus Kheej

Txhawm rau siv peb Arduino ua tus programmer peb thawj zaug yuav tsum nyem qhov kos rau nws. Ua ntej tshaj ntsaws rau hauv koj daim thaiv rau koj arduino, lawv ntsaws rau hauv USB cable rau hauv koj arduino. Open Arduino IDE, tom qab ntawv nyem rau File -> Piv txwv - > 11. ArduinoISP -> ArduinoISP

Peb yuav tsum tau hloov pauv rau cov ntaub ntawv no, qhov no yog ntu kuv pom ploj ntawm tag nrho lwm cov lus qhia.

Scroll cia rau ntawm cov ntawv no kom txog thaum koj pom cov lus tawm kab // #define USE_OLD_STYLE_WIRING

Tshem tawm cov lus tawm ntawm kab no (yog li tam sim no nws yuav zoo li #define USE_OLD_STYLE_WIRING)

Tam sim no koj tuaj yeem xa cov duab kos no rau koj li arduino zoo li koj xav tau lwm yam duab kos.

Kauj Ruam 6: Teeb Arduino IDE rau Attiny

Teeb tsa Arduino IDE rau Attiny
Teeb tsa Arduino IDE rau Attiny
Teeb tsa Arduino IDE rau Attiny
Teeb tsa Arduino IDE rau Attiny
Teeb tsa Arduino IDE rau Attiny
Teeb tsa Arduino IDE rau Attiny

Peb yuav tsum teeb tsa Attiny software los ntawm tus thawj tswj hwm ua ntej peb tuaj yeem ua haujlwm rau Attiny

Thawj qhov peb yuav tsum tau ua yog ntxiv kab tshiab rau peb Tus Thawj Saib Xyuas Ntxiv URLs uas tuaj yeem pom nyob hauv Cov Ntaub Ntawv -> Nyiam

Qhov URL koj xav tau ntxiv yog:

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

Nyem lub pob rau sab xis ntawm Tus Thawj Saib Xyuas Haujlwm URL lub npov thiab nkag mus rau saum toj ntawm kab tshiab.

Tam sim no koj xav qhib Tus Thawj Saib Xyuas Haujlwm, mus rau Cov Cuab Yeej -> Pawg Thawj Coj: "xijpeem raug xaiv" -> Tus Thawj Saib Xyuas Pawg

Nrhiav "attiny" thiab nyem rau nruab.

Kauj Ruam 7: Programming Attiny

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

Tam sim no peb tau npaj los pib lub phiaj xwm Attiny.

Hauv Cov Cuab Yeej, xaiv cov hauv qab no:

  • Xaiv ATtiny25/45/85 los ntawm Boards nco cia.
  • Xaiv Attiny85 los ntawm tus txheej txheem nco cia.
  • Xaiv Sab Hauv 8 MHz los ntawm Clock drop down.
  • Chaw nres nkoj yuav tsum yog Com chaw nres nkoj rau Arduino koj tab tom siv ua tus programmer.
  • Xaiv Arduino ua ISP los ntawm Programmer drop down.

Tam sim no peb tuaj yeem hlawv lub bootloader, muaj cov lus piav qhia zoo ntawm qhov bootloader ua thiab qhov zoo/qhov tsis zoo ntawm no. Mus rau Cov Cuab Yeej dua thiab xaiv Hlawv Bootloader.

Tom ntej no peb yuav tsum tau teeb tsa cov duab kos rau Attiny

Qhib qhov piv txwv ntsais muag yooj yim: Cov Ntaub Ntawv -> Piv txwv -> Hauv paus -> Blink

Raws li qhov kev txiav txim siab tsis muaj tus pin rau LED_BUILTIN, peb yuav tsum hloov qhov ntawd hauv peb daim duab nrog 0 raws li peb muaj peb tus LED ntawm tus pin 0. Koj yuav tsum muaj peev xwm tso cov duab kos no rau koj lub rooj tsavxwm los ntawm txhaj upload. LED yuav tsum cia siab ntsais!

Kauj Ruam 8: Ua Me Me Attiny

Ua Dawb Me Me Attiny!
Ua Dawb Me Me Attiny!
Ua Dawb Me Me Attiny!
Ua Dawb Me Me Attiny!
Ua Dawb Me Me Attiny!
Ua Dawb Me Me Attiny!

Tam sim no nws tau loj hlob tag nrho nws lub sijhawm tshem tawm qhov kev tshem tawm los ntawm nws lub phiaj xwm phiaj xwm hauv tsev. Kuv pom txoj hauv kev zoo tshaj plaws los ua qhov no yog siv lub taub hau ncaj ntsia hlau tsav nws tawm. Yog tias koj tsuas yog rub nws tawm ncaj qha koj muaj lub luag haujlwm khoov cov pins. Muab tus ntswj ntsia hlau tso rau hauv qab ntawm ib sab ntawm ib sab thiab maj mam txhuam nws tawm, thaum sab ntawd tsis txav mus rau lwm sab thiab rov ua dua. Hauv qhov piv txwv kawg kuv qhia koj li cas txawm tias koj tuaj yeem siv lub npib cell roj teeb kom muaj zog nws! Vam tias koj pom cov lus qhia no muaj txiaj ntsig, yog tias koj muaj lus nug thov ua siab dawb nug!

Kwj Dej Nyob: Kuv nyob kwj dej ua haujlwm ntawm cov phiaj xwm hluav taws xob txhua hnub Monday ntawm Twitch

Thiab kuv tham txog hluav taws xob thiab lwm yam khoom siv tsis raug ntawm twitter - @witnessmenow

Brian

Pom zoo: