We are using a RevPi Connect 5 (Kernel 6.12.91-revpi0-v8, PiCtory 2.16.0) with an MIO module. We were having some issues with a digital input connected to a device that uses a solid-state N-channel open-drain MOSFET, and we realized we needed to enable the internal pullup resistor. In the documentation for the MIO it says:
This led us to believe that setting Pullup to 1 would activate the pullup resistor on ALL digital inputs. However, what we saw was that it only seemed to work for INP1, while the other digital input (INP4) was showing 0V. Finally, after finding the C code for the MIO (and with some AI help), we realized that the Pullup value is a bitmask, where each bit enables the pullup resistor for a pullup resistor. To activate pullup resistors on INP1 and INP4 we needed to set the Pullup value to 9 (1 + 8).Pullup (MEM)
Activates a pull-up resistor for the digital inputs:
0: Pull-up deactivated
1: Pull-up activated
This is not clearly communicated in the documentation, so I wanted to share this to help those in the future who may come across this issue.
Thanks,
Jordan