paul@23 | 1 | Introduction
|
paul@23 | 2 | ------------
|
paul@23 | 3 |
|
paul@23 | 4 | The VGAPIC32 project provides software and circuit information to generate an
|
paul@32 | 5 | analogue VGA signal from a PIC32 microcontroller. More details can be found in
|
paul@32 | 6 | the following article:
|
paul@32 | 7 |
|
paul@32 | 8 | http://blogs.fsfe.org/pboddie/?p=1712
|
paul@32 | 9 |
|
paul@32 | 10 | See also the docs directory for original versions of the different explanatory
|
paul@32 | 11 | diagrams.
|
paul@23 | 12 |
|
paul@23 | 13 | Contact, Copyright and Licence Information
|
paul@23 | 14 | ------------------------------------------
|
paul@23 | 15 |
|
paul@23 | 16 | The author can be contacted at the following e-mail address:
|
paul@23 | 17 |
|
paul@23 | 18 | paul@boddie.org.uk
|
paul@23 | 19 |
|
paul@23 | 20 | Copyright and licence information can be found in the docs directory - see
|
paul@23 | 21 | docs/COPYING.txt and docs/gpl-3.0.txt for more information.
|
paul@23 | 22 |
|
paul@23 | 23 |
|
paul@23 | 24 |
|
paul@23 | 25 | Hardware Details
|
paul@23 | 26 | ================
|
paul@23 | 27 |
|
paul@23 | 28 | The pin usage of this solution is documented below.
|
paul@23 | 29 |
|
paul@13 | 30 | PIC32MX270F256B-50I/SP Pin Assignments
|
paul@13 | 31 | --------------------------------------
|
paul@13 | 32 |
|
paul@13 | 33 | MCLR# 1 \/ 28
|
paul@30 | 34 | HSYNC/OC1/RA0 2 27
|
paul@30 | 35 | VSYNC/OC2/RA1 3 26 RB15
|
paul@15 | 36 | D0/RB0 4 25 RB14
|
paul@15 | 37 | D1/RB1 5 24 RB13
|
paul@15 | 38 | D2/RB2 6 23
|
paul@15 | 39 | D3/RB3 7 22 RB11/PGEC2
|
paul@15 | 40 | 8 21 RB10/PGEC3
|
paul@15 | 41 | RA2 9 20
|
paul@61 | 42 | OC3/RA3 10 19
|
paul@15 | 43 | D4/RB4 11 18 RB9
|
paul@15 | 44 | 12 17 RB8
|
paul@15 | 45 | 13 16 RB7/D7
|
paul@19 | 46 | D5/RB5 14 15
|
paul@19 | 47 |
|
paul@19 | 48 | Note that RB6 is not available on pin 15 on this device.
|
paul@13 | 49 |
|
paul@61 | 50 | Clock Output Routing
|
paul@61 | 51 | --------------------
|
paul@61 | 52 |
|
paul@61 | 53 | OC3 is used to drive a 74HC273 flip-flop clock pulse (CP) input, with the data
|
paul@61 | 54 | signals then routed through the flip-flop as follows:
|
paul@61 | 55 |
|
paul@61 | 56 | MR# 1 \/ 20 VCC
|
paul@61 | 57 | out D0/Q0 2 19 Q7/D7 out
|
paul@61 | 58 | in D0/D0 3 18 D7/D7 in
|
paul@61 | 59 | in D1/D1 4 17 D6
|
paul@61 | 60 | out D1/Q1 5 16 Q6
|
paul@61 | 61 | out D2/Q2 6 15 Q5/D5 out
|
paul@61 | 62 | in D2/D2 7 14 D5/D5 in
|
paul@61 | 63 | in D3/D3 8 13 D4/D4 in
|
paul@61 | 64 | out D3/Q3 9 12 Q4/D4 out
|
paul@61 | 65 | GND 10 11 CP/OC3 in
|
paul@61 | 66 |
|
paul@61 | 67 | MR# is kept at a high level. All out signals are then supplied to the
|
paul@61 | 68 | analogue circuit provided below.
|
paul@61 | 69 |
|
paul@13 | 70 | Data Signal Routing
|
paul@13 | 71 | -------------------
|
paul@13 | 72 |
|
paul@23 | 73 | For one bit of intensity, two bits per colour channel:
|
paul@23 | 74 |
|
paul@23 | 75 | D7 -> 2200R -> I
|
paul@23 | 76 |
|
paul@29 | 77 | I -> diode -> R
|
paul@29 | 78 | I -> diode -> G
|
paul@29 | 79 | I -> diode -> B
|
paul@23 | 80 |
|
paul@19 | 81 | D6 (not connected)
|
paul@23 | 82 |
|
paul@19 | 83 | D5 -> 470R -> R
|
paul@23 | 84 | D4 -> 1000R -> R
|
paul@23 | 85 | D3 -> 470R -> G
|
paul@23 | 86 | D2 -> 1000R -> G
|
paul@23 | 87 | D1 -> 470R -> B
|
paul@23 | 88 | D0 -> 1000R -> B
|
paul@23 | 89 |
|
paul@29 | 90 | HSYNC -> HS
|
paul@29 | 91 | VSYNC -> VS
|
paul@13 | 92 |
|
paul@13 | 93 | Output Socket Pinout
|
paul@13 | 94 | --------------------
|
paul@13 | 95 |
|
paul@13 | 96 | 5 (GND) 4 (NC) 3 (B) 2 (G) 1 (R)
|
paul@13 | 97 |
|
paul@13 | 98 | 10 (GND) 9 (NC) 8 (GND) 7 (GND) 6 (GND)
|
paul@13 | 99 |
|
paul@13 | 100 | 15 (NC) 14 (VS) 13 (HS) 12 (NC) 11 (NC)
|
paul@13 | 101 |
|
paul@13 | 102 | Output Cable Pinout
|
paul@13 | 103 | -------------------
|
paul@13 | 104 |
|
paul@13 | 105 | 1 (R) 2 (G) 3 (B) 4 (NC) 5 (GND)
|
paul@13 | 106 |
|
paul@13 | 107 | 6 (GND) 7 (GND) 8 (GND) 9 (NC) 10 (GND)
|
paul@13 | 108 |
|
paul@13 | 109 | 11 (NC) 12 (NC) 13 (HS) 14 (VS) 15 (NC)
|
paul@13 | 110 |
|
paul@13 | 111 | References
|
paul@13 | 112 | ----------
|
paul@13 | 113 |
|
paul@13 | 114 | https://en.wikipedia.org/wiki/VGA_connector
|
paul@13 | 115 |
|
paul@13 | 116 | http://papilio.cc/index.php?n=Papilio.VGAWing
|
paul@13 | 117 |
|
paul@13 | 118 | http://lucidscience.com/pro-vga%20video%20generator-2.aspx
|
paul@23 | 119 |
|
paul@23 | 120 | https://sites.google.com/site/h2obsession/CBM/C128/rgbi-to-vga
|