It’s still the same.
If the pin is connected to ground on start up, it works. But if nothing is connected on start up, it gives me some true and some false values.
Another thing is, if i read all pins of port 0, it gives me strage values aswell, not matter, if one pin is connected to ground or not on startup.
The following code and nothing connected:
IO60P16.InputPort m_TempPin0 = new IO60P16.InputPort(io60p16, IO60P16.IOPin.Port0_Pin0, IO60P16.ResistorMode.ResistivePullUp);
IO60P16.InputPort m_TempPin1 = new IO60P16.InputPort(io60p16, IO60P16.IOPin.Port0_Pin1, IO60P16.ResistorMode.ResistivePullUp);
IO60P16.InputPort m_TempPin2 = new IO60P16.InputPort(io60p16, IO60P16.IOPin.Port0_Pin2, IO60P16.ResistorMode.ResistivePullUp);
IO60P16.InputPort m_TempPin3 = new IO60P16.InputPort(io60p16, IO60P16.IOPin.Port0_Pin3, IO60P16.ResistorMode.ResistivePullUp);
IO60P16.InputPort m_TempPin4 = new IO60P16.InputPort(io60p16, IO60P16.IOPin.Port0_Pin4, IO60P16.ResistorMode.ResistivePullUp);
IO60P16.InputPort m_TempPin5 = new IO60P16.InputPort(io60p16, IO60P16.IOPin.Port0_Pin5, IO60P16.ResistorMode.ResistivePullUp);
IO60P16.InputPort m_TempPin6 = new IO60P16.InputPort(io60p16, IO60P16.IOPin.Port0_Pin6, IO60P16.ResistorMode.ResistivePullUp);
IO60P16.InputPort m_TempPin7 = new IO60P16.InputPort(io60p16, IO60P16.IOPin.Port0_Pin7, IO60P16.ResistorMode.ResistivePullUp);
while(true)
{
Debug.Print("0: " + m_TempPin0.Read());
Debug.Print("1: " + m_TempPin1.Read());
Debug.Print("2: " + m_TempPin2.Read());
Debug.Print("3: " + m_TempPin3.Read());
Debug.Print("4: " + m_TempPin4.Read());
Debug.Print("5: " + m_TempPin5.Read());
Debug.Print("6: " + m_TempPin6.Read());
Debug.Print("7: " + m_TempPin7.Read());
Thread.Sleep(100);
}
Output:
0: True
1: True
3: False
4: True
5: False
6: True
7: True
0: True
1: True
3: True
4: True
5: False
6: True
7: True
0: True
1: True
3: False
4: True
5: False
6: True
7: True
0: True
1: True
3: False
4: True
5: True
6: True
7: True
0: True
1: True
3: True
4: True
5: True
6: True
7: True
0: True
1: True
3: True
4: True
5: False
6: True
7: True
0: True
1: True
3: False
4: True
5: True
6: True
7: True
0: True
1: True
3: True
4: True
5: False
6: True
7: True