And it is also used to write status (HIGH or LOW) of output pins. This register is used to read the current state of port pins regardless of input or output configuration. This register is used to control the direction (input or output) of a pin, once is it configured as a GPIO pin (General Purpose Input Output) by using PINSELx register. Please refer the user manual of LPC2148 microcontroller for more details. Primary Function (default), typically GPIO Usually most of the pins of an ARM microcontroller is multi-functional, every pin can be made to perform one of the assigned function by setting particular bits of PINSEL register. Each pin of these ports are named as P0.0, P0.1, P0.2, P1.0, P1.2 etc. Usually a 32-bit microcontroller will have 32 pins per PORT (sometimes it may vary). In microcontrollers, pins are divided in to different PORTS.
In this section we will learn about different registers used for configuring or controlling a pin of an ARM microcontroller. Here we are using LPC2148 ARM microcontroller and Keil IDE for programming. This is a hello world project (blinking an LED) intended for beginners to ARM microcontroller programming. In this tutorial we will learn how to start programming an ARM microcontroller.