How to identify and use Microcontrollers’ pins

All microcontrollers have multiple pins and each pin is assigned for some specific task. It is therefore very important to know the pin configuration of each microcontroller before using it. Some of the common features of microcontroller pins are as follows.

In order to set each pin’s function, user must set the functionality in the software by setting value in registers (it is similar to setting the functions in machine but machine has buttons or switches, but microcontroller has no button or switch, so we must set them by the software directly into the memory). It is the manufacturer who decides which pin is allowed to do what function(s). Although this document explain how to look pin function of microcontroller of type STM32F4, this technique can be applied to other types of microcontroller as well. Some basic things to note in a microcontroller are:

Figure 1‑1: How to analyze pins of microcontroller?

It can be observed that datasheet plays a fundamental role in finding information about the pins. In advanced microcontrollers, user might need to consult more than one relevant document together to extract the correct information.

Figure 1‑2: To check microcontroller belongs to which family

Figure 1‑3: To see which model of microcontroller STM32F407VG and with how many pins

Figure 1‑4: MCU STM32F407VG pins functionality

Figure 1‑5: To see which pin is 29 on the board

1.1 References

  1. STM32F4DISCOVERY Discovery kit for STM32F407/417 line Data brief
  2. STM32F4DISCOVERYDatasheet