Gpio, short for general programmable input/output interface (General programmed I/O), features similar to 8051 P0-P3, its pin can be freely used by users by program-controlled, pin can be used as a common input (GPI) Or general output (GPO) Or general input and output (Gpio), Such as CLK generator and chip select.
Since a pin can be used for input, output, or other special functions, registers must be used to select these functions. For the input, you can read a register to determine the level of the pin. For the output, you can write a register to let the pin output a high or low level. For other special functions, there are other registers to control them.
The advantages of gpio (Port extenders) are listed below:
1. Low Power Consumption: gpio has lower power loss (about 1 µa, and the operating current of µc is 100 µa ).
2. Integrated with the i² C-slave interface: gpio's built-in i² C-slave interface can work at full speed even in standby mode.
3. Small encapsulation: The gpio device provides the minimum encapsulation size-3mm x 3mm QFN!
4. Low Cost: you do not have to pay for unused features!
5. Fast Release: no additional code is requiredCode, Documentation, no maintenance work required!
6. Flexible lighting control: built-in multi-channel high-resolution PWM output.
7. pre-determine response time: shorten or determine the response time between external events and interruptions.
8. better lighting effect: the matching current output ensures even brightness.
9. Simple wiring: only two i² C buses or three SPI buses are required.