Have you ever wanted to create a cool embedded project?. If yes, how about building one of the most popular and everyone's favorite gadget i.e Mobile Phone!!!. In this Instructable, I will guide you on how to build a basic mobile phone using the STM32F407 Discovery Kit and GSM A6 module.
This project contains 3 main modules :
The STM32F407 MCU controls the GSM A6, LCD, and Keypad. So to make programming simple and organized, I developed individual driver code for Interfacing GSM A6 module, LCD and Keypad on STM32F407 MCU. Then I simply included these driver files in the main program and called respective APIs. You can find these driver codes in the Supplies below.
The Entire Keil Project file is included below
Now you have to add driver files for GSM A6 Module, LCD and Keypad. The driver files are :
1. GSM A6 Module :
GSM_A6_Driver_STM32F407.cand GSM_A6_Driver_STM32F407.h
2. LCD :
STM32F407_I2C_LCD16x02_Driver.c and STM32F407_I2C_LCD16x02_Driver.h
3. Keypad
STM32F407_KeypadDriver.c and STM32F407_KeypadDriver.h
Copy all these 6 files into your project folder. I have attached these files below
Once you have copied the Driver files into inside your project folder, you have to add these files to your Project.
In Keil, Select Target1, right-click then select Add new group. Create 4 new groups and Rename them as :
1) User Application - Here add new "main.c" file.
2) GSM_A6_Driver - Add existing "GSM_A6_Driver_STM32F407.c" and "GSM_A6_Driver_STM32F407.h" files to this gorup.
3) LCD_Driver - Add existing "STM32F407_I2C_LCD16x02_Driver.c" and "STM32F407_I2C_LCD16x02_Driver.h" files to this group
4) Keypad_Driver - Add existing "STM32F407_KeypadDriver.c" and "STM32F407_KeypadDriver.h" files to this group
Note: I have included "main.c" file below, you can either directly add this file or copy its contents to the newly created main file.
Once you have added the driver files, you need to tell the compiler where the respective header files are located. Hence we need to configure the compiler option.
Right Click on Target1--> Option for Target "Target1.." --> C/C++--> Include path. Make sure you include the path of your project folder since we copied the driver files there.
I have included a demo video of this project.