Cov txheej txheem:

Me Me Micro-controller Project rau Hauv $ 2 Bucks: 11 Kauj Ruam
Me Me Micro-controller Project rau Hauv $ 2 Bucks: 11 Kauj Ruam

Video: Me Me Micro-controller Project rau Hauv $ 2 Bucks: 11 Kauj Ruam

Video: Me Me Micro-controller Project rau Hauv $ 2 Bucks: 11 Kauj Ruam
Video: 20 MOMENTS YOU WOULDN'T BELIEVE IF NOT FILMED 2024, Kaum ib hlis
Anonim
Me Me Micro-controller Project rau Hauv $ 2 Bucks
Me Me Micro-controller Project rau Hauv $ 2 Bucks

Muaj ntau ntau hauv is taws nem hais txog kev pib nrog Micro tswj. Muaj ntau txoj hauv kev xaiv tawm, muaj ntau txoj hauv kev los ua haujlwm rau lawv txawm tias koj tsis pib nrog lub ntsej muag liab qab nws tus kheej, cov laug cam txhim kho lossis ntau dua SOC (System On Chip) cov cuab yeej tseem muaj ntau txoj hauv kev rau lawv.

Yog li rau cov uas txaus siab, qhov no yog ib qho ntawm lawv.

USBASP + AVR ATTiny85 mini USB dev board (Los ntawm Digistump)

Kuv nyiam qhov sib xyaw ua ke no vim tias nws yog txoj hauv kev pheej yig kom tau txais txoj haujlwm mus rau hauv daim ntawv me me-qhov tseem ceeb Arduino platform, cov chips no me me koj tuaj yeem tso lawv rau hauv kev ua haujlwm yam tsis zoo li Unos tsis tsim nyog.

Pawg thawj coj saib siv yog tus nqi pheej yig digispark kicksarter knockoff tuaj ntawm tus whopping $ 1 ntawm ebay nrog kev xa khoom thoob ntiaj teb dawb.

Tus programmer yog tus qhib qhov chaw USBASP programmer kuj tseem muaj nyob ib puag ncig tus nqi ib yam ntawm ebay lossis AliExpress

Cov lus qhia no yog qhov kawg rau txheej txheem kom tau txais dev-board los ua ib yam dab tsi

Txoj hauv kev yooj yim dua yog kom tau txais qhov tseeb digispark los ntawm digistumphttps://digistump.com/products/1

Tab sis txoj haujlwm no zoo li tau tuav thiab cov nqi no yog $ 8US

Yog tias koj muaj ib qho ntawm no koj tsis xav tau tus programmer raws li nws muaj thiab ardudino Micronucleus boot loader pre-flashed rau lub nti. Qhov no txhais tau tias koj tuaj yeem siv qhov program ncaj qha rau lub nti los ntawm koj lub computer. Tab sis qhov tsis zoo ntawm qhov no yog qhov khau raj loader siv qhov zoo ntawm cov peev txheej muaj ntawm cov nti txwv qhov koj tuaj yeem ua li ntawd rau qhov nws muaj nqis, qhov no yog hais txog USBASP thiab Tsis yog Micronucleus

Kauj Ruam 1: Tau Txais Koj Qhov

Tau Txais Koj Qhov
Tau Txais Koj Qhov
Tau Txais Koj Qhov
Tau Txais Koj Qhov
Tau Txais Koj Qhov
Tau Txais Koj Qhov

Mus rau ebay lossis aliexpress thiab tshawb nrhiav

  • "attiny85" rau pawg thawj coj saib
  • "usbasp" rau tus prgrammer thiab
  • "jumber wires" rau cov xov hlau (xaiv tau yog tias koj tuaj yeem pom qee qhov dag nyob ib puag ncig)

Kauj ruam 2: Muab tso ua ke

Muab tso ua ke
Muab tso ua ke

Thaum koj lub khoos phis tawj thaum kawg tuaj txog pib nrog cov laug

Solder cov pins breakout pins rau qhov uas tuaj nrog pob rau lub rooj tsavxwm. Qhov no yog nyob ntawm yeem. yog tias koj tsis muaj cov hlau txuas koj tsuas tuaj yeem ntswj cov xov hlau rau tab sis qhov no tsis pom zoo vim tias kev sib cuag yuav tsis yog qhov zoo tshaj plaws

