IO Pins Not Responding

I just got an SSC-32 and I’ve connected it to a proper power source. I’m driving VEX servos and motors and I want to read some simple VEX button switches. This is all in prep for driving some pneumatic valves and reading some pressure transducers

I’ve connected the switch to one of the four IO pins.

Every time I read digital from the pins it responds with a HIGH result regardless of whether or not the pin is pushed or has been pushed or is connected - these results are consistent and resetting/re-powering the board makes no difference.

What’s going on? Help!

Thanks,

Reggie

Per the users manual, in the digital mode, 50k “pull up” resistors are enstated. With nothing connected to the pin this should have the pin reading high all the time. In the analog mode the pins have no resistors connected allowing them to float, so you will need to add your own ~10k-22k resistor to keep the pins in the desired state when nothing is connected. In your case you could try connecting the pin to ground with a ~10k-22k resistor to keep it low until the switch connects it to a 5v supply.

edit: In your setup, an easier fix may be to connect one switch lead to the IO pin and the other switch lead to ground. Then with the switch open the input should be high and with the switch closed the input should be low.

So, given that I’m a software guy and not a EE if I understand you correctly:

DIGITAL MODE:

  1. Shorting the two pins for A (closing a switch between them) wont do me any good cause they’re already pulled to logic 1 by a 50K resistor.

  2. Do I need a 22K resistor in my switch circuit? Can you diagram?

  3. How do I read a Logic 0 then?

ANALOG MODE:
10K? 22K? never mind until I get digital mode to function.

Thanks

Reggie

"DIGITAL MODE:

  1. Shorting the two pins for A (closing a switch between them) wont do me any good cause they’re already pulled to logic 1 by a 50K resistor."

If the pin is already at 5v, then connecting the pin to 5v should not cause the pin state to change. Connecting the pin to ground thru the switch should cause the pin state to change from high to low.

“2) Do I need a 22K resistor in my switch circuit? Can you diagram?”

Probably not if you connect the pin to ground thru the switch.

“3) How do I read a Logic 0 then?”

The 0 logic source you are reading should be connected to ground in some way, eitther on its own or thru a resistor if it would float on its own.

“ANALOG MODE:
10K? 22K? never mind until I get digital mode to function.”

In the analog mode the pin should follow the voltage source it is conneced to. When disconnected from a voltage source, the analog pin should be tied to ground thru a high resistance resistor to keep it at 0v, other wise it will float.

I second this notion. The inputs are pretty standard. You just need to attach your switch from the I/O pin to ground.