====== Erste Überlegungen zu einen Keyboard/Mouse-Switch ====== ==== Anforderungen ==== * 2 ((evt. 3 oder erweiterbar)) Tastaturen (KB) und 2 ((evt. 3 oder erweiterbar)) Mäuse (MS) anschließbar (beides PS/2-Schnittstelle) * jedes KB/MS paar soll an jeden Ausgang schaltbar sein * [X] ((tbd (to be defined) )) Ausgänge [mindestens 4] * Entweder über Wert (1,2,3,4,5 etc) oder über Bitmaske (1,2,4,8,16 etc) * Über den Wert währen bei 8 Bit theoretisch 255 Ausgänge möglich * bei der Bitmaske nur 8, allerdings könnte es simpel realisiert werden das ein und dieselbe Eingabe an verschiedene Ausgänge geht. * **wird das wirklich benötigt oder wäre es nur ein "//nice to have//"?** * Umschaltung sowohl über die Tastatur, als auch über ein PC-Programm ((Windows und Linux)) möglich. * Unterschiedliche Tastatur Codes sollten pro Anschluss unterstützt werden * Tastatur mit US-Layout an einem und eine mit DE-Layout an dem anderen Anschluss?? * Der aktuelle Status (NumLock, CapsLock, Rollen) muss richtig an der Tastatur angezeigt werden! * Client Anschluss über USB (erweiterung auf PS/2 sollte möglich sein) * ==== Umsetzung ==== * Ein µController zur Verwaltung der Eingaben (2x KB/MS) * groß genug um auch 3-4 KB/MS zu verwalten * Zukunft: //Möglichkeit des Anschlusses eines USB-Hubs an den Tastaturen und Mäuse angeschlossen werden können// * Simples serielles Protokoll zur Übertragung der Daten (SPI oder I2C) ((damit eine vielzahl von Clients bedient werden kann)) * ==== Aufbau ==== digraph aufbau { graph [ rankdir="TB" ]; node [ shape=record, fontname=Helvetica, fontsize=10 ]; edge [ fontname=Helvetica, fontsize=10 ]; subgraph cluster0 { style="plaintext"; color="invis"; kb1 [ label="Keyboard 1", shape="ellipse", style=filled, fillcolor=gray ]; ms1 [ label="Mouse 1", shape="ellipse", style=filled, fillcolor=gray ]; label = "required"; } subgraph cluster1 { style="plaintext"; color="invis"; kb2 [ label="Keyboard 2", shape="ellipse", style=filled, fillcolor=lightgray ]; ms2 [ label="Mouse 2", shape="ellipse", style=filled, fillcolor=lightgray ]; label = "optional"; } subgraph cluster2 { style="filled, dashed"; color="black"; fillcolor="lightgrey" usbhub [ label="USB-Hub", style="filled", fillcolor="#e0e0e0" ]; keyboards [ label="Keyboards", shape="oval", style="filled", fillcolor="#e0e0e0" ]; mice [ label="Mice", shape="oval", style="filled", fillcolor="#e0e0e0" ]; keyboards -> usbhub [ label="USB", dir="both" ]; mice -> usbhub [ label="USB", dir="both" ]; label = "optional USB connection"; } subgraph cluster3 { style="invis"; client1 [ label="Client Contr. 1", style=filled, fillcolor=lightblue ]; PC1 [ label="PC 1", shape="box3d", style=filled, fillcolor=green ]; client1 -> PC1 [ label="USB", color="black" ]; } subgraph cluster4 { style="invis"; client2 [ label="Client Contr. 2", style=filled, fillcolor=lightblue ]; PC2 [ label="PC 2", shape="box3d", style=filled, fillcolor=green ]; client2 -> PC2 [ label="USB", color="black" ]; } subgraph cluster5 { style="invis"; client3 [ label="Client Contr. 3", style=filled, fillcolor=lightblue ]; PC3 [ label="PC 3", shape="box3d", style=filled, fillcolor=green ]; client3 -> PC3 [ label="USB", color="black" ]; } subgraph cluster6 { style="invis"; client4 [ label="Client Contr. 4", style=filled, fillcolor=lightblue ]; PC4 [ label="PC 4", shape="box3d", style=filled, fillcolor=green ]; client4 -> PC4 [ label="USB", color="black" ]; } subgraph cluster7 { style="dashed"; client6 [ label=" . . . \nClient X", style="solid", color="white" ]; PC6 [ label=" . . . \nPC X", style="solid", color="white" ]; client6 -> PC6 [ label="USB", color="black" ]; client5 [ label="Client Contr. 5", style="filled", fillcolor="#d5e3ff" ]; PC5 [ label="PC 5", shape="box3d", style="filled", fillcolor="#b6ffc2" ]; client5 -> PC5 [ label="USB", color="black" ]; { rank="same"; "client6"; "client5"; } { rank="same"; "PC6"; "PC5"; } label = "etc. (expandable)"; } MC1 [ label="\rMain Controller", fontsize="14", width="1.70", height="1.00", style="filled", fillcolor="yellow" ]; { rank="same"; "MC1"; "usbhub"; } kb1 -> MC1 [ arrowhead="open", style="solid", label="PS/2", color="black" ]; ms1 -> MC1 [ arrowhead="open", style="solid", label="PS/2", color="black" ]; kb2 -> MC1 [ arrowhead="open", style="solid", label="PS/2", color="gray" ]; ms2 -> MC1 [ arrowhead="open", style="solid", label="PS/2", color="gray" ]; MC1 -> usbhub [ style="dotted", label="USB", dir="both" ]; MC1 -> client1 [ label="SPI", color="black" ]; MC1 -> client2 [ label="SPI", color="black" ]; MC1 -> client3 [ label="SPI", color="black" ]; MC1 -> client4 [ label="SPI", color="black" ]; MC1 -> client5 [ label="SPI", color="black" ]; } ==== Mögliche SPI Telegramme ==== Die hier dokumentierten Telegramme dienen erstmal einer ersten Übersicht und keineswegs der fertigen Implementierung! Änderungen können jederzeit stattfinden! register = general control long desc = general control telegram from the master #short desc = perms = W #addr = 0x0 #reset = 0x0 length = 24 bit range = 7 7 bit name = GC bit desc = 0 - No general control command\n1 - GC Command (see CMD) #bit flags = W1C bit range = 6 0 bit name = CMD bit desc = 000 0001 (0x01) - GET_KB_LED_STATUS\n000 0010 (0x02) - GET_KB_NUMLOCK_STATUS\n000 0011 (0x03) - GET_KB_ROLL_STATUS\n000 0100 (0x05) - GET_KB_CAPSLOCK_STATUS