In this recipe, we will learn how to send HIGH and LOW signals to a specific port that is connected to an LED, and make the LED blink. The idea behind this exercise is to learn how to control a device that is connected to a specific port of the microcontroller.
Toggling the port of a microcontroller in Embedded C (blinking LED)
How to do it…
To toggle the port of a microcontroller in Embedded C, perform the following steps:
- We will carry out this recipe using Keil; double-click on the Keil uVision5 icon to activate the IDE.
- Create a new project by clicking on the Project | New uVision Project option.
- When prompted, specify the project name and the folder where you want to create the new project...