# 5 wire resistive touch screen controller using a microcontroller and transistors

I'm trying to build a controller for a 5 wire resistive touch screen using one microcontroller's digital outputs interfaced with some transistors (currently trying a solution using BJT).

My objective is to allow two out of four of the touch screen terminals to be supplied simultaneously so I can read a given touch position.

In order to read a position on the X axis from left to right, where the output voltage Vo would be Vo=V+ (V+ being a positive reference voltage) on the right edge of the screen, I would need to connect RT and RL to V+ and LT and LL to V- (V+ > V-).

In short, I need a circuit that will work like this:
- RT, RL = V+ ; LT, LL = V- => X+ - LT, RT = V+ ; LL, RL = V- => Y+

This should represent what I'm trying to explain:

LT -------- RT
|--------|
|--------|
LL -------- RL

I came up with a circuit that works fine with a single axis, but it fails to do what I intend when I insert the second axis control.

This is the circuit I came up with so far, using two microcontroller outputs:

The LEDs simulate the touch screen terminals, the switches simulate the microcontroller outputs, which will only be ON one at a time.

If I replicate the same circuit for the Y axis, all the LEDs will be ON, obviously... I'm struggling to come up with a circuit to disable one of the axis' control circuits in order to let the other be able to work.

Any ideas or suggestions will be more than welcome.