paul@148 | 1 | = VGA Output Example = |
paul@148 | 2 | |
paul@149 | 3 | This example demonstrates the generation of an analogue [[VGA Signal Output| |
paul@149 | 4 | VGA]] signal from a PIC32 microcontroller using general output pins. It |
paul@149 | 5 | follows on from the work done in the VGAPIC32 project. The result is not |
paul@149 | 6 | entirely satisfactory: |
paul@148 | 7 | |
paul@148 | 8 | * Every fourth pixel is wider than the others, this apparently being an |
paul@148 | 9 | artefact of the DMA transfer mechanism. |
paul@148 | 10 | |
paul@148 | 11 | It might be possible to introduce some kind of delay and even out the pixel |
paul@148 | 12 | widths, but this has not been investigated with hardware. However, unlike the |
paul@148 | 13 | [[../vga-pmp|vga-pmp]] example, there is no accompanying signal to potentially |
paul@148 | 14 | orchestrate the staging of individual pixels at a slightly delayed rate. |
paul@148 | 15 | |
paul@148 | 16 | Attempts to introduce other remedies to the wide pixel problem have been made |
paul@148 | 17 | with the [[../vga-dual|vga-dual]] and [[../vga-timer|vga-timer]] examples. |
paul@148 | 18 | |
paul@148 | 19 | == Hardware Details == |
paul@148 | 20 | |
paul@148 | 21 | The pin usage of this solution is documented below. |
paul@148 | 22 | |
paul@148 | 23 | === PIC32MX270F256B-50I/SP Pin Assignments === |
paul@148 | 24 | |
paul@148 | 25 | {{{ |
paul@148 | 26 | MCLR# 1 \/ 28 |
paul@148 | 27 | HSYNC/OC1/RA0 2 27 |
paul@148 | 28 | VSYNC/OC2/RA1 3 26 RB15/U1TX |
paul@148 | 29 | D0/RB0 4 25 RB14 |
paul@148 | 30 | D1/RB1 5 24 RB13/U1RX |
paul@148 | 31 | D2/RB2 6 23 |
paul@148 | 32 | D3/RB3 7 22 RB11/PGEC2 |
paul@148 | 33 | 8 21 RB10/PGEC3 |
paul@148 | 34 | RA2 9 20 |
paul@148 | 35 | RA3 10 19 |
paul@148 | 36 | D4/RB4 11 18 RB9 |
paul@148 | 37 | 12 17 RB8 |
paul@148 | 38 | 13 16 RB7/D7 |
paul@148 | 39 | D5/RB5 14 15 |
paul@148 | 40 | }}} |
paul@148 | 41 | |
paul@148 | 42 | Note that RB6 is not available on pin 15 on this device (it is needed for VBUS |
paul@148 | 43 | unlike the MX170 variant). |
paul@148 | 44 | |
paul@148 | 45 | === UART Connections === |
paul@148 | 46 | |
paul@148 | 47 | UART1 is exposed by the RB13 and RB15 pins. |
paul@148 | 48 | |
paul@148 | 49 | === Data Signal Routing === |
paul@148 | 50 | |
paul@148 | 51 | For one bit of intensity, two bits per colour channel: |
paul@148 | 52 | |
paul@148 | 53 | {{{ |
paul@148 | 54 | D7 -> 2200R -> I |
paul@148 | 55 | |
paul@148 | 56 | I -> diode -> R |
paul@148 | 57 | I -> diode -> G |
paul@148 | 58 | I -> diode -> B |
paul@148 | 59 | |
paul@148 | 60 | D6 (not connected) |
paul@148 | 61 | |
paul@148 | 62 | D5 -> 470R -> R |
paul@148 | 63 | D4 -> 1000R -> R |
paul@148 | 64 | D3 -> 470R -> G |
paul@148 | 65 | D2 -> 1000R -> G |
paul@148 | 66 | D1 -> 470R -> B |
paul@148 | 67 | D0 -> 1000R -> B |
paul@148 | 68 | |
paul@148 | 69 | HSYNC -> HS |
paul@148 | 70 | VSYNC -> VS |
paul@148 | 71 | }}} |