Hauv qhov piv txwv no, Kuv, rau qee qhov laj thawj siv cov xov hlau ncaj qha rau lub zog txuas tab sis koj tuaj yeem siv qhov tawg tawm pins los ua qhov no ib yam

Kauj ruam 3: Wireing

Hlau
Hlau
Hlau
Hlau
Hlau
Hlau

Txuas cov xov hlau raws li cov duab. Kuv tau siv qhov sib xyaw ua ke no tab sis koj tuaj yeem siv txhua yam koj xav tau ntawm ntxhib lawv tsuas yog xav tau kom sib haum

rau pawg thawj coj saib:

  • p0, p1, p2 = ntsuab, xiav, liab
  • 5v, GND = liab, ntsuab (VIN tsis siv)

tus txuas:

saib daim duab rau kev sib txuas cable sib txuas

Kauj ruam 4: Software - VSCode

Software - VSCode
Software - VSCode

Tam sim no koj tau xaim koj yuav xav teeb tsa koj lub software ib puag ncig

Qhov no suav nrog:

  • tsav tsheb
  • ib puag ncig kev loj hlob

Thawj rub tawm Visual Studio Code. (qhov zoo tshaj plaws env kuv tau pom kom deb li deb)

Koj tuaj yeem tau txais qhov no los ntawm

Rub tawm thiab nruab nws

Kauj Ruam 5: Nruab PlatformIO IDE Plugin

Nruab ib lub PlatformIO IDE Plugin
Nruab ib lub PlatformIO IDE Plugin
Nruab ib lub PlatformIO IDE Plugin
Nruab ib lub PlatformIO IDE Plugin

Nyem rau ntawm lub khawm txuas ntxiv nyob rau sab laug sab laug thiab tshawb rau PlatformIO

Nruab nws thiab rov ua dua

Nyem rau ntawm lub tsev me me khawm hauv qab sab laug xwm txheej qhib lub Platform IO home page yog tias nws tsis tuaj yeem tuaj tom qab lub plugin teeb tsa

Kauj Ruam 6: Tsim Txoj Haujlwm Tshiab

Tsim Txoj Haujlwm Tshiab
Tsim Txoj Haujlwm Tshiab
Tsim Txoj Haujlwm Tshiab
Tsim Txoj Haujlwm Tshiab

Hauv qhov project wizard lub npe qhov project thiab xaiv pawg thawj coj saib

Pawg thawj coj yuav tsum yog

Attiny85 (Generic)

Lub moj khaum yuav tsum yog

Arduino

Kauj Ruam 7: Kho Kev Txhim Kho Ib puag ncig rau USBASP

Kho Kho Kev Txhim Kho Ib puag ncig rau USBASP
Kho Kho Kev Txhim Kho Ib puag ncig rau USBASP

Teeb tus programmer hauv PlatformIO txoj haujlwm teeb tsa cov ntaub ntawv platformio.ini

Ntxiv cov kab no rau cov ntaub ntawv platformIO.ini:

upload_protocol = usbaspupload_flags = -Pusb

Kauj Ruam 8: Txuas rau Koj Tus Kheej

Txuas rau koj tus Programmer
Txuas rau koj tus Programmer

Txuas rau koj tus programmer

Kauj Ruam 9: Teeb Tsav Tsheb

Image
Image

Koj lub khoos phis tawj USBASP yuav xav tau cov tsav tsheb rau koj lub khoos phis tawj sib tham nrog nws.

Download Zadig los ntawm no

Txuas koj lub cuab yeej USBASP usb rau hauv USB chaw nres nkoj ntawm koj lub computer

Khiav lub program Zadig uas koj rub tawm

Nruab Winusb tsav tsheb rau usbasp

Yog tias koj lub kaw lus tsis lees paub kho vajtse, xa ntawv rau kuv thiab tej zaum kuv tuaj yeem pab tab sis feem ntau qhov no yuav tsum ua haujlwm tawm ntawm lub thawv.

Kauj Ruam 10: Sau Koj Li Code

"thauj khoom =" tub nkeeg "paub tseeb tias koj muaj koj lub ATTiny85 pawg thawj coj saib rau koj tus programmer thiab nws txhua tus tau sib txuas.

Nias cov yuam sij Ctrl+Alt+U txhawm rau sau thiab xa cov program

Pom zoo: