Cov txheej txheem:

$ 2 Arduino. ATMEGA328 Raws Li Ib Leeg Ib Leeg. Yooj Yim, Pheej Yig thiab Me Me. Phau Ntawv Qhia Tiav: 6 Kauj Ruam (nrog Duab)
$ 2 Arduino. ATMEGA328 Raws Li Ib Leeg Ib Leeg. Yooj Yim, Pheej Yig thiab Me Me. Phau Ntawv Qhia Tiav: 6 Kauj Ruam (nrog Duab)

Video: $ 2 Arduino. ATMEGA328 Raws Li Ib Leeg Ib Leeg. Yooj Yim, Pheej Yig thiab Me Me. Phau Ntawv Qhia Tiav: 6 Kauj Ruam (nrog Duab)

Video: $ 2 Arduino. ATMEGA328 Raws Li Ib Leeg Ib Leeg. Yooj Yim, Pheej Yig thiab Me Me. Phau Ntawv Qhia Tiav: 6 Kauj Ruam (nrog Duab)
Video: Using 2 Pin IF Receivers/Emitters | Arduino Tutorial 2024, Hlis ntuj nqeg
Anonim
Image
Image
Daim Ntawv Teev Npe
Daim Ntawv Teev Npe

Hauv cov lus qhia no koj yuav kawm paub siv Arduino ATMEGA328 microcontroller nti li ib leeg microcontroller sawv ib leeg.

Lawv raug nqi tsuas yog 2 npib, tuaj yeem ua tau zoo ib yam li koj Arduino thiab ua rau koj cov phiaj xwm me me.

Peb yuav npog tus txheej txheem tus pin, yuav ua li cas kom nws npaj rau Arduino software los ntawm kev hlawv lub bootloader thiab yuav ua li cas rub cov duab kos.

Saib qhov seem ntawm cov lus qhia no kom paub seb koj tuaj yeem ua rau koj cov phiaj xwm Arduino me dua thiab pheej yig dua nyob rau lub sijhawm twg.

Kauj Ruam 1: Daim Ntawv Teev Npe

1 Arduino

1 ATMEGA328P-PU nti. Kuv tau txais kuv ntawm no:

Cov qhob cij

Hlau

Yeem: LED thiab 330 ohm resistor rau kev sim

Kauj ruam 2: Rub tawm thiab Nruab Qiv

Rub tawm thiab Nruab Qiv
Rub tawm thiab Nruab Qiv
Rub tawm thiab Nruab Qiv
Rub tawm thiab Nruab Qiv

Ib pawg Arduino los ua tus qauv nrog 16MHz sab nraud oscillator.

Peb tsis xav tau qhov 16MHz oscillator li ATMEGA328P-PU muaj 8MHz oscillator tsim hauv.

Txhawm rau ua kom cov nti no ua haujlwm ib leeg tswj hwm tus kheej ntawm 8MHz, peb yuav tsum rub tawm thiab teeb tsa lub tsev qiv ntawv rau peb ib puag ncig Arduino.

Txhawm rau ua qhov no, nyem qhov txuas uas phim koj Arduino version txhawm rau rub tawm cov ntawv zip.

Nws yuav noj 1-6-x.zip, 1-5-x.zip lossis 1-0-x.zip

Hlawv Bootloader
Hlawv Bootloader

Tom ntej no peb yuav tsum nrhiav Arduino sketchbook nplaub tshev los ntawm nyem rau ntawm File → nyiam → “Sketchbook Location”. Hauv kuv qhov xwm txheej "C: / Users / tomtomheylen / Documents / Arduino" qhov no tuaj yeem txawv hauv koj rooj plaub.

Luam qhov chaw thiab mus rau "lub pc no", muab nws tso rau hauv kab ntawv thiab nias sau.

Yog tias koj pom daim nplaub tshev hu ua "hardware", qhib nws.

Yog tias tsis yog, ua daim nplaub tshev tshiab hu ua "kho vajtse" los ntawm txhaj rau sab xis thiab xaiv "nplaub tshev tshiab" thiab ntaus "kho vajtse". Tam sim no qhib nws.

Txav cov ntawv tais ceev tseg los ntawm zip khaws rau "nplaub tshev" nplaub tshev.

Hlawv Bootloader
Hlawv Bootloader

Rov pib dua koj Arduino IDE thiab mus rau "Cov cuab yeej → board".

Yog tias txhua yam zoo, koj yuav tsum pom hauv daim ntawv "Atmega 328 ntawm lub khob cij (8MHz moos sab hauv)".

