Author Topic: Programmatically switch betwean ground/Vcc/signal for input port  (Read 1344 times)

0 Members and 1 Guest are viewing this topic.

Offline gcardinalTopic starter

  • Supporter
  • ****
  • Posts: 37
  • Country: no
  • electronics noob
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!
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: Programmatically switch betwean ground/Vcc/signal for input port
« Reply #1 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.
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf