Here's a shot of a test of the first two General Purpose I/O Service Interface Function Blocks (GPIO SIFBs) for the Raspberry Pi 2:
- Pin 3 of the Raspberry Pi 2 GPIO header is configured as an output using an instance of the GP_OUT2 type.
- Pin 5 is configured as an input using an instance of the GP_IN2 type.
- The output on pin 3 is looped back to the input on pin 5 for testing.
- The value at the X input (0=LOW, 1=HIGH) of the GP_OUT instance is written to pin 3 when the REQ input is triggered.
- The value at pin 3 is conducted electrically to pin 5.
- The value at pin 5 can be read at the
Xoutput of the
GP_IN2instance by triggering its
- For more information, see the following documentation: GP_IN, GP_OUT, PIN_PULL.