Input/Output Ports in Micro-controller || Embedded Basics

In order to make the microcontroller useful, it has to be connected to additional electronics, i.e. peripherals. Each microcontroller has one or more registers (called a “port”) connected to the microcontroller pins. Why input/output? Because you can change the pin’s function as you wish. For example, suppose you want your device to turn three signal LEDs and simultaneously monitor the logic state of five sensors or push buttons. Some of ports need to be configured so that there are three outputs (connected to the LEDs) and five inputs (connected to sensors). It is simply performed by software, which means that the pin’s function can be changed during operation.



One of the more important specifications of input/output (I/O) pins is the maximum current they can handle.

Another way of putting it is that the maximum current stated in the data specifications sheet for the microprocessor is shared across all I/O ports. Usually, each I/O port is under control of another SFR, which means that each bit of that register determines the state of the corresponding microcontroller pin.


Cheers!!!!
-> Let Us Embed <-