General purpose ports in ARM MCU
Microcontrollers aren’t imaginable without interacting with other devices like indicators, input devices, or other off-chip devices. For this, every MCU has I/O pins that are used to interact with the external world. General-purpose I/O ports can be accessed via registers that provide enhanced features or simply via port registers. Port registers are allocated to the ARM bus so that fast possible timing can be achieved. Control of individual bits is possible using a single instruction. All port registers are byte and half-word addressable. After MCU reset, all I/O ports are set to input. Let’s take the LPC2000 series ARM microcontroller LPC2148. It has two 32 bit general purpose I/O ports PORT0 and PORT1. PORT0 has 30 pins for input/output operations, where one is only for output. PORT1 has 16 available pins for GPIO.