There are two common ways to set the pin variant:
- Hard-code via firmware on the MCU or configuration on an FPGA
- Physical jumpers or dip switches (see below)
Two bits (B0
, B1
) are required to represent the 4 possible pin variants; easily achieved with jumpers or dip switches:
B0 | B1 | Pinout |
---|---|---|
0 | 0 | UX2-GPIO |
0 | 1 | UX2-ALT |
1 | 0 | UX2-1IS |
1 | 1 | UX2-I2C |
Use R-2R resistor ladder DAC to merge digital bits in to single analog value that can be read by single MCU/FPGA pin: