Output VGA video directly from Pi


14 posts
by Sydcul » Mon Jun 17, 2013 2:21 pm
Hello,

I want to connect the Raspberry Pi to a VGA monitor. Now I know this question has been asked a thousand times before, all with answers like "buy a new monitor" or "buy a converter at amazon".
Now, I don't really want to buy a new monitor, and AFAIK Amazon and ebay are not active in the Netherlands.
But I was just thinking that I might be able to use one of the Raspberry's electronic output ports to send out a VGA signal. I looked around on the web and it looks pretty possible. I have decent electronics knowledge and I have excellent computer knowledge (I don't want to be arrogant), so I could also make some sort of external board. So, before I start with this and get stopped by something impossible in the middle of my designing/testing, I wanted to ask if this could be done (practically, for under €50).
Now please don't start in real complicated terms, as I don't know anything about GPIO and such.

-Lukas
English is not my primary language, and I am only 11 years of age. So please excuse my English.
Computer enthausiast, knowledge level 99999. Also like electronics
User avatar
Posts: 6
Joined: Sat Mar 23, 2013 4:40 pm
by RaTTuS » Mon Jun 17, 2013 2:48 pm
Sydcul wrote:....
I have decent electronics knowledge and I have excellent computer knowledge (I don't want to be arrogant)....

as I don't know anything about GPIO and such.

does not compute!
http://www.onlinekabelshop.nl/webshop/K ... tor-1=hdmi
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX - Prosliver FTW
"That's not right, the badgers have moved the goalposts."
User avatar
Posts: 4167
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
by 6677 » Mon Jun 17, 2013 7:09 pm
You can "bit bang" VGA from microcontrollers. However for RGB VGA you need 3 PWM channels, the pi has one and its used for audio.

Its also incredibly slow to bit bang VGA.

Theoretically if you sacrifice audio you could bit bang greyscale VGA, no colour. In reality, jt would be slow and unusable and you would have to write kernel drivers for Linux to output to it (there is a difference between being computer savvy and having the programming skills to write a driver for something like this).

All the time invested into it is better put towards buying an HDMI or composite to VGA adaptor.
Posts: 372
Joined: Wed Mar 14, 2012 9:23 pm
by Sydcul » Tue Jun 18, 2013 4:23 pm
RaTTuS wrote:
Sydcul wrote:....
I have decent electronics knowledge and I have excellent computer knowledge (I don't want to be arrogant)....

as I don't know anything about GPIO and such.

does not compute!
http://www.onlinekabelshop.nl/webshop/K ... tor-1=hdmi

Image
The image shows up very small, direct link: http://i.imgur.com/vT8i6at.png.
Did you compute?
Thanks for the link tho.

6677 wrote:You can "bit bang" VGA from microcontrollers. However for RGB VGA you need 3 PWM channels, the pi has one and its used for audio.

Its also incredibly slow to bit bang VGA.

Theoretically if you sacrifice audio you could bit bang greyscale VGA, no colour. In reality, jt would be slow and unusable and you would have to write kernel drivers for Linux to output to it (there is a difference between being computer savvy and having the programming skills to write a driver for something like this).

All the time invested into it is better put towards buying an HDMI or composite to VGA adaptor.

Thank you for your reaction. I know I could just buy such a thing, but it would be fun to make it. But I guess I'll just buy this Konig device.
English is not my primary language, and I am only 11 years of age. So please excuse my English.
Computer enthausiast, knowledge level 99999. Also like electronics
User avatar
Posts: 6
Joined: Sat Mar 23, 2013 4:40 pm
by PiGraham » Tue Jun 18, 2013 4:42 pm
I also like the idea of bitbanging a display output. It takes me back to the ZX80/80/Spectrum era!
( One of the original "Raspberry Pi" concept cheap home computers when I was 11! )

Pixel clock for 640x480 VGA is 25MHz. I think the SPI port will clock at 32MHz. Maybe some monitors would tolerate that.
You could possibly DMA intensity data on SPI and gate it with software controlled RGB channels running at 1/8th the speed. You could select the RGB colour 8 colours per 8 pixels - a bit like a Spectrum!

If you want something usable get a converter. See these posts. There are some for ~£5 on EBay.
(Not verified
Last edited by PiGraham on Tue Jun 18, 2013 6:24 pm, edited 1 time in total.
Posts: 734
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville
by jamesh » Tue Jun 18, 2013 4:59 pm
Sydcul wrote:

Did you compute?
Thanks for the link tho.



I think the point was that the phrase "I have decent electronics knowledge and I have excellent computer knowledge (I don't want to be arrogant)" doesn't match up with the phrase "Now please don't start in real complicated terms, as I don't know anything about GPIO and such"....

I would suggest it will be a lot cheaper in time and torn out hair to buy a device. There may be other devices that are cheaper than that linked to as well.
Raspberry Pi Engineer
Raspberry Pi Engineer
Posts: 10601
Joined: Sat Jul 30, 2011 7:41 pm
by RaTTuS » Wed Jun 19, 2013 8:41 am
http://www.onlinekabelshop.nl/webshop/D ... tor-1=hdmi
these have been shown to work YMMV
I would add power to it though and as your electronics is good then that should be OK ;)
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX - Prosliver FTW
"That's not right, the badgers have moved the goalposts."
User avatar
Posts: 4167
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
by Sydcul » Wed Jun 19, 2013 3:01 pm
jamesh wrote:
Sydcul wrote:

Did you compute?
Thanks for the link tho.



I think the point was that the phrase "I have decent electronics knowledge and I have excellent computer knowledge (I don't want to be arrogant)" doesn't match up with the phrase "Now please don't start in real complicated terms, as I don't know anything about GPIO and such"....

I would suggest it will be a lot cheaper in time and torn out hair to buy a device. There may be other devices that are cheaper than that linked to as well.

Maybe I did not say it in a good way. I'm good with the software part, could also just repair some broken hardware / build a PC, but I don't really know all technical data of these interfaces.
English is not my primary language, and I am only 11 years of age. So please excuse my English.
Computer enthausiast, knowledge level 99999. Also like electronics
User avatar
Posts: 6
Joined: Sat Mar 23, 2013 4:40 pm
by Sydcul » Wed Jun 19, 2013 3:12 pm
PiGraham wrote:I also like the idea of bitbanging a display output. It takes me back to the ZX80/80/Spectrum era!
( One of the original "Raspberry Pi" concept cheap home computers when I was 11! )

Pixel clock for 640x480 VGA is 25MHz. I think the SPI port will clock at 32MHz. Maybe some monitors would tolerate that.
You could possibly DMA intensity data on SPI and gate it with software controlled RGB channels running at 1/8th the speed. You could select the RGB colour 8 colours per 8 pixels - a bit like a Spectrum!

If you want something usable get a converter. See these posts. There are some for ~£5 on EBay.
(Not verified

I've also got some Z80's back here, haha. My dad still uses them in embedded systems! It's extremely hard to find a PC with RS232 port, tho :lol:

Back on topic, I have absolutely no idea what you are talking about at all, but I'll just look it up, no problem. I really really appreciate your help, as I had the idea people would immediately cut me off, saying it's impossible.
Now indeed, 25Mhz for 640x480 at 60Hz. When you take 640x480 at 72Hz, that would be 31.5Mhz. Would that be a better idea? I also have no idea if my monitor supports 72Hz, but I'll check it out.

Cheers, Lukas.
English is not my primary language, and I am only 11 years of age. So please excuse my English.
Computer enthausiast, knowledge level 99999. Also like electronics
User avatar
Posts: 6
Joined: Sat Mar 23, 2013 4:40 pm
by Sydcul » Wed Jun 19, 2013 3:33 pm
Ok, so I've looked around for a bit, checked out this: Converter. Would it work? Or is it too small.
Bigger one: link.
I'd prefer it to have audio, plus only ones who have power input already have audio.
Now I like the idea of adding power myself, but then I won't have audio, and there is a chance that there is an SMB board in there, in which case it would be impossible to modify.
English is not my primary language, and I am only 11 years of age. So please excuse my English.
Computer enthausiast, knowledge level 99999. Also like electronics
User avatar
Posts: 6
Joined: Sat Mar 23, 2013 4:40 pm
by RaTTuS » Wed Jun 19, 2013 4:20 pm
the 2nd one is the wrong way round so probably wont work
and you said you could do ebay originally

the 1st one is like the one I posted above
and should work YMMV - some people have problems because it draws power over the HDMI - you can mod it so it has an external power supply if your confidant enough
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX - Prosliver FTW
"That's not right, the badgers have moved the goalposts."
User avatar
Posts: 4167
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
by Sydcul » Wed Jun 19, 2013 6:12 pm
RaTTuS wrote:the 2nd one is the wrong way round so probably wont work
and you said you could do ebay originally

the 1st one is like the one I posted above
and should work YMMV - some people have problems because it draws power over the HDMI - you can mod it so it has an external power supply if your confidant enough

Oh, I am so stupid about the second one, that won't work I guess.

The first one actually does have an option to power it externally, that's through the micro-USB.

Ah I'll just buy it.
English is not my primary language, and I am only 11 years of age. So please excuse my English.
Computer enthausiast, knowledge level 99999. Also like electronics
User avatar
Posts: 6
Joined: Sat Mar 23, 2013 4:40 pm
by 6677 » Fri Jun 21, 2013 11:34 am
Sydcul wrote:I've also got some Z80's back here, haha. My dad still uses them in embedded systems! It's extremely hard to find a PC with RS232 port, tho :lol:

£7.50 in my local computer store for a PL2303HX revision D based USB > RS232 adaptor. Windows update can automatically retrieve the drivers for it on both windows 7 and 8. PL2303 drivers are already in raspbian I think. Download available for x86 linux and OSX. Slick 2 USB serial terminal on also supports PL2303 and FTDI devices on android devices via USB OTG adaptors, infact I tested this with my pi, nexus 7 and an older revision PL2303 TTL adaptor (sadly being an older version the windows 8 drive for it doesnt work so I cant use it with my desktop PC), worked a charm.

My computer motherboard was only released in 2011, yet has both a parallel port and an RS232 port natively. Some point I need to get a MAX232 or similar to shift my RS232 to TTL seeming as my USB TTL adaptor doesnt work with windows 8.
Posts: 372
Joined: Wed Mar 14, 2012 9:23 pm
by Hackertje » Sun Aug 25, 2013 12:56 pm
NL: Deze misschien?? D'r staat bij: "Wordt verzonden naar: wereldwijd"
EN: Maybe this one?? It says: "Ships to: worldwide"

http://www.ebay.nl/itm/HDMI-to-VGA-ADAP ... 1c32d7e32c
Posts: 1
Joined: Thu Feb 21, 2013 2:56 pm