{"id":20,"date":"2020-01-15T19:00:25","date_gmt":"2020-01-15T18:00:25","guid":{"rendered":"http:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/?page_id=20"},"modified":"2020-02-01T13:28:19","modified_gmt":"2020-02-01T12:28:19","slug":"interface","status":"publish","type":"page","link":"https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/interface\/","title":{"rendered":"Interface"},"content":{"rendered":"<p><em>Die Gruppe Interface besteht aus den 3 Teilgruppen 7-Segment-Anzeige, Pseudo-Random-Number-Generator und Gamecontroller.<br \/>\n<\/em><\/p>\n<p><strong>7-Sement-Anzeige<\/strong><\/p>\n<p>Die Untergruppe Anzeige ist f\u00fcr den Entwurf einer Spielanzeige zust\u00e4ndig. Diese Anzeige soll den tempor\u00e4ren und endg\u00fcltigen Spielstand von bis zu zwei Spielern wiedergeben k\u00f6nnen. Zur Realisierung dieser Anzeige hat sich die Gruppe auf eine Darstellung mit 7-Segmentanzeigen geeinigt. Es werden insgesamt vier 7-Segmentanzeigen verbaut. Dies erm\u00f6glicht eine gleichzeitige Wiedergabe des Punktestandes im Multiplayermodus und eine Darstellung der Punktewertung im zweistelligen Bereich. Die Signale f\u00fcr die Anzeigen wird von einem STM32-Mikrocontroller via GPIO \u00fcbertragen.<\/p>\n<figure id=\"attachment_84\" aria-describedby=\"caption-attachment-84\" style=\"width: 242px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" class=\"wp-image-84 size-medium\" src=\"http:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/7_Seg_P2Top-242x300.jpg\" alt=\"\" width=\"242\" height=\"300\" srcset=\"https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/7_Seg_P2Top-242x300.jpg 242w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/7_Seg_P2Top-768x952.jpg 768w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/7_Seg_P2Top-826x1024.jpg 826w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/7_Seg_P2Top-100x124.jpg 100w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/7_Seg_P2Top-150x186.jpg 150w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/7_Seg_P2Top-200x248.jpg 200w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/7_Seg_P2Top-300x372.jpg 300w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/7_Seg_P2Top-450x558.jpg 450w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/7_Seg_P2Top-600x744.jpg 600w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/7_Seg_P2Top-900x1115.jpg 900w\" sizes=\"(max-width: 242px) 100vw, 242px\" \/><figcaption id=\"caption-attachment-84\" class=\"wp-caption-text\">7 Segmentanzeige<\/figcaption><\/figure>\n<figure id=\"attachment_85\" aria-describedby=\"caption-attachment-85\" style=\"width: 764px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" class=\"wp-image-85 size-full\" src=\"http:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/7_Seg_Schematic2.png\" alt=\"\" width=\"764\" height=\"631\" srcset=\"https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/7_Seg_Schematic2.png 764w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/7_Seg_Schematic2-300x248.png 300w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/7_Seg_Schematic2-100x83.png 100w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/7_Seg_Schematic2-150x124.png 150w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/7_Seg_Schematic2-200x165.png 200w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/7_Seg_Schematic2-450x372.png 450w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/7_Seg_Schematic2-600x496.png 600w\" sizes=\"(max-width: 764px) 100vw, 764px\" \/><figcaption id=\"caption-attachment-85\" class=\"wp-caption-text\">7 Segmentanzeige Schaltbild<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p><strong>Pseudo-Random-Number Generator (PRNG)<br \/>\n<\/strong><\/p>\n<p>Der Pseudo-Random-Number Generator kurz PRNG dient bei der Spielekonsole dazu, Zufallszahlen zu erzeugen, welche dann dazu zust\u00e4ndig sind Ingame neue Situationen zu erschaffen. Beispielsweise im Spiel Tetris neue zuf\u00e4llige Steine zu erzeugen. Oder im Spiel Snake das Futter f\u00fcr die Schlange auf dem Spielfeld zu bestimmen. Dieser wurde mithilfe eines linear R\u00fcckgekoppelten Schieberegister umgesetzt. Welches eine Zufallsfolge von 2^n-1 Zufallszahlen erzeugt, wobei n=16 ist. somit stehen dem STM \u00fcber 4Mrd. verschiedene Zahlen zu Verf\u00fcgung. Problematisch war hierbei das erzeugen der Startsequenz f\u00fcr das linear R\u00fcckgekoppelte Shiftregister, da dieses nur eine 0-Sequenz beinhaltet und extern nicht dazu in der Lage war eine Sequenz zu bekommen. Somit w\u00e4re die ausgegebene Zufallsfolge immer die 0-Folge. Dieses Problem wurde mit Hilfe einer Initalisierungsfolge \u00fcber den Data-Out Port realisiert, so dass der STM32 aus der Entertaiment Gruppe beim Start der Spielekonsole die Shiftregister mit einer Sequenz von 1 f\u00fcllt. Nachdem innerhalb von 16 Zyklen das Shiftregister mit einer Startsequenz gef\u00fcllt ist, kann nun der Data-Out Port dazu genutzt werden die neuen Zufallszahlen einzulesen, nach 16 Takten steht eine 16bit lange Zufallszahl im STM bereit und wird dort in einem Vektor zu weiteren Verarbeitung gespeichert.<\/p>\n<figure id=\"attachment_86\" aria-describedby=\"caption-attachment-86\" style=\"width: 605px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" class=\"wp-image-86 size-large\" src=\"http:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/PRNG_oberseite-e1580559727155-1024x768.jpg\" alt=\"\" width=\"605\" height=\"454\" srcset=\"https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/PRNG_oberseite-e1580559727155-1024x768.jpg 1024w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/PRNG_oberseite-e1580559727155-300x225.jpg 300w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/PRNG_oberseite-e1580559727155-768x576.jpg 768w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/PRNG_oberseite-e1580559727155-100x75.jpg 100w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/PRNG_oberseite-e1580559727155-150x112.jpg 150w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/PRNG_oberseite-e1580559727155-200x150.jpg 200w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/PRNG_oberseite-e1580559727155-450x337.jpg 450w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/PRNG_oberseite-e1580559727155-600x450.jpg 600w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/PRNG_oberseite-e1580559727155-900x675.jpg 900w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><figcaption id=\"caption-attachment-86\" class=\"wp-caption-text\">Pseudo-Random-Number-Generator fertige Platine<\/figcaption><\/figure>\n<figure id=\"attachment_87\" aria-describedby=\"caption-attachment-87\" style=\"width: 1462px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" class=\"wp-image-87 size-full\" src=\"http:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/rng_schaltplan.png\" alt=\"\" width=\"1462\" height=\"1371\" srcset=\"https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/rng_schaltplan.png 1462w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/rng_schaltplan-300x281.png 300w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/rng_schaltplan-768x720.png 768w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/rng_schaltplan-1024x960.png 1024w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/rng_schaltplan-100x94.png 100w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/rng_schaltplan-150x141.png 150w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/rng_schaltplan-200x188.png 200w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/rng_schaltplan-450x422.png 450w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/rng_schaltplan-600x563.png 600w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/rng_schaltplan-900x844.png 900w\" sizes=\"(max-width: 1462px) 100vw, 1462px\" \/><figcaption id=\"caption-attachment-87\" class=\"wp-caption-text\">Schaltplan PRNG<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p><strong>Gamecontroller<\/strong><\/p>\n<p>F\u00fcr die Spieleingabe sollen zwei Controller entworfen werden. Statt einen eigenen Mikrocontroller zu verwenden, wird das Problem mit analoger Elektronik gel\u00f6st.<br \/>\nAls genaue Aufgabe wurde festgelegt: die Eingangssignale von bis zu vier Controllern mit jeweils 6 Kn\u00f6pfen (Rechts, Links, Oben, Unten, A und B) sollen \u00fcber eine 5-Bit Leitung an die CPU Gruppe \u00fcbermittelt werden. Damit sind die Anforderungen der urspr\u00fcnglich geplanten Spiele Pong, Snake und Tetris sowie die Navigation in einem Men\u00fc abgedeckt.<br \/>\nBeschreibung Blockschaltbild: Der Ausgang der Controller geht an 5 4&#215;1 Multiplexer, die von der CPU Gruppe mit einem 2-Bit Signal angesteuert werden. So k\u00f6nnen die Zust\u00e4nde der einzelnen Controller abwechselnd abgefragt werden. Alle Controller funktionieren auf die gleiche Weise.<br \/>\nUm zu verhindern, dass ein Knopfdruck mehrfach eingelesen wird, wird das Signal der einzelnen Taster zun\u00e4chst mit einem Kondensator entprellt.<br \/>\nJedem Zustand des Steuerkreuzes wird \u00fcber eine Logikschaltung eine 3-Bit Zahl zugeordnet, die mit D-Flip-Flops zwischengespeichert wird. Die Flip-Flops sind so beschaltet, dass man den Eingang sperren und den aktuellen Ausgang halten kann, sie haben also praktisch einen \u201eEnable-Port&#8220;. Nach kurzer Verz\u00f6gerung durch eine Delay-Schaltung nutzt man diese Funktion, damit eine weitere Eingabe nicht registriert wird w\u00e4hrend ein Knopf gedr\u00fcckt ist. Der Ausgang liefert das Signal des zuerst bet\u00e4tigten Tasters. Das Signal des A- und B-Tasters wird je separat als 1- Bit Signal \u00fcbermittelt. Die Delay-Schaltung wird mit einem Kondensator und einem OPV als Komparator realisiert.<\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_88\" aria-describedby=\"caption-attachment-88\" style=\"width: 1138px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" class=\"wp-image-88 \" src=\"http:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/Platine_GC_Top-1024x639.jpeg\" alt=\"\" width=\"1138\" height=\"710\" srcset=\"https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/Platine_GC_Top-1024x639.jpeg 1024w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/Platine_GC_Top-300x187.jpeg 300w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/Platine_GC_Top-768x479.jpeg 768w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/Platine_GC_Top-100x62.jpeg 100w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/Platine_GC_Top-150x94.jpeg 150w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/Platine_GC_Top-200x125.jpeg 200w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/Platine_GC_Top-450x281.jpeg 450w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/Platine_GC_Top-600x374.jpeg 600w, https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-content\/uploads\/sites\/27\/2020\/02\/Platine_GC_Top-900x562.jpeg 900w\" sizes=\"(max-width: 1138px) 100vw, 1138px\" \/><figcaption id=\"caption-attachment-88\" class=\"wp-caption-text\">Gamecontroller Platine Top<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Die Gruppe Interface besteht aus den 3 Teilgruppen 7-Segment-Anzeige, Pseudo-Random-Number-Generator und Gamecontroller. 7-Sement-Anzeige Die Untergruppe Anzeige ist f\u00fcr den Entwurf einer Spielanzeige zust\u00e4ndig. Diese Anzeige soll den tempor\u00e4ren und endg\u00fcltigen Spielstand von bis zu zwei Spielern wiedergeben k\u00f6nnen. Zur Realisierung &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/interface\/\"> <span class=\"screen-reader-text\">Interface<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":99,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-json\/wp\/v2\/pages\/20"}],"collection":[{"href":"https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-json\/wp\/v2\/users\/99"}],"replies":[{"embeddable":true,"href":"https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-json\/wp\/v2\/comments?post=20"}],"version-history":[{"count":11,"href":"https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-json\/wp\/v2\/pages\/20\/revisions"}],"predecessor-version":[{"id":89,"href":"https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-json\/wp\/v2\/pages\/20\/revisions\/89"}],"wp:attachment":[{"href":"https:\/\/service.projektlabor.tu-berlin.de\/wordpress\/8bit-waffeleisen\/wp-json\/wp\/v2\/media?parent=20"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}