Cov txheej txheem:

Txawb Xov Tooj Siv Yooj Yim Siv STM32F407 Cov Khoom Siv Tshawb Pom thiab GSM A6 Module: 14 Cov Kauj Ruam (nrog Duab)
Txawb Xov Tooj Siv Yooj Yim Siv STM32F407 Cov Khoom Siv Tshawb Pom thiab GSM A6 Module: 14 Cov Kauj Ruam (nrog Duab)

Video: Txawb Xov Tooj Siv Yooj Yim Siv STM32F407 Cov Khoom Siv Tshawb Pom thiab GSM A6 Module: 14 Cov Kauj Ruam (nrog Duab)

Video: Txawb Xov Tooj Siv Yooj Yim Siv STM32F407 Cov Khoom Siv Tshawb Pom thiab GSM A6 Module: 14 Cov Kauj Ruam (nrog Duab)
Video: qhia txog kev siv xov tooj yuav hom twg thiaj yooj yim rau kj tus siv 2024, Hlis ntuj nqeg
Anonim
Txawb Xov Tooj Siv Yooj Yim Siv STM32F407 Cov Khoom Tshawb Pom thiab GSM A6 Module
Txawb Xov Tooj Siv Yooj Yim Siv STM32F407 Cov Khoom Tshawb Pom thiab GSM A6 Module

Koj puas tau xav tsim qhov project txias txias? Yog tias yog, ua li cas txog kev tsim ib qho ntawm cov neeg nyiam tshaj plaws thiab txhua tus nyiam cov khoom siv xws li Lub Xov Tooj Txawb !!!. Hauv Cov Lus Qhia no, Kuv yuav qhia koj yuav ua li cas tsim lub xov tooj ntawm tes yooj yim siv STM32F407 Discovery Kit thiab GSM A6 module.

Txoj haujlwm no suav nrog 3 lub ntsiab tseem ceeb:

  1. GSM A6 Module - Qhov no yog lub luag haujlwm yog lub luag haujlwm rau Ua/Txais Kev Hu thiab SMS.
  2. LCD 16x02 Zaub - Kom pom cov zis
  3. Hex Keypad - Txhawm rau muab tswv yim

STM32F407 MCU tswj hwm GSM A6, LCD, thiab Keypad. Yog li txhawm rau ua kom yooj yim thiab teeb tsa, kuv tsim tus kheej tus lej tsav tsheb rau cuam tshuam GSM A6 module, LCD thiab Keypad ntawm STM32F407 MCU. Tom qab ntawd kuv tsuas suav cov ntaub ntawv tsav tsheb no hauv cov haujlwm tseem ceeb thiab hu ua APIs sib xws. Koj tuaj yeem pom cov lej tsav tsheb hauv Cov Khoom hauv qab no.

Cov ntaub ntawv tag nrho Keil Project suav nrog hauv qab no

Khoom siv

  • Ua kom tiav cov ntsiab lus ntawm STM32F407 Cov Khoom Siv Tshawb Nrhiav Pib nrog STM32F407 Cov Khoom Tshawb Pom
  • Cov ntsiab lus yooj yim txog GSM A6 Module
  • GitHub RepositoryBasic Txawb Xov Tooj Siv STM32F407 Cov khoom siv tshawb pom thiab GSM module A6 Module
  • Kev cuam tshuam 16x02 LCD ntawm STM32F407 Kev tshawb pom siv I2C module.
  • Sib cuam tshuam 4X4 Matrix Keypad ntawm STM32F407 Cov Khoom Siv Tshawb Pom
  • Sib cuam tshuam GSM-A6 Module ntawm STM32F407 Discovery Kit

Kauj Ruam 1: Daim Ntawv Teev Npe

Daim Ntawv Teev Npe
Daim Ntawv Teev Npe
Daim Ntawv Teev Npe
Daim Ntawv Teev Npe
Daim Ntawv Teev Npe
Daim Ntawv Teev Npe

Cov khoom siv kho vajtse xav tau rau txoj haujlwm no yog:

  1. STM32F407 Discovery Kit
  2. GSM A6 Module
  3. LCD 16x02 hli
  4. I2C qhov module
  5. Hex Keypad
  6. Ob peb ntawm Jumper cables
  7. Pawg Mov Ci
  8. Hais lus (8Ω)
  9. Microphone

