Cov txheej txheem:

Txoj Kev Yooj Yim Tshaj Plaws Tshaj Plaws rau Microcontroller!: 9 Kauj Ruam
Txoj Kev Yooj Yim Tshaj Plaws Tshaj Plaws rau Microcontroller!: 9 Kauj Ruam

Video: Txoj Kev Yooj Yim Tshaj Plaws Tshaj Plaws rau Microcontroller!: 9 Kauj Ruam

Video: Txoj Kev Yooj Yim Tshaj Plaws Tshaj Plaws rau Microcontroller!: 9 Kauj Ruam
Video: txoj kev tsham zoov tshaj tsuag mas tsis yooj yim, yuav tawm los rau koj saib sai22 no! 2024, Kaum ib hlis
Anonim
Image
Image
STM NUCLEO-L476RG
STM NUCLEO-L476RG

Puas yog koj nthuav hauv kev muaj lub microcontroller uas siv lub zog tsawg dua? Hnub no, kuv yuav qhia koj rau STM32 Ultra Low Power - L476RG, uas siv 4 zaug tsawg zog dua li Arduino Mega thiab muaj lub zog ua haujlwm Cortex. Kuv tseem yuav tham txog MBED, uas yog lus C uas ua haujlwm tsis yog ntawm STMicroelectronics cov txheej txheem, tab sis kuj ntawm NXP thiab cov txheej txheem txheej txheem uas muaj ARM nucleus. Thaum kawg, Kuv yuav qhia koj tus compiler online.

Kauj Ruam 1: STM NUCLEO-L476RG

• STM32L476RGT6 hauv LQFP64 pob

• ARM®32-ntsis Cortex®-M4 CPU

• Hloov kho lub sijhawm nrawm

• (ART Accelerator ™) tso cai 0-tos lub xeev ua tiav

• los ntawm Flash nco

• 80 MHz max CPU zaus

• VDD los ntawm 1.71 V txog 3.6 V

• 1 MB nyem

• 128 KB SRAM

• SPI (3)

• I2C (3)

• USART (3)

• UART (2)

• LPUART (1)

• GPIO (51) nrog kev cuam tshuam sab nraud

• Capacitive sensing nrog 12 raws

• 12-ntsis ADC (3) nrog 16 raws

• 12-ntsis DAC nrog 2 raws

Xav paub ntau ntxiv:

Kauj Ruam 2: Tsim Tus Kheej

Tsim tus Account
Tsim tus Account
Tsim tus Account
Tsim tus Account

Mus rau www.mbed.com thiab tsim ib tus as khauj. Sau cov ntaub ntawv rau npe.

Nyem rau ntawm captcha, nyeem thiab lees txais cov lus, thiab nyem "Sau npe".

Kauj ruam 3: Nkag Mus Rau Nws

Nkag Mus Rau Nws
Nkag Mus Rau Nws

Tom qab sau npe, txheeb xyuas koj tus email thiab nkag mus rau hauv MBED lub vev xaib

Kauj ruam 4: Ntxiv Board rau Compiler

Ntxiv Board rau Compiler
Ntxiv Board rau Compiler
Ntxiv Board rau Compiler
Ntxiv Board rau Compiler

Yog tias koj twb muaj daim npav MBED ntsaws rau hauv koj lub computer, nws yuav tshwm li tus ntiv tes xoo. Hauv nws, qhib MBED. HTM cov ntaub ntawv hauv qhov browser.

Lossis koj tuaj yeem mus rau os.mbed.com/platforms thiab xaiv koj lub rooj tsavxwm los ntawm cov npe ntawm cov laug cam.

Ntawm nplooj ntawv ntawm koj lub rooj tsavxwm, nyem rau "Ntxiv rau koj li MBED Compiler"

Kauj Ruam 5: Qauv Cai

Qauv Cai
Qauv Cai

Mus rau nplooj ntawv no nrog qhov piv txwv ntsais thiab nyem rau "Ntshuam rau hauv Compiler."

Kauj Ruam 6: Ntsuas Piv Txwv

Piv Txwv
Piv Txwv

Ntawm qhov screen uas qhib, nyem "Ntshuam"

Kauj Ruam 7: Txhawm rau Sau

Kom Sau
Kom Sau

Nyem rau "Compile" khawm kom cov neeg rau zaub mov suav qhov chaws rau hauv cov ntaub ntawv binary.

Qhov browser yuav pib rub tawm cov ntaub ntawv binary sai li sai tau thaum tus neeg rau zaub mov ua tiav kev suav sau.

Kauj Ruam 8: Hloov Binary rau Pawg Thawj Coj

Hloov Binary rau Pawg Thawj Coj
Hloov Binary rau Pawg Thawj Coj

Txhawm rau hloov cov binary mus rau daim npav, yooj yim rub lossis luam thiab muab cov ntawv rub tawm binary tso rau hauv daim nplaub tshev daim npav, uas yuav tshwm sim li tus ntiv tes xoo.

Kauj ruam 9: Blink

Ntawm no peb muaj cov cai. Peb yuav suav nrog MBED, teeb tsa tus lej digital, ntawm lwm cov lus txib.

#suav nrog "mbed.h" DigitalOut myled (LED1); int main () {thaum (1) {myled = 1; // LED yog tos tos (0.2); // 200 ms myled = 0; // LED yog OFF tos (1.0); // 1 vib nas this}

Pom zoo: