1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/examples/vga-dual/README.txt Tue Oct 23 21:34:54 2018 +0200
1.3 @@ -0,0 +1,105 @@
1.4 +Introduction
1.5 +------------
1.6 +
1.7 +This example demonstrates the generation of an analogue VGA signal from a
1.8 +PIC32 microcontroller using general output pins. It follows on from the work
1.9 +done in the VGAPIC32 project. The result is not entirely satisfactory:
1.10 +
1.11 + * Every fourth pixel is wider than the others, this apparently being an
1.12 + artefact of the DMA transfer mechanism.
1.13 +
1.14 +It might be possible to introduce some kind of delay and even out the pixel
1.15 +widths, but this has not been investigated with hardware. However, unlike the
1.16 +vga-pmp example, there is no accompanying signal to potentially orchestrate
1.17 +the staging of individual pixels at a slightly delayed rate. Potentially, the
1.18 +peripheral clock signal might be generated and processed to make such a
1.19 +signal.
1.20 +
1.21 +Unlike the vga example, this example employs two DMA channels for pixel data
1.22 +which are interleaved to investigate a potential remedy for the wide pixel
1.23 +effect. Unfortunately, despite each channel contributing every other word (or
1.24 +group of four pixels), the effect persists. However, the picture is perhaps
1.25 +more stable than in the vga example.
1.26 +
1.27 +Hardware Details
1.28 +================
1.29 +
1.30 +The pin usage of this solution is documented below.
1.31 +
1.32 +PIC32MX270F256B-50I/SP Pin Assignments
1.33 +--------------------------------------
1.34 +
1.35 +MCLR# 1 \/ 28
1.36 +HSYNC/OC1/RA0 2 27
1.37 +VSYNC/OC2/RA1 3 26 RB15/U1TX
1.38 + D0/RB0 4 25 RB14
1.39 + D1/RB1 5 24 RB13/U1RX
1.40 + D2/RB2 6 23
1.41 + D3/RB3 7 22 RB11/PGEC2
1.42 + 8 21 RB10/PGEC3
1.43 + RA2 9 20
1.44 + RA3 10 19
1.45 + D4/RB4 11 18 RB9
1.46 + 12 17 RB8
1.47 + 13 16 RB7/D7
1.48 + D5/RB5 14 15
1.49 +
1.50 +Note that RB6 is not available on pin 15 on this device (it is needed for VBUS
1.51 +unlike the MX170 variant).
1.52 +
1.53 +UART Connections
1.54 +----------------
1.55 +
1.56 +UART1 is exposed by the RB13 and RB15 pins.
1.57 +
1.58 +Data Signal Routing
1.59 +-------------------
1.60 +
1.61 +For one bit of intensity, two bits per colour channel:
1.62 +
1.63 +D7 -> 2200R -> I
1.64 +
1.65 +I -> diode -> R
1.66 +I -> diode -> G
1.67 +I -> diode -> B
1.68 +
1.69 +D6 (not connected)
1.70 +
1.71 +D5 -> 470R -> R
1.72 +D4 -> 1000R -> R
1.73 +D3 -> 470R -> G
1.74 +D2 -> 1000R -> G
1.75 +D1 -> 470R -> B
1.76 +D0 -> 1000R -> B
1.77 +
1.78 +HSYNC -> HS
1.79 +VSYNC -> VS
1.80 +
1.81 +Output Socket Pinout
1.82 +--------------------
1.83 +
1.84 + 5 (GND) 4 (NC) 3 (B) 2 (G) 1 (R)
1.85 +
1.86 + 10 (GND) 9 (NC) 8 (GND) 7 (GND) 6 (GND)
1.87 +
1.88 + 15 (NC) 14 (VS) 13 (HS) 12 (NC) 11 (NC)
1.89 +
1.90 +Output Cable Pinout
1.91 +-------------------
1.92 +
1.93 + 1 (R) 2 (G) 3 (B) 4 (NC) 5 (GND)
1.94 +
1.95 + 6 (GND) 7 (GND) 8 (GND) 9 (NC) 10 (GND)
1.96 +
1.97 + 11 (NC) 12 (NC) 13 (HS) 14 (VS) 15 (NC)
1.98 +
1.99 +References
1.100 +----------
1.101 +
1.102 +https://en.wikipedia.org/wiki/VGA_connector
1.103 +
1.104 +http://papilio.cc/index.php?n=Papilio.VGAWing
1.105 +
1.106 +http://lucidscience.com/pro-vga%20video%20generator-2.aspx
1.107 +
1.108 +https://sites.google.com/site/h2obsession/CBM/C128/rgbi-to-vga