Kauj ruam 2: Ua Kev Sib Txuas

Ua Kev Sib Txuas
Ua Kev Sib Txuas

Txuas cov khoom siv raws li tau hais hauv daim duab saum toj no. Daim duab/kab duab no muab rau koj ib qho yooj yim heev thiab txoj hauv kev yooj yim los txuas txhua yam khoom siv.:-)

Nco tseg: GSM A6 Module tau siv lub micro USB txuas. Koj tuaj yeem siv lub xov tooj txawb twg los them lub zog GSM A6.

Kauj Ruam 3: Qhib Keil UVision IDE

Qhib Keil UVision IDE
Qhib Keil UVision IDE

Qhib Keil uVision IDE. Nyem rau ntawm qhov project xaiv New uVision Project… Tom qab ntawv xaiv koj cov npe ua haujlwm thiab muab koj lub npe nyiam dua.

Kauj ruam 4: Xaiv Tus Ntaus

Xaiv Cov Ntaus
Xaiv Cov Ntaus

Thaum koj tau muab lub npe rau txoj haujlwm, hauv cov kauj ruam tom ntej koj yuav tsum tau ntxiv ib lub cuab yeej. Ntawm no peb tab tom ntxiv STM32F407VG Micronconroller los ntawm STMicroelectronics. Xaiv STM32F407VG, tom qab ntawv nyem OK.

Kauj Ruam 5: Tswj Sijhawm Ib puag ncig

Tswj Khiav Sijhawm Ib puag ncig
Tswj Khiav Sijhawm Ib puag ncig
Tswj Khiav Sijhawm Ib puag ncig
Tswj Khiav Sijhawm Ib puag ncig

Cov kauj ruam tom ntej yog xaiv lub tsev qiv ntawv/tus neeg tsav tsheb tiv thaiv hauv Kev Tswj Lub Sijhawm Ib puag ncig Tab. Ntawm no xaiv txhua ntu raws li qhia hauv daim duab saum toj no. Thaum koj txheeb xyuas txhua qhov chaw tsim nyog Nyem Resolve ces Nyem OK.

Kauj Ruam 6: Luam daim ntawv tsav tsheb mus rau Project Folder

Luam cov ntaub ntawv tsav tsheb mus rau Project Folder
Luam cov ntaub ntawv tsav tsheb mus rau Project Folder

Tam sim no koj yuav tsum ntxiv cov ntawv tsav tsheb rau GSM A6 Module, LCD thiab Keypad. Cov ntaub ntawv tsav tsheb yog:

1. GSM A6 Module:

GSM_A6_Driver_STM32F407.c thiab GSM_A6_Driver_STM32F407.h

2. LCD:

STM32F407_I2C_LCD16x02_Driver.c thiab STM32F407_I2C_LCD16x02_Driver.h

3. Keypad

STM32F407_KeypadDriver.c thiab STM32F407_KeypadDriver.h

Luam tag nrho cov 6 cov ntaub ntawv no rau hauv koj qhov project. Kuv tau txuas cov ntaub ntawv hauv qab no

Kauj Ruam 7: Ntxiv Cov Ntaub Ntawv Tsav Tsheb rau Koj Txoj Haujlwm

Ntxiv Cov Ntaub Ntawv Tsav Tsheb rau Koj Txoj Haujlwm
Ntxiv Cov Ntaub Ntawv Tsav Tsheb rau Koj Txoj Haujlwm

Thaum koj tau theej cov tsav tsheb cov ntaub ntawv mus rau hauv koj lub phiaj xwm phiaj xwm, koj yuav tsum ntxiv cov ntaub ntawv no rau hauv koj Txoj Haujlwm.

Hauv Keil, Xaiv Lub Hom Phiaj 1, nyem rau sab xis thiab xaiv Ntxiv pab pawg tshiab. Tsim 4 pab pawg tshiab thiab hloov npe lawv li:

1) Tus neeg siv daim ntawv thov - Ntawm no ntxiv cov ntawv "main.c" tshiab.

2) GSM_A6_Driver - Ntxiv cov ntaub ntawv "GSM_A6_Driver_STM32F407.c" thiab "GSM_A6_Driver_STM32F407.h" uas muaj tam sim no rau qhov gorup.

