I have a part that classifies what kind of power I get on ethernet by presenting different loads. For example, the part needs to have a 100 Ohm resistor across two of its pins, and the part will output a high on its output pin if the power is good (Ethernet is able to supply power). The device then switches to a 30 Ohm resistor, and if Ethernet gives it power, it'll output another high. Then it'll switch to let's say a 10 Ohm resistor, and maybe Ethernet will not supply any power, so it'll output a low.
So, the microcontroller needs to be able to disconnect and connect different resistances. When testing the 100 Ohm resistor, the 30 Ohm and 10 Ohm needs to be disconnected. When testing the 30 Ohm, the 100 Ohm and 10 Ohm needs to be disconnected. So, I know that I can use an optocoupler to connect/disconnect a resistor from the two pins from this testing part. All I have to do is output a high from the microcontroller, and the resistor will be connected.
So, essentially, I need a way of switching on and off without affecting the resistance values. I don't want to use optocouplers because they're expensive. What can I do this with? Can I use a transistor as a switch? If I do, does this affect the resistance value that the part reads across its two pins?