DIP switches on a Spider II readable?

After the end-user program has started, is it possible to use the DIP switches for anything? Can the setting be read by the end-user program?

@ e.t. in Ottawa - I would think they are readable unless specifically disable in the firmware. The best way to get the answer would be write a small program to read one of the switches.

But… It would not be a good idea to use the DIP switches in your program. If they are set for anything except normal program operation, and the power is lost to the system, then the system would go to a state which might not run your application.

I don’t see why not.

These switches are connected to GPIO pins. You can instantiate an InputPort for each and read it.
Check the schematics in order to use proper pullup/pulldown settings.


Do not use pullups in the InputPort definition. The pullups are already on the board.

@ Mike - Right, G120E must have it.
It is safe to use MODE pin once the board is fully powered. These are physical switches. User needs to set them back to repower the board.
I see that using switches can be a convenient way to test something quick especially when you don’t have a button module.

Exactly. I have a serial port, and want to coerce one into a status output. It would only be used very rarely, and I don’t want to add a button for it. Thanks for the tips. I should have checked the schematic first, it would have given me the answer.