Cov txheej txheem:

Arduino Alternative - STM32 Blue Pill Programming Via USB: 5 Kauj Ruam
Arduino Alternative - STM32 Blue Pill Programming Via USB: 5 Kauj Ruam

Video: Arduino Alternative - STM32 Blue Pill Programming Via USB: 5 Kauj Ruam

Video: Arduino Alternative - STM32 Blue Pill Programming Via USB: 5 Kauj Ruam
Video: Easy & Powerful Arduino Alternative? STM32 Beginner's Guide 2024, Hlis ntuj nqeg
Anonim
Arduino Alternative - STM32 Blue Pill Programming Ntawm USB
Arduino Alternative - STM32 Blue Pill Programming Ntawm USB

Koj thiab kuv ob leeg hlub Arduino cov laug cam, los ntawm qhov tsawg tshaj plaws Attiny85, mus rau qhov loj tshaj MEGA2560. Txawm li cas los xij yog tias koj xav tau nrawm dua, ntau cov tswv yim sib piv, qhov tseeb dua, tab sis tseem tsis xav hloov los ntawm Arduino cov phiaj xwm, muaj kev daws teeb meem zoo nkauj …. Cov ntsiav tshuaj xiav!

Yog tias koj tsis tau hnov dua muaj Arduino nano zoo li lub rooj tsavxwm, npe menyuam yaus lub ntsiav tshuaj xiav. Koj puas mob siab rau kwv yees nws yog xim?

Qhov zoo tshaj plaws (sib nrug los ntawm nws qhov nrawm thiab ua tau zoo tag nrho) yog lub peev xwm los ua haujlwm nrog Arduino IDE, qhov tseem ceeb ua rau nws yog Arduino.

Koj yuav hais tias nws suab zoo dhau los ua qhov tseeb thiab nws yog. Muaj tus ntes. Cov laug cam tsis tuaj yeem ua haujlwm dhau USB, vim lawv tsis tuaj nrog lub bootloader. (Lub bootloader yog lub hauv paus Windows rau microcontrollers, nws tsis ua dab tsi, tab sis koj tseem xav tau nws los ua cov khoom)

Hauv cov lus qhia no kuv yuav qhia koj qhov twg kom tau txais cov laug cam, yuav ua li cas rau lawv thiab kho qhov tsis muaj teeb meem txuas USB yog li koj tuaj yeem ua haujlwm nws zoo ib yam li Arduino, siv tsuas yog USB txuas txuas.

Kauj Ruam 1: 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

Ua ntej koj yuav xav tau lub rooj tsavxwm nws tus kheej. Kuv pom zoo koj yuav lawv ntawm no:

www.ebay.com/itm/192674786885

Koj kuj tseem yuav xav tau USB rau TTL tus kws tsim khoom uas koj tsuas yog xav tau los teeb tsa lub rooj tsav xwm thawj zaug, tab sis nws tseem muaj txiaj ntsig rau lwm txoj haujlwm yog li koj kuj tseem yuav muaj ib tus … koj tuaj yeem tau txais nws ntawm no:

www.ebay.com/itm/401604236499

Qee cov xov hlau lossis cov hlua txuas txuas kuj tseem muaj txiaj ntsig, tab sis kuv xav tias koj muaj cov nyob ntawm tes. Yog tsis yog, improvise.

Kauj ruam 2: Arduino IDE

Arduino IDE Cov
Arduino IDE Cov
Arduino IDE Cov
Arduino IDE Cov
Arduino IDE Cov
Arduino IDE Cov
Arduino IDE Cov
Arduino IDE Cov

Ua ntej koj tuaj yeem pib tsim cov ntsiav tshuaj xiav hauv Arduino IDE. koj yuav tau ntxiv ob peb yam. Tsis txhob txhawj, qhov no yooj yim heev.

Ua ntej qhib Arduino IDE. Mus rau File-> Preferences … lub qhov rai tshiab yuav qhib

Hauv qab muaj kab hais tias "Tus Thawj Saib Xyuas Ntxiv URLs:" … thaum kawg ntawm kab, muaj lub cim ntawm ob lub qhov rais qhib, nyem qhov ntawd.

Tsis tau lwm lub qhov rai yuav qhib thiab nyob ntawd koj yuav tsum sau

dan.drown.org/stm32duino/package_STM32duino_index.json

Yog tias koj twb muaj qee yam hauv lub qhov rais, tsuas yog nkag mus rau kab tshiab. Tom qab ntawv nyem OK thiab kaw Arduino IDE.

Saib, qhov nyuaj ua tiav.

Tam sim no koj yuav tsum qhib IDE dua thiab mus rau Cov Cuab Yeej-> cov laug cam-> Tus Thawj Saib Xyuas Haujlwm (nws yog thawj qhov ntawm cov npe)

Ib lub qhov rai tshiab yuav qhib thiab qhov twg nws hais tias "Lim koj qhov kev tshawb nrhiav …" koj yuav tsum ntaus hauv stm32f1

Yuav tsum muaj qhov tshwm sim nkaus xwb. Nyem nruab (kaum sab xis sab xis) thiab tos nws rau nruab. Thaum qhov ntawd tiav, kaw IDE dua.

Muaj txhua yam koj ua tiav nrog ntu IDE.

Kauj ruam 3: Tsav tsheb

Tsav tsheb
Tsav tsheb
Tsav tsheb
Tsav tsheb
Tsav tsheb
Tsav tsheb

Txij li lub qhov rais tsis raug lees paub lub rooj tsavxwm, koj yuav tsum teeb tsa tus tsav tsheb. Qhov no ib yam nws tsuas yog txheej txheem "luag thiab poob" yog li tsis txhob txhawj, Kuv paub tseeb tias koj tuaj yeem lis nws.

Ua ntej, rub cov tsav tsheb ntawm no:

github.com/rogerclarkmelbourne/Arduino_STM32

Koj ua qhov no los ntawm nyem lub pob ntsuab uas hais tias "Clone lossis Download" ces xaiv Download ZIP.

Thaum koj ua tiav qhov ntawd, qhib cov ntawv zip. Khaws nws qhib thiab mus rau qhov uas puas tau koj daim ntawv teeb tsa Arduino yog. Feem ntau nws yog C: / Program files (x86) Arduino

Ib zaug muaj, qhib cov ntawv kho vajtse … koj yuav tsum muaj ib qho, tab sis yog tias tsis yog, tsuas yog ua ib qho.

Thaum koj nyob hauv phau ntawv kho vajtse, rub "Arduino_STM32-master" los ntawm ZIP mus rau phau ntawv kho vajtse. Hloov nws mus rau Arduino_STM32 (tsuas yog rho tawm tus tswv ib feem)

Tam sim no qhib Arduino_STM32 nplaub tshev … muaj daim nplaub tshev sab hauv uas muaj npe tsav tsheb. Ib qhov twg hauv daim nplaub tshev ntawd koj yuav pom cov ntaub ntawv npe install_drivers (nws yog cov ntawv ua batch). Nyem rau qhov ntawd thiab teeb tsa cov tsav tsheb. Tsuas yog hais rau txhua yam.

Nrog koj zoo siab, koj tau ua tiav … zoo, yuav luag.

Kauj ruam 4: Hlawv Bootloader

Hlawv Bootloader
Hlawv Bootloader
Hlawv Bootloader
Hlawv Bootloader
Hlawv Bootloader
Hlawv Bootloader

Nco ntsoov tias "windows" yam uas xav tau ntawm lub rooj tsav xwm kom koj siv USB, zoo, peb yuav tsum muab nws tso rau ntawm lub rooj tsavxwm tam sim no. Nws tau hu ua bootloader, tab sis lub npe tsis muaj teeb meem tiag.

Txhawm rau ua qhov no, koj yuav xav tau ob yam. Download tau ob qho ntawm no:

www.st.com/en/development-tools/flasher-stm32.html

Nov yog qhov program uas koj siv los nruab bootloader. (hauv qab ntawm nplooj ntawv) Koj yuav tsum tso npe rau nplooj ntawv thiab tom qab ntawd koj yuav tsum rub tawm nws.

Koj kuj yuav tsum rub tawm lub bootloader nws tus kheej. Koj tuaj yeem tau txais qhov no:

github.com/rogerclarkmelbourne/STM32duino-bootloader/tree/master/binaries

Rub tawm "generic_boot_pc13.bit"

Tam sim no koj muaj txhua yam koj xav tau pib, nws yog lub sijhawm los txuas txhua yam thiab hlawv lub bootloader.

Txuas koj lub USB-TTL adapter rau hauv USB chaw nres nkoj.

Ua cov kev txiav txim siab no

USB-TTL …….. ntsiav tshuaj xiav

TX10A 10

RX ……… A9

3.3V …….3.3V

GND ……. GND

Ntawm koj lub ntsiav tshuaj xiav, sab saum toj feem ntau jumper yuav tsum yog ntawm sab xis. (saib daim duab)

Tam sim no qhib lub software koj nyuam qhuav rub tawm. Nruab nws (tsuas yog nyem tom ntej txuas ntxiv tom ntej) thiab tom qab ntawd qhib nws.

Nws yuav tsum lees paub koj lub cuab yeej thiab sau npe chaw nres nkoj COM. Yog tias nws tsis txheeb xyuas yog tias koj plam ib txoj hlua lossis yog tias koj qhov kev sib txuas tau zoo. Kuj tseem khiav lub software dua yog li nws rov pib dua.

Thaum koj muaj qhov chaw nres nkoj COM lees paub, koj tuaj yeem nyem Tom ntej 3 zaug, tom qab ntawd koj yuav los rau lub qhov rai uas nws muaj peev xwm xaiv "Rub mus rau ntaus ntawv" … xaiv nws thiab qhov twg nws hais tias "Rub tawm los ntawm cov ntaub ntawv", nyem rau … icon thiab nrhiav koj bootloader. Xaiv nws, nyem ok thiab nyem dua Tom ntej. Qhov no yuav nruab koj lub bootloader. Koj tuaj yeem kaw qhov haujlwm tam sim no, tab sis TSIS TXHOB tshem tawm lub rooj tsavxwm tsis tau!

Ua ntej tshaj kom ntseeg tau tias muab cov jumper feem ntau tso rau saum lub rooj tsavxwm rov rau sab laug, yog li ob leeg nyob ntawm 0 txoj haujlwm. Tam sim no koj tuaj yeem txuas txhua yam.

Kauj Ruam 5: Thawj Txoj Haujlwm

Thawj Txoj Haujlwm
Thawj Txoj Haujlwm
Thawj Txoj Haujlwm
Thawj Txoj Haujlwm
Thawj Txoj Haujlwm
Thawj Txoj Haujlwm

Qhib koj Arduino IDE. Mus rau cov cuab yeej thiab qhov uas nws hais tias "Boards", xaiv "Generic STM32F103C series"

Xaiv txoj hauv kev xa khoom raws li STM32duino bootloader

Xaiv Chaw Nres Nkoj los ua "COMX (Maple Mini)" …. X yog dab tsi uas koj tus lej chaw nres nkoj yog.

Koj cov ntsiav tshuaj xiav tau dhau los ua Maple Mini. Ib zaug ntxiv, tsis txhob hnov qab cov dhia dhia raws li qhia hauv daim duab.

Koj mus zoo. Rau koj thawj qhov haujlwm koj tsis tas yuav tso ib yam dab tsi zoo nkauj, koj tsuas tuaj yeem tso cov duab kos dawb nrog teeb tsa thiab ua kom lub ntsej muag lom zem, tab sis kuv nyiam ua Serial.print program, vim qhov ntawd yog qhov txaus siab dua. Kuv qhov kev pab cuam txuas nrog hauv qab no. Nws yog cov ntaub ntawv txt, yog li tsuas yog luam nws rau hauv koj Arduino IDE yog tias koj xav siv nws.

IDE tuaj yeem tshaj tawm qhov ua yuam kev, buf tseem yuav tso qhov program, yog li koj tsuas tuaj yeem tsis quav ntsej nws. Yog tias koj tseem muaj teeb meem, sim tso qis ntawm ob tus neeg dhia mus rau txoj haujlwm raug.

Nrog txhua qhov ua tiav, nrog koj zoo siab! Tam sim no koj tuaj yeem siv cov ntsiav tshuaj xiav ua Arduino!

Pom zoo: