Light Up Your World: Blinking LED(External) With STM32F401CE
by Tushar_Garg in Circuits > Microcontrollers
38 Views, 0 Favorites, 0 Comments
Light Up Your World: Blinking LED(External) With STM32F401CE
![1.jpeg](/proxy/?url=https://content.instructables.com/F13/8QB6/LVUZ1WYS/F138QB6LVUZ1WYS.jpg&filename=1.jpeg)
Get started with embedded systems by blinking an LED with the STM32F401CE! This powerful microcontroller is a great gateway to the world of electronics projects. We'll use STM32CubeMX's Hardware Abstraction Layer (HAL) to control an external LED and make it blink.
Supplies
- STM32F401CE
- LED 3V
- Jumper wires M-F
- C-type Cable
Create New File in STM32cubeID
![1.png](/proxy/?url=https://content.instructables.com/FFX/7IHX/LVUZ1X67/FFX7IHXLVUZ1X67.png&filename=1.png)
Navigate to Your Project:
- Open the project where you want to create the new file.
- You can either create a new project or use an existing one.
Create a New File:
- Right-click on the folder or directory where you want to add the new file.
- Select New > File from the context menu.
Now Configure Your STMcubeIDE
![2.png](/proxy/?url=https://content.instructables.com/FK4/Z3IF/LVUZ1X6T/FK4Z3IFLVUZ1X6T.png&filename=2.png)
Selection of Modes for Pins
![3.png](/proxy/?url=https://content.instructables.com/FVN/SBA8/LVUZ1X7A/FVNSBA8LVUZ1X7A.png&filename=3.png)
Pinout & Clock Configuration
![4.1.png](/proxy/?url=https://content.instructables.com/FAB/7V9J/LVUZ1X7T/FAB7V9JLVUZ1X7T.png&filename=4.1.png)
Add Code
HAL_GPIO_WritePin(GPIOC,GPIO_PIN_14,1);
HAL_Delay(1000);
HAL_GPIO_WritePin(GPIOC,GPIO_PIN_14,0);
HAL_Delay(1000);
write this code in while loop.
Build Binary File
![7.png](/proxy/?url=https://content.instructables.com/FZ2/VY78/LVUZ1X8E/FZ2VY78LVUZ1X8E.png&filename=7.png)
Connect STM32 Using USB
![6.png](/proxy/?url=https://content.instructables.com/FHV/S5PO/LVUZ1X91/FHVS5POLVUZ1X91.png&filename=6.png)
Click on Download Option
![11.png](/proxy/?url=https://content.instructables.com/FGV/HNYV/LVUZ1XCC/FGVHNYVLVUZ1XCC.png&filename=11.png)
Select Start Automatic Mode
![7.png](/proxy/?url=https://content.instructables.com/FFP/YDB8/LVUZ1X9Q/FFPYDB8LVUZ1X9Q.png&filename=7.png)