Using VGA With My Raspberry Pi 3


This video was made on Serval, a PC with an AMD Athlon II cpu, and 16 GBytes of RAM.
My Raspberry Pi 3 didn't need a VGA adapter until I got Serval running
...but, as you can see, Serval is now running Linux Mint (instead of Windows 7).


I recently got Serval running again. If you've been reading my blogs, then you already know that Serval is a PC. Serval used to run Windows 7, but it stopped running (Serval, not Windows 7). The monitor that was attached to Serval, seemed to give up the ghost, too. So I hooked up my Raspberry Pi 3 to a 24" Samsung TV, and I've been using that as my main system. I bought a KVM box from FJGEAR, on Amazon, and hooked up my Raspberry Pi 1 Model B to the same Keyboard, Video monitor, and Mouse (hence the name KVM). If I needed heavy duty computing power, then I used my MS Surface Pro II.

The montor that gave "...up the ghost", did so with its dvi port. The same monitor also has a VGA and an HDMI port. I tried hookng my RPi 1 Model B into the HDMI port, and I got a picture. Feeling empowered by this success, I tried getting Serval runnng. I hooked up Serval to the VGA port (Serval ony has a VGA and dvi port), and tried booting from a CD with Linux Mint Tara (Cinammon) on it; another success. I did a full install of Linux Mint, formatting the HD to ext4 (I'd already copied the HD to an external USB drive).

So I wound up with Serval (AMD Athlon, 16 GBytes of DDR3) and RPi3ModelB (self descriptive name) hooked up to an HDMI KVM switch (Serval is using a VGA to HDMI converter) that's hooked up to a Samsung 24" TV and a bluetooth mouse. My old Raspberry Pi 1, was hookd up to my 23" Asus monitor. Sounds good, but what about my MS Surface Pro II?

I new I would get more use out of my Surface Pro if I hooked it up to a 23" monitor or 24" TV, so I ordered a Mini Display Port to HDMI VGA adapter on Amazon for $13.99; the Surface Pro uses a mini HDMI connector. I removed my RPi 3 from the KVM switch, and replaced it with my Surface Pro. The HDMI port on my Asus monitor was already being used by my RPi 1, so I needed my RPi 3 to use the VGA port. I could've used an HDMI to VGA converter, like I used on Serval, but I saw a VGA666 board (while I was looking for stuff on Amazon) that plugged into the 40 pin GPIO connector on a Raspberry Pi. The output end of the VGA666 is a female VGA connecor. Now I could connect my RPi 3 to the VGA port on my Asus monitor.

There's no BIOS on a Raspberry Pi. A Rpi gets its boot info from a file /boot/config.txt, so this is where you tell your RPi how to use the VGA666 board:

# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
overscan_right=80
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan. DMK 06/01/2019 1280x720 was what was already in this file
framebuffer_width=800
framebuffer_height=600

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
# 06/01/2019 DMK - got info from https://raspberrypi.stackexchange.com/tags/config.txt/info
hdmi_group=2 # DMT mode
#06/06/019, DMK - changed mode to 640x480, from 800x600
#06/07/019, DMK - changed mode back to 800x600
hdmi_mode=9 # 800x600 @ 60 Hz

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

core_freq=577 # GPU Frequency

arm_freq=1300 # CPU Frequency - DMK, messed around with this until I found
# 1300 MHz was the fastest but still stable setting I could get to

over_voltage=5 # DMK - I think this works out to 1.6 volts sent to the cpu
# it normaly is set to 4 (1.3 volts) but overclocking requires
# higher voltage too avoid processing instability

disable_splash=1 # Disables the lightning bolt icon, which will now show up
# due to the increase in voltage in the above parameter

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# VGA666 adapter settings
# 05/31/2019 DMK - copied this code from https://www.retrorgb.com/rpi240p.html
# NOTE: even though it says 240p at the end of the above comment, I'm using 800x600
dtparam=audio=on
gpu_mem_256=128
gpu_mem_512=256
gpu_mem_1024=256
overscan_scale=1
dtoverlay=vga666
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
#dpi_mode=8
#dpi_output_format=6
dpi_mode=87
audio_pwm_mode = 2
#06/06/2019, DMK - changed the code for hdmi_timings
#hdmi_timings= 640 0 16 64 120 480 0 1 3 16 0 0 0 75 0 31500000 1
# The different fields in hdmi_settings are described on https://www.raspberrypi.org/documentation/configuration/configuration/config-txt/video.md
#06/07/2019, DMK
hdmi_timings= 800 0 16 16 100 600 0 4 2 2 0 0 0 60 0 32000000 1
# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on
gpu_mem=64





Everything works, and I'm creating this webpage with the Bluefish editor, on my RPi hooked up to my VGA port. However, some things didn't go as planned. If you take a look at my notes in config.txt (the code just above this paragraph) you'll see that I set up the monitor to be 800x600 pixels, but when I booted up, the monitor was 320x240. I tried setting the framebuffer_width to 800, and framebuffer_height to 600, but when I booted back up the screen was unreadable. I settled on 640x480; the screen isn't nearly as crisp as it was at 320x240, but I now have a usable amount of screen realestate. My VGA adapter has a 40 pin connector, so I no longer have a pin to power my cooling fan. I tried hooking up my fan's connector to some pins on my RPi 1, but it didn't work. I saw a VGA666 board on the Internet that didn't block all of the GPIO pins, but I'm going to check out some other options before purchasing that. Otherwise, I'm perfectly happy with the way this latest modification to my RPi 3 turned out.

Note: I just noticed that hdmi_timings had 320x240 hardcoded into it. I looked up on the Internet a string for hdmi_timings that was coded for 800x600; that's the highest resolution for my VGA666 board. I found strings for 1920x1200 and 640x480; so I'm still stuck at 640x480, but at least the screen looks a lot crisper now. I need to look up how to code hdmi_timings so I can write my own 800x600 hdmi_timings.

NOTE: I finally got a great looking screen at 800x600 pixels. Take a look at the changes I made in the config.txt file.

Return To My Blog Page       Return To My Programming Page