Qhov nyuaj tshaj plaws yog ua tam sim no yog li cia peb muaj kev lom zem siv lub neej hauv ATMEGA328 ntawd.

Kauj ruam 3: Hlawv Bootloader

Cov ATMEGA328 microcontroller chips feem ntau tuaj tas. Txhawm rau kom lawv ua haujlwm nrog Arduino IDE, peb yuav tsum ua qee yam hu ua "hlawv bootloader". Nws yog qhov me me ntawm cov cai peb hlawv ntawm lub nti yog li nws yuav nkag siab txog Arduino software.

Uploading Sketches
Uploading Sketches

Txhawm rau ua qhov no, txuas koj Arduino rau koj lub computer thiab mus rau "Cov ntaub ntawv → piv txwv → ArduinoIsp" thiab xaiv "Arduino Isp". Tshaj tawm cov duab kos no rau koj Arduino thiab txiav tawm ntawm koj lub khoos phis tawj.

Uploading Sketches
Uploading Sketches

Tom ntej no peb txuas Arduino nrog ATMEGA328 raws li koj tuaj yeem pom hauv daim duab.

Nco tseg lub voj voog ib nrab ntawm cov nti. Xyuas kom nws nyob ntawm qhov raug.

Tam sim no txuas koj Arduino thiab hauv Arduino IDE mus rau "cuab yeej → Programmer" thiab xaiv "Arduino ua ISP".

Tom ntej no mus rau "Cov cuab yeej → Pawg" thiab xaiv "Atmega 328 ntawm lub khob cij (8MHz moos sab hauv)".

Tam sim no mus rau cov cuab yeej thiab xaiv "Hlawv Bootloader".

Koj lub bootloader tau hlawv thiab koj lub nti tau npaj txhij los rub cov duab kos!

Yog tias koj muaj lus yuam kev, tshem koj lub Arduino thiab rov ua cov kauj ruam dhau los.

Kauj Ruam 4: Upload Sketches

Txhawm rau rub cov duab kos koj yuav tsum tshem lub ATMEGA328 nti los ntawm Arduino pawg thawj coj thiab txuas rau lub khob cij raws li qhia hauv daim duab.

Koj kuj tseem tuaj yeem siv USB rau cov programmer zoo li FT232RL los ua qhov no. Kuv tau ua daim ntawv qhia mini ntawm no ntawm no:

Kuv tau txuas nrog tus coj nrog tus tiv thaiv ntawm lub rooj tsavxwm kom sim qhov muag ntsais muag.

Nov yog yuav siv cov duab no li cas rau tus pin tus qauv.

Yog li piv txwv yog tias koj pib tus pin 13 hauv IDE, nws sawv cev tus pin 13 ntawm Arduino board lossis tus pin 19 ntawm ATMEGA328 nti.

Nrog koj zoo siab, koj ua tau! Tam sim no koj tuaj yeem pib siv koj tus kheej cov haujlwm me me Arduino rau tom ntej kom tsis muaj dab tsi.

Kauj Ruam 5: Cov Lus Qhia Muaj Tseeb

Ob peb Cov Lus Qhia Pab Tau
Ob peb Cov Lus Qhia Pab Tau

Kuv yuav xaus qhov kev qhia no los ntawm kev muab koj ob peb yam lus qhia ntxiv:

Yog tias koj xuas tes ua qhov haujlwm, koj yuav tsum siv 28 tus pin DIP lub qhov (socket) thiab ntxiv ATMEGA328 tom qab ua haujlwm qhov project.

Kuv tau kuv tus kheej ntawm no

Nws yog qhov kev coj ua zoo kom muab qee tus poj niam ua phem rau tus poj niam header pins rau 3 thawj ceg yog li koj tseem tuaj yeem hloov lossis xa cov duab kos yog xav tau.

Yog tias koj lub micro tswj tau coj txawv txawv, koj tuaj yeem ntxiv 10 txog 100 uf capacitor nyob nruab nrab ntawm + thiab -.

Nco ntsoov thaum koj xaj cov nti tias nws yog ATMEGA328P-PU.

Kauj Ruam 6: Lus Cim Kawg

Koj puas nyiam cov lus qhia no, thov nyem qhov Nyiam khawm thiab sau npe yuav.

Kuj txheeb xyuas kuv "Yuav ua li cas kho Suav Arduino clones" qhia tau.

Pom koj hauv Cov Lus Qhia tom ntej.

Ua tsaug, Tom Heylen

Facebook:

Pub dawb los pab kuv ua txoj haujlwm no:

Pom zoo: