Cov txheej txheem:

Kev Ua Haujlwm Chips Nrog Koj Arduino - AVR ISP Npog ATTiny85, ATTiny2313 thiab ATMega328: 3 Cov Kauj Ruam
Kev Ua Haujlwm Chips Nrog Koj Arduino - AVR ISP Npog ATTiny85, ATTiny2313 thiab ATMega328: 3 Cov Kauj Ruam

Video: Kev Ua Haujlwm Chips Nrog Koj Arduino - AVR ISP Npog ATTiny85, ATTiny2313 thiab ATMega328: 3 Cov Kauj Ruam

Video: Kev Ua Haujlwm Chips Nrog Koj Arduino - AVR ISP Npog ATTiny85, ATTiny2313 thiab ATMega328: 3 Cov Kauj Ruam
Video: Lus Tim Khawv Khixatia | "Koj Yuav Tsum Coj Ncaj thiaj li Dim" 2024, Kaum ib hlis
Anonim
Kev Ua Haujlwm Chips Nrog Koj Arduino - AVR ISP Npog ATTiny85, ATTiny2313 thiab ATMega328
Kev Ua Haujlwm Chips Nrog Koj Arduino - AVR ISP Npog ATTiny85, ATTiny2313 thiab ATMega328
Kev Ua Haujlwm Chips Nrog Koj Arduino - AVR ISP Npog ATTiny85, ATTiny2313 thiab ATMega328
Kev Ua Haujlwm Chips Nrog Koj Arduino - AVR ISP Npog ATTiny85, ATTiny2313 thiab ATMega328

Kuv pom qhov no yog daim ntawv sau los ntawm ntau xyoo dhau los. Nws tseem muaj txiaj ntsig rau kuv tsawg kawg yog li kuv yuav tshaj tawm nws!

Cov Lus Qhia no yog kev sib sau ntawm kev paub sau los ntawm ib puag ncig 'net thiab tseem' nstructables. Nws npog cov phiaj xwm ntawm AVR Microcontrollers, siv cov piv txwv ntawm ATTiny85, ATTiny2313 thiab ATMega328, nrog Arduino. Kuv tau siv cov txheej txheem no los tsim ntau yam ntawm gizmos ntau xyoo thiab tsis ntev los no tau siv nws los rov ua dua Arduinos uas tau poob rau hauv cov phiaj xwm, hloov lawv nrog "bootloaded" ATMega328 thiab ib feem ntawm cov khoom siv. Cov lus qhia no, zoo li ntau yam, tau tsim ntawm lub xub pwg ntawm cov neeg loj. Muaj ntau qhov peev txheej zoo thiab kuv vam tias yuav suav nrog lawv txhua tus, qee qhov kev koom nrog loj tshaj yog: Arduino rau BreadboardHigh Low Tech BlogLady Ada's AVR Dude TutorialRandal Bohn's Arduino Sketch Yog tias koj xav kawm tiag txog cov txheej txheem nws tsim nyog txheeb xyuas txhua qhov chaw tau teev tseg raws li lawv muaj cov lus qhia muaj txiaj ntsig thiab cov lus qhia rau thaum twg yam tsis ua haujlwm. Ok peb puas tau npaj? Cia peb sau peb cov cuab yeej. Ua raws li qhov no peb yuav saib cov cai uas ua txhua yam haujlwm hnyav tom qab ntawm qee qhov piv txwv nrog Arduino IDE, thiab peb tseem yuav taug kev luv mus rau qhov tsaus ntuj nrog AVRDude!

Kauj ruam 1: Sau koj cov cuab yeej

Nov yog teeb tsa yooj yim haum. Kuv tsis tau pom dua cov khoom siv hluav taws xob los ua qhov teeb meem thaum siv tus thawj Arduino uno raws li lub hauv paus yog li qhov no yuav zoo li liab qab me ntsis rau qee tus uas tau ntsib nrog AVR lub cajmeem. Koj yuav tsum tau:

  • Ib Arduino Uno
  • Cov qhob cij
  • Jumper Cables
  • Peb LEDs thiab Peb Tus Tiv Thaiv rau 5V

thiab koj xaiv AVR Chip

  • TSI 85
  • TSI 2313
  • NPE 328

Koj tsis tas yuav xav tau cov LEDs, tab sis lawv muaj txiaj ntsig zoo kom paub tias koj tus programmer ua haujlwm lossis yog tias koj muaj qhov ua yuam kev. Hais txog AVR Chip, koj tuaj yeem tsim kho AVRs feem ntau nrog cov txheej txheem no tsuav koj paub tias RST, MISO, MOSI thiab SCK nyob qhov twg. Qhov kev zam (uas ua rau lub siab xav) yog ntawm ATTiny10 thiab zoo li, lawv siv lwm txoj hauv kev.

Kauj ruam 2: Teem Koj Tus Kheej

Teem Koj Tus Kheej
Teem Koj Tus Kheej