3) LCD_Driver - Ntxiv cov ntaub ntawv "STM32F407_I2C_LCD16x02_Driver.c" thiab "STM32F407_I2C_LCD16x02_Driver.h" rau pawg no

4) Keypad_Driver - Ntxiv "STM32F407_KeypadDriver.c" thiab "STM32F407_KeypadDriver.h" cov ntaub ntawv tam sim no rau pawg no

Nco tseg: Kuv tau suav nrog "main.c" cov ntaub ntawv hauv qab no, koj tuaj yeem ncaj qha ntxiv cov ntawv no lossis luam nws cov ntsiab lus rau cov ntaub ntawv tsim tshiab.

Kauj Ruam 8: Txhim Kho Txoj Kev ntawm Cov Ntaub Ntawv Header

Kho txoj hauv kev ntawm Cov Ntaub Ntawv Header
Kho txoj hauv kev ntawm Cov Ntaub Ntawv Header

Thaum koj tau ntxiv cov ntaub ntawv tsav tsheb, koj yuav tsum qhia rau tus neeg sib tham qhov twg cov ntaub ntawv header tshwj xeeb nyob. Yog li peb yuav tsum teeb tsa qhov kev xaiv ua tus tsim khoom.

Txoj cai Nyem rau ntawm Target1 Kev Xaiv rau Hom Phiaj "Target1.." C/C ++ Xws li txoj hauv kev. Nco ntsoov tias koj suav nrog txoj hauv kev ntawm koj cov phiaj xwm phiaj xwm txij li peb tau theej cov tsav tsheb cov ntaub ntawv rau ntawd.

Kauj Ruam 9: Txuas Koj Cov Khoom Siv STM32F407 rau Koj Lub PC/Laptop

Kauj ruam 10: Xaiv ST-Txuas Debugger hauv Compiler Configuration

Xaiv ST-Txuas Debugger hauv Compiler Configuration
Xaiv ST-Txuas Debugger hauv Compiler Configuration

Txoj nyem rau ntawm Target1, tom qab ntawd nyem rau ntawm Kev Xaiv rau Hom Phiaj "Target1..", tom qab ntawd mus rau Debug Tab thiab xaiv ST-Txuas-Debugger raws li qhia hauv daim duab saum toj no

Kauj ruam 11: Kho ST-Txuas Debugger

Configure ST-Txuas Debugger
Configure ST-Txuas Debugger

Tom qab xaiv ST-Txuas Debugger hauv qib 10, nyem rau ntawm qhov chaw ces xaiv Lw thiab kos rau txhua qhov chaw raws li qhia hauv daim duab saum toj no.

Kauj Ruam 12: Tsim thiab Tshaj Tawm Txoj Cai

Tsim thiab Upload Txoj Cai
Tsim thiab Upload Txoj Cai

Tom qab ua tiav txhua cov kauj ruam tsim txoj haujlwm thiab xyuas kom tsis muaj qhov yuam kev hauv cov cai. Tom qab ua tiav kev sau ua ke, xa cov cai rau koj li Discovery Kit.

Kauj ruam 13: Nws yog !!! Tsuas yog pib dua STM32F407 MCU thiab Siv Lub Xov Tooj Ntawm Tes

Image
Image

Kuv tau suav nrog daim vis dis aus ntawm qhov haujlwm no.

Kauj Ruam 14: Sau Ntawv Ceev thiab Debug Cov Ntaub Ntawv

  • Kuv qhia koj kom muaj zog ntawm GSM Module ua ntej thiab tos ib pliag lossis li ntawd. Vim hais tias ib zaug koj lub zog ntawm GSM module nws yuav tsum txuas rau lub network muab kev pabcuam. Nyob ntawm qhov ua tau zoo/teeb liab lub zog GSM module yuav siv sijhawm me ntsis los txuas.
  • Kuv tau sim cov khoom tsim tawm hauv "India". Tsis tas li kom yooj yim, Kuv tau sau cov lej hauv nroog (+91 rau Is Nrias teb) hauv cov ntawv tsav tsheb "GSM_A6_Driver_STM32F407.c". Yog tias koj nyob hauv lwm lub tebchaws thov ntxiv koj lub tebchaws chaws raws li tau hais tseg hauv daim duab saum toj no.

Pom zoo: