Thanks all. I want to switch data on a pin that accepts analog and digital inputs.
I want to connect the pin to my micro controller gpio when in "digital" mode only and block the analog otherwise. The analog can get up to +10 to -10v and it will damage the micro. I thought ssr will act like mechanical relay to solve this problem but now I know it has higher capacitance. Is there a good way to do this?
It sounds like you do not need isolation, and any decision to switch any relay, would be delayed so pin damage could already occur.
Common would be to use a series resistor with clamp diodes, to manage the Analog over swings, and then you add a small capacitor in parallel with the resistor, so the high speed digital edges 0-Vcc still make it through.
If you want to measure the full -10 to +10 swing, at the micro so reduced to a 0-3.3Vcc span, things get trickier, as your Analog gain could be 1/6, so you need to remove the divider elements when you have a digital data drive, when you want 1:1.
A CMOS analog switch (x2) could manage that.