1 = VGA Signal Wiring = 2 3 The generation of a VGA-compatible video signal from a PIC32 microcontroller 4 is demonstrated by a number of [[VGA Output Examples|examples]]. Common to 5 these are certain hardware characteristics, described here to avoid 6 unnecessary repetition. 7 8 == Data Signal Routing == 9 10 The following routing from output pins to output socket pins is employed. 11 12 {{{#!graphviz 13 //format=svg 14 //transform=notugly 15 digraph routing { 16 graph [ranksep=1.0,style=invis,fontsize="15.0",fontname="sans-serif",splines=ortho]; 17 node [shape=box,style=filled,fillcolor=white,fontsize="13.0",fontname="sans-serif"]; 18 rankdir=LR; 19 20 /* Output pins. */ 21 22 subgraph { 23 rank=same; 24 pins [label="Output pins",shape=note,fillcolor=gold]; 25 D6 [fillcolor=lightgrey]; 26 D5 [fillcolor="#ff7777"]; 27 D4 [fillcolor="#ff7777"]; 28 D3 [fillcolor="#77ff77"]; 29 D2 [fillcolor="#77ff77"]; 30 D1 [fillcolor="#7777ff"]; 31 D0 [fillcolor="#7777ff"]; 32 D7 -> D6 -> D5 -> D4 -> D3 -> D2 -> D1 -> D0 -> HSYNC -> VSYNC -> pins [style=invis]; 33 } 34 35 /* Intensity adjustment resistor. */ 36 37 I2 [label="2200R"]; 38 39 /* Colour channel resistors and diodes. */ 40 41 subgraph { 42 rank=same; 43 R2 [label="470R",fillcolor="#ff7777"]; 44 R1 [label="1000R",fillcolor="#ff7777"]; 45 RD [label="diode",fillcolor="#ff7777"]; 46 R2 -> R1 -> RD [style=invis]; 47 } 48 49 subgraph { 50 rank=same; 51 G2 [label="470R",fillcolor="#77ff77"]; 52 G1 [label="1000R",fillcolor="#77ff77"]; 53 GD [label="diode",fillcolor="#77ff77"]; 54 G2 -> G1 -> GD [style=invis]; 55 } 56 57 subgraph { 58 rank=same; 59 B2 [label="470R",fillcolor="#7777ff"]; 60 B1 [label="1000R",fillcolor="#7777ff"]; 61 BD [label="diode",fillcolor="#7777ff"]; 62 B2 -> B1 -> BD [style=invis]; 63 } 64 65 /* Video signals. */ 66 67 subgraph { 68 rank=same; 69 signals [label="Video signals",shape=note,fillcolor=gold]; 70 R [fillcolor="#ff7777"]; 71 G [fillcolor="#77ff77"]; 72 B [fillcolor="#7777ff"]; 73 R -> G -> B -> HS -> VS -> signals [style=invis]; 74 } 75 76 D7 -> I2; 77 D6 /* not connected */ 78 D5 -> R2 -> R; 79 D4 -> R1 -> R; 80 D3 -> G2 -> G; 81 D2 -> G1 -> G; 82 D1 -> B2 -> B; 83 D0 -> B1 -> B; 84 85 I2 -> RD; 86 I2 -> GD; 87 I2 -> BD; 88 89 RD -> R; 90 GD -> G; 91 BD -> B; 92 93 HSYNC -> HS; 94 VSYNC -> VS; 95 } 96 }}} 97 98 Where two bits of intensity are supported, D6 is routed via a 4700 ohm 99 resistor to each of the colour channel diodes, contributing to the existing 100 D7-driven intensity signal. 101 102 == Pinouts == 103 104 For the examples documented in this project, the following pinouts apply. VGA 105 connectors also support other signals, generally used for querying a display 106 for supported resolutions, but since a statically configured resolution is 107 employed by these examples, these other signals are left unconnected. 108 109 === Output Socket Pinout === 110 111 {{{ 112 5 (GND) 4 (NC) 3 (B) 2 (G) 1 (R) 113 114 10 (GND) 9 (NC) 8 (GND) 7 (GND) 6 (GND) 115 116 15 (NC) 14 (VS) 13 (HS) 12 (NC) 11 (NC) 117 }}} 118 119 === Output Cable Pinout === 120 121 {{{ 122 1 (R) 2 (G) 3 (B) 4 (NC) 5 (GND) 123 124 6 (GND) 7 (GND) 8 (GND) 9 (NC) 10 (GND) 125 126 11 (NC) 12 (NC) 13 (HS) 14 (VS) 15 (NC) 127 }}} 128 129 === References === 130 131 * [[WikiPedia:VGA connector]] 132 133 * [[http://papilio.cc/index.php?n=Papilio.VGAWing|VGAWing]] 134 135 * [[http://lucidscience.com/pro-vga%20video%20generator-2.aspx| 136 LucidScience - Build the VGA VIDEO GENERATOR - Page 2 of 16]] 137 138 * [[https://sites.google.com/site/h2obsession/CBM/C128/rgbi-to-vga| 139 RGBI to VGA - H2Obsession]]