Cia teeb kho vajtse ua ntej. Peb tab tom txuas cov LEDs kom peb tuaj yeem pom thaum lub rooj tsav tsheb pib ua lub neej. Txheeb xyuas daim duab hauv qab no. Muab cov ceg luv ntawm LEDs tso rau hauv -v lossis kab hauv av ntawm lub khob cij, uas yog tus nrog cov xaim dub nkag mus rau hauv. Thov txim yog tias muaj ib yam uas kuv hais zoo li txhawb nqa txhua txoj hauv kev, tab sis kuv nco qab tiag tiag tias nws zoo li cas thiaj li pib siv hluav taws xob, ntau qhov kev xav tau paub thiab yam me me tau ua rau kuv nyob rau qee lub sijhawm! Yog tias koj tseem tsis tau muaj, rub tawm qhov tseeb version ntawm Arduino IDE los ntawm cov neeg zoo nraug ntawm Arduino. Yog tias koj tsis siv tus thawj Arduino koj tuaj yeem hla ob peb qhov cuam tshuam hauv txoj hauv kev no lossis koj yuav tsis yog - koj kuj tseem xav xa qee cov nyiaj npias rau lawv raws li lawv tau ua pob zeb tiag tiag thiab raws li zej zog peb tshuav ntau rau lawv! Yog li koj puas muaj IDE? (uas yog software uas koj nyuam qhuav rub tawm - IDE sawv rau Kev Txhim Kho Ib puag ncig btw) Nruab qhov ntawd thiab ntsaws rau hauv koj Arduino, koj tuaj yeem siv cov tsav tsheb uas tuaj nrog IDE yog tias koj lub khoos phis tawj tsis tuaj tos Uno tam sim ntawd. Tam sim no tua hluav taws IDE. Arduino IDE tuaj nrog AVRISP kos duab txhua qhov npaj hauv> Piv txwv tab sis nws yog qub qub. Lub taub hau mus rau Github ntawm qhov txuas no nyem rau ntawm lub vijtsam nrog txhua cov ntawv, tuav tswj xovxwm A txhawm rau xaiv tag nrho. Tam sim no tuav tswj thiab nias C txhawm rau luam tag nrho cov ntawv. Rov qab mus rau koj Arduino IDE thiab Tswj V kom muab tshuaj txhuam nws. Xyuas kom tseeb tias qhov chaw nres nkoj COM raug xaiv (yog tias koj tsis paub qhov twg yog qhov raug koj tuaj yeem nyem rau ntawm lub khoos phis tawj hauv lub qhov rais pib ntawv qhia zaub mov (thov txim tsis txhawb nqa lwm OS nyob rau lub sijhawm no!) nthuav cov Ports (COM & LPT) ntawv qhia zaub mov thiab nws yuav tsum qhia koj Arduino li COM xijpeem). Tam sim no rub tawm daim duab. Txhua yam nyob zoo thiab tag nrho koj cov LEDs yuav tsum flicker nyob rau hauv ib theem zuj zus ces ib qho (Kuv xaiv xiav) yuav pib mem tes. Sim tsis txhob hypnotized. Tsis ua haujlwm? Tawm tswv yim hauv qab no thiab peb yuav pom tias peb tuaj yeem pab koj li cas! Thaum koj tau nws ua haujlwm, khaws cov duab kos rau koj phau ntawv sau, siv txuag li. Koj yuav xav khaws qhov no ua ke rau yav tom ntej siv.

Kauj Ruam 3: Bootloading ATMega328 - Ua Arduino Clone

Bootloading ATMega328 - Ua Arduino Clone!
Bootloading ATMega328 - Ua Arduino Clone!

Tam sim no kuv pib nrog ATMega328 vim nws yog qhov yooj yim tshaj plaws los ua "tawm ntawm lub thawv" thiab muaj daim ntawv thov sai. Hlawv lub bootloader los ua koj tus kheej lub khob cij Arduino lossis Cw. Mus saib daim duab hauv qab no. Tsis txhob txhawj xeeb tias tam sim no nws zoo li nthuav ntau dua li cov kauj ruam kawg - nws tsuas yog koj lub paj hlwb ntxias koj, tso siab thiab saib nws dua. Cov xov hlau xiav rau LEDs zoo ib yam, koj tau ua cov ntawd kom tsis txhob txhawj txog lawv. Cov xov hlau dub thiab liab los ntawm Arduino ib yam nkaus, lawv yog koj lub xov tooj hluav taws xob, peb xav kom tau txais lub zog rau lub nti. Yog li ntxiv cov ntawd. Tam sim no nws tsuas yog 4 xov hlau sab laug. Cov no yuav txuas rau koj tus Pins 10 txog 13 thiab rau qhov xav paub cov no yog:

  • Cov 10 - RST (Pib dua)
  • Digital 11 - MOSI (Master Out - Slave In)
  • Digital 12 - MISO (Master In - Qhev Tawm)
  • Cov 13 - SCK (Serial ClocK)

Yog li peb tab tom ua dab tsi yog lub caj dab los ntawm SPI Serial Peripheral Interface. Uas tau npog hauv qhov kev qhia zoo los ntawm Sparkfun uas muaj zog. Tam sim no vim li cas peb saib qhov no ua ntej. Mus rau> Cov cuab yeej ntawm koj li IDE, Tam sim no> Programmer> Arduino ua ISP. Nrog qhov tshuaj xyuas peb tuaj yeem rov qab mus rau> Cuab Yeej> Hlawv Bootloader. Tam sim no peb tab tom pom qee lub teeb ci LED thiab tos ib pliag. Cov lus hauv qab ntawm koj li IDE yuav tsum tig mus rau Bootloading ua tiav. Hav presto, nti uas nyob ntawm daim ntawv qhia zaub mov tam sim no tuaj yeem hloov mus rau hauv pob txha liab qab Arduino!

Pom zoo: