@@ -54,9 +54,9 @@ Feels weird. Move out to exercises and explain there I guess... and maybe not al
...
@@ -54,9 +54,9 @@ Feels weird. Move out to exercises and explain there I guess... and maybe not al
The most rudimentary type of interface but equally the most important. As an output this pin can be **ON** or **OFF**, **TRUE** or **FALSE**, **1** or **0**. And as input this pin goes into High-Z (High impedance) mode, this means that the MCU will check the voltage of the pin and if it is above a certain threshold then it will change the register bit corresponding to the state of the pin to 1 and vice versa.
The most rudimentary type of interface but equally the most important. As an output this pin can be **ON** or **OFF**, **TRUE** or **FALSE**, **1** or **0**. And as input this pin goes into High-Z (High impedance) mode, this means that the MCU will check the voltage of the pin and if it is above a certain threshold then it will change the register bit corresponding to the state of the pin to 1 and vice versa.
These are often sharing the same physical pin with special functions such as timers, communication busses and the like. So when booting up an MCU one should specify what function is needed on a particular pin. But beware that all functions can **NOT** be mapped to all pins.
These are often sharing the same physical pin with special functions such as timers, communication buses and the like. So when booting up an MCU one should specify what function is needed on a particular pin. But beware that all functions can **NOT** be mapped to all pins.
There is also a hardware limit to what can be driven by a GPIO pin. Usually, a pin can deliver about 20mA but that´s it.
There is also a hardware limit to what can be driven by a GPIO pin. Usually, a pin can deliver about 20mA but that is it.