Cov txheej txheem:

Tsawg Yam Tsawg - Arduino ntawm Breadboard: 5 Kauj Ruam
Tsawg Yam Tsawg - Arduino ntawm Breadboard: 5 Kauj Ruam
Anonim
Tsawg Yam Tsawg - Arduino ntawm Breadboard
Tsawg Yam Tsawg - Arduino ntawm Breadboard

Arduino siv lub ATMega328p nti. Peb tuaj yeem tau txais qhov ntawd hauv SMD hom ntawv (ATMega328p-AU) lossis DIP hom rau lub qhov dej sib txuas (ATMega328p-PU). Tab sis, nti los ntawm nws tus kheej tsis tuaj yeem ua haujlwm. Nws xav tau ob peb yam ntxiv thiab txhua qhov ua ke yog hu ua qhov tsawg kawg nkaus teeb tsa ntawm cov nti no.

Kauj Ruam 1: Yooj Yim Schematic

Yooj Yim Schematic
Yooj Yim Schematic

Hauv qab no peb muaj cov qauv rau qhov teeb tsa no. Raws li koj tuaj yeem pom peb xav tau cov khoom siv ntawm 5 volts. Cov khoom siv no yuav tsum tau tswj tau zoo heev yam tsis muaj qhov ntsuas hluav taws xob nce. Rau qhov ntawd thiab ntxiv 10uF capacitor ntawm 5V thiab GND. Alos, tus pin rov pib dua yog qhov ua tsis tau zoo. Yog li, txhawm rau kom nws xiam oob qhab, peb yuav tsum thov 5V rau nws. Txog qhov ntawd, 10k ohms resistor tau muab tso nruab nrab ntawm RESET thiab Vcc. Tsis tas li, ATMega328, feem ntau ua haujlwm ntawm 16MHz. Rau qhov ntawd, ntawm tus lej 9 thiab 10 peb muab 16MHz siv lead ua. Tab sis qhov siv lead ua no, txhawm rau oscillate xav tau ob lub peev txheej ntawm qhov tseeb 22pF txuas nrog GND. Hauv daim duab abve, koj muaj tag nrho cov pins ntawm nti. Tam sim no, yog lub microcontroller muaj bootlaoder, peb tuaj yeem tso tus lej. Tab sis cia peb xav tias nws tsis muaj bootloader.

Kauj ruam 2: Hlawv Bootloader

Hlawv Bootloader
Hlawv Bootloader

Tam sim no, cia xav txog lub nti tsis muaj bootloder (nkauj xwb). Rau qhov ntawd koj yuav tsum ua txuas txuas ntxiv los ntawm Arduino UNO. Cov no yog SPI pins, CLOCK, MISO thiab MOSI.

Kauj ruam 3: Txuas Arduino rau PC

Txuas Arduino rau PC
Txuas Arduino rau PC

Tam sim no txuas Arduino rau koj lub PC. Qhib Arduino IDE thiab mus rau File → Piv txwv → Arduino ISP thiab qhib qhov piv txwv ntawd. Xaiv com ntawm Arduino UNO board, xaiv pawg thawj coj ua Arduino UNO thiab ua raws li txoj cai no.

Kauj ruam 4: Bootloader

Bootloader
Bootloader

Tam sim no ua qhov sib txuas yav dhau los schematic thiab yog lub sijhawm los hlawv lub bootloader. Mus rau Cov Cuab Yeej → programmer → Arduino ua ISP. Los ntawm qhov ntawd peb hloov tus programmer mus rau ISP.

Kauj ruam 5: Thaum kawg Hlawv Bootloader

Thaum kawg Hlawv Bootloader
Thaum kawg Hlawv Bootloader

Thaum kawg, mus rau Cov Cuab Yeej → Hlawv bootloader. Tam sim no LEDs ntawm Arduino yuav ntsais muag heev. Thaum koj tau txais cov lus ntawm bootlaoder hlawv peb zoo mus.

Pom zoo: