Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
|
private:keyboard_switch [2012/06/01 21:39] Patrick Wacker weitere Bearbeitung |
private:keyboard_switch [2012/06/14 18:57] (aktuell) Patrick Wacker angefangen register zu beschreiben |
||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== Erste Überlegungen zu einen KeyBoard-Switch ====== | + | ====== Erste Überlegungen zu einen Keyboard/Mouse-Switch ====== |
| - | === Anforderungen === | + | ==== Anforderungen ==== |
| * 2 ((evt. 3 oder erweiterbar)) Tastaturen (KB) und 2 ((evt. 3 oder erweiterbar)) Mäuse (MS) anschließbar (beides PS/2-Schnittstelle) | * 2 ((evt. 3 oder erweiterbar)) Tastaturen (KB) und 2 ((evt. 3 oder erweiterbar)) Mäuse (MS) anschließbar (beides PS/2-Schnittstelle) | ||
| Zeile 17: | Zeile 17: | ||
| * | * | ||
| - | === Umsetzung === | + | ==== Umsetzung ==== |
| * Ein µController zur Verwaltung der Eingaben (2x KB/MS) | * Ein µController zur Verwaltung der Eingaben (2x KB/MS) | ||
| Zeile 24: | Zeile 24: | ||
| * Simples serielles Protokoll zur Übertragung der Daten (SPI oder I2C) ((damit eine vielzahl von Clients bedient werden kann)) | * Simples serielles Protokoll zur Übertragung der Daten (SPI oder I2C) ((damit eine vielzahl von Clients bedient werden kann)) | ||
| * | * | ||
| + | |||
| + | |||
| + | ==== Aufbau ==== | ||
| + | |||
| + | <graphviz dot left> | ||
| + | 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" ]; | ||
| + | |||
| + | } | ||
| + | </graphviz> | ||
| + | |||
| + | |||
| + | ==== Mögliche SPI Telegramme ==== | ||
| + | |||
| + | Die hier dokumentierten Telegramme dienen erstmal einer ersten Übersicht und keineswegs der fertigen Implementierung! Änderungen können jederzeit stattfinden! | ||
| + | |||
| + | |||
| + | <register> | ||
| + | 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 | ||
| + | </register> | ||