In this recipe, we will learn how to display values from 0 to 255 on a specific port of a microcontroller and make the value increment like a counter.
Incrementing the value of a port in Embedded C
How to do it…
To increment the value of a port in Embedded C, perform the following steps:
- Launch the Keil uVision5 IDE.
- Create a new project by clicking on the New Project | New uVision Project option.
- Specify the project name and folder location when prompted. Let's give the new project the name CounterApp; click on Save.
- The device selection window will open and you will be prompted to select a device. From the Device combo box, select Legacy Device Database [no RTE].
- You will get the list of...