the keyboard should not send any data unless you type at the same time, which would be silly ^_^. but i will give it a shot somewhen...
The PS2 keyboard does not snoop the bus before sending data. You will have contention. Furthermore, when the 8042 pulls the data and clock lines to tell the KB it wants to send data, which device will respond and synth the clock? The 'pass throgh' devices work by either cutting off the KB when it wants to send data, or buffering all the data and passing it on is a sort of store and forward idea. The PS2 protocol is dead simple and a little microcontroller work could give you a 'traffic cop' to properly route/combine the traffic. As for the mouse, yes, the electrical protocol is the same as the KB, but it functions on the 'aux' prt of the 8042. Some BIOS can detect which port a keyboard is connected to and swap the ports, but it's not terribly common. I can provide hords of info on the PS2 protocol if you'd like.
if you have any idea on how to use a PIC to do this or link to information about doing it that would be great, but as for designing a controller based system from the ground up i just cant do right now due to current lack of knoledge on the subject! I imagine the system will function much as a keylogger (hey two birds with one stone, i have allways wanted one of them) and record the data from the inputs when the other is busy or the host is transmitting. yeah the info on ps/2 protocul would be very useful, my email if you feel like sending it is "bigup2bigal [[[[[[[[[at]]]]]]]]] ntlworld..........com" (remove the junk) -Alex
my college has a PIC programmer, if you can supply me the code and a pic chip, then i can program it for you (hopefully) we are using misim atm - but i believe the programmer is fairly universal - i will only be at college for another year - so rush rush rush
i have a full pic programming suite myself personally, thanks though! The problem is not physically doing it it is knowing how to do it, sofar i have simply buit projects that have had code provided... -Alex
i would have though, you can splice everything directly, except the data wires on then you tell you the pic chip to transmit 8 bytes from each input when the first byte is recived, if another input is used its bufferend, and transmitted after the 8 bytes Im not sure, there is probably a guide on the internet somewhere
I think I've seen a few out there. I'll need to dig thrugh a bunch of links. Sorry for no reply, I've just returned from a business trip so communications has been a little difficult. that and jet lag sucks.
Still, none discussed my second idea. Take a switch or a relay circiut to switch between the scanner and the keyboard. That would be simpler than a PIC! If you still want to use a micro, google is your friend. http://www.networktechinc.com/ps2-prots.html That was just the first link for the search criteria: "ps2 protocol"
imho your all making this much more complicated than it needs to be, tho i imagine that if you use a PIC you could probably have 2 mice connected together
Having just read all this thread i remebered i also have a barcode scanner sat in the garage. so after going and finding it and also its 'Y' connector for the ps/2 port, i got my multimeter out and tested the connections. and its literally 1 plug to 2 sockets and wired pin1 from plug to pin 1 on both sockets, same with pin 2 etc yeah it messes up if u press a key while scanning but hey that aint gonna happen tbh
Good Luck Don't know if this has been posted or not, but maybe you set up a toggle switch to swtich voltage between the keyboard and the scanner.
If you're running WinXP, then installing drivers isn't a bitch, seeing as how the drivers are already installed for USB keyboards.. same with USB mouses. PnP!
Listen to Sebbo. I'm typing this on a computer which has a PS/2 scanner and PS/2 keyboard plugged into the PS/2 keyboard port, although in my case the splitter is built into the scanner. Anyway, I strongly suspect that the website Sebbo linked to warns against using two mice on one splitter simply because the BIOS isn't written to handle two PS/2 mice at once. You'll be safe with a keyboard and a scanner because a standard PS/2 barcode scanner looks just like a keyboard to the MB. Also, PS/2 keyboards only talk to the MB when keys are pressed or released, so as long as you don't feel the need to scan a barcode and type at EXACTLY the same time, you'll be fine. Nezuji
quality, i will solder up a splitter tomorrow n try it out ^_^. just hope a magnetic card reader, keyboard and barcode reader can all run off one ps2 port! but then they dont take much juice when not running... -Alex