GPIO (English: General-purpose input/output), an abbreviation for general-purpose input/output, with a function similar to P01-P3 of 8051. Its pins can be freely used by users for program control. GPI) or general output (GPO) or general input and output (GPIO), such as clk generator, chip select, etc.
Since a pin can be used for input, output or other special functions, there must be a register to select these functions. For input, you can read a certain register to determine the level of the pin potential; for output, you can write a register to make this pin output high or low potential; for other special functions, there are additional To control them.
Advantages of GPIO (port extender)
Low power consumption: GPIO has lower power consumption (approximately 1μA, the operating current of μC is 100μA).
Integrated IIC slave interface: GPIO has built-in IIC slave interface, which can work at full speed even in standby mode.
Small package: GPIO device provides the smallest package size-3mm x 3mm QFN!
Low cost: You don’t have to pay for features you don’t use.
Quick time to market: no need to write additional code, documentation, and no maintenance work.
Flexible lighting control: Built-in multi-channel high-resolution PWM output.
Pre-determined response time: shorten or determine the response time between external events and interruptions.
Better lighting effects: The matched current output ensures even display brightness.
The wiring is simple: only two can be used to form an IIC bus or three to form an SPI bus.
Several groups of GPIO pins of ARM have similar functions. GPxCON controls pin functions. GPxDAT is used to read and write pin data. In addition, GPxUP is used to determine whether to use a pull-up resistor. x is A, B,, H/J,
GPAUP has no pull-up resistor.
Used to configure pin functions. Configure
PORT A is different from PORT B~PORT H/J in function selection, each bit in GPACON corresponds to a pin, a total of 23 pins. When a bit is set to 0, the corresponding pin is an output pin. At this time, we can write 1 or 0 in GPADAT to make this pin output high or low; when a bit is set to 1, the corresponding pin is the address line or used for address control. GPADATA is useless.
Generally speaking, GPACON is usually set to 1 to access external devices.
PORT B~PORT H/J
The register operation is exactly the same, every two bits in GPxCON control a pin,
00 input 01 output
10 Special functions 11 Reserved
GPxDAT is used to read and write pins. When the pin is set to input, read this register to know whether the level of the corresponding pin is high or low. When the pin is set to output, write the bit of this register to make Whether the pin outputs high level or low level.
When a bit in the GPxUP register is 1, the corresponding pin has no internal pull-up resistor; when it is 0, the corresponding pin has an internal pull-up resistor.
The role of the pull-up resistor is that when the GPIO pin is in the third state, it neither outputs a high level nor a low level. Instead, it shows a high-impedance state, which is equivalent to no chip. Its level state is determined by the pull-up resistor.
CPLD CoolRunner -II Family 1.5K Gates 64 Macro Cells 263MHz 0.18um Technology 1.8V 100-Pin VTQFP
CPLD CoolRunner -II Family 1.5K Gates 64 Macro Cells 159MHz 0.18um Technology 1.8V 56-Pin CSBGA
CPLD CoolRunner -II Family 1.5K Gates 64 Macro Cells 159MHz 0.18um Technology 1.8V 44-Pin PLCC
FPGA Virtex-5 FXT Family 65nm Technology 1V 1136-Pin FCBGA
FPGA Virtex-5 FXT Family 65nm Technology 1V 1136-Pin FCBGA
Support