Pin Functions | PINSEL | Pin function selection | Pin Multiplexing | Pin function Control

Опубликовано: 15 Март 2026
на канале: Know about Embedded System
252
12

Pin function selection (pin multiplexing) allows microcontrollers to assign multiple, alternative purposes (GPIO, UART, ADC, PWM) to a single physical pin, optimizing space. It is managed via specialized registers (e.g., PINSEL in ARM, GPIOAFSEL in TM4C) or software tools (e.g., IDE Configurator) to configure bits that map the desired function, usually defaulting to GPIO.

Multiplexing Mechanism: Since multiple peripherals connect to one pin, only one function can be active at a time.
Configuration: Typically involves setting 2 bits per pin in a register to select from 4 possible modes (00, 01, 10, 11).
Common Functions:
GPIO: General Purpose Input/Output (default).
Peripherals: UART (TX/RX), SPI (MOSI/MISO/SCK), I2C (SDA/SCL), PWM.
Analog: Analog-to-Digital Converter (ADC) input or Digital-to-Analog Converter (DAC) output.
Tools: Manufacturers provide graphical tools (e.g., Keil, STM32CubeMX, RZ/T FSP) to visualize pin mapping and prevent conflicts.
Important Constraints: Avoid assigning the same peripheral signal to multiple pins, and check data sheets for specific pin, voltage, and electrical characteristics.

What you will learn in this video:
What is Pin Function Selection?
Difference between GPIO and alternate functions
How to configure pins using registers (PINSEL, GPIO, etc.)
Pin multiplexing explained with LPC1768 / ARM Cortex-M example
Coding examples in Embedded C


If you have any questions, please write to us
[email protected]

Timestamps:
00:00 Introduction
00:34 Pin Function Selection
04:25 Pin Function Description
10:00 Pin Function Configuration in the software
12:24 Analysing Pin Functions in the debugger

   • How to Create a Project in Keil Software |...  
   • Embedded System Course for Beginners | Emb...  
   • Pin Functions | PINSEL | Pin function sele...  
   • Timers in Embedded System  
   • Embedded Protocols | Embedded Protocol Tut...  
   • GPIO- General Purpose Input Output  
   • Bit Masking In Embedded System  
   • DAC Digital to Analog Converter | Embedded...  
   • ARM Cortex  
   • ARM Advanced RISC Machine  
   • Embedded System Basics | Fundamentals of E...  
   • C and Embedded C Programming  

Do not forget to Like, Share, and Subscribe for more tutorials on Embedded Systems and Microcontrollers.

#pinsel #armcortex #armprocessor #embeddedc #armcortexm3 #learnembeddedsystems #learnembeddedsystems #embeddedsystems #exploreembeddedsystems #embeddedsolutions