EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: gcardinal on March 10, 2016, 12:55:07 pm

Title: Programmatically switch betwean ground/Vcc/signal for input port
Post by: gcardinal on March 10, 2016, 12:55:07 pm
I have this idea on creating a Atmel-based board with PS/2 (6 input lines) connector for testing of old keyboards.

So I'm looking for a way to assign 5V, ground or signal to each pin of the connector after board has been manufactured. All 3 lines do exist - also I have 6 extra digital pins to control all this - but I'm not sure what is the best solution here.

My original idea was to have logic gate and then set of 3 NPN for each connector line - but that sounds a bit too complicated - since it will be 6 logic gate arrays + 3 x 6 NPN's

Is there a more "basic" way to do this?..  Vcc = +4.5V to +5.5V and Max Current = 0.3 A.

Any feedback is greatly appreciated!
Title: Re: Programmatically switch betwean ground/Vcc/signal for input port
Post by: danadak on March 10, 2016, 03:12:41 pm
This is a fairly easy job for a Cypress PSOC as it has the ability
to route on chip and handle both analog and digital signals.

I assume you have to supply power to keyboard, and that is just
a few mA, easy for a UP to supply from a digital pin. If keyboard
also has LEDs then power will be too much and have to be handled
with external MOSFET high side switch. Or possibly use multiple
pins paralled to supply power, check specs both keyboard and
the processor you use to control all this.

 So what you have remaining are just normal digital I/O to mux, use
mux/demux logic parts for that.

Regards, Dana.