michasanyi
Posts: 4
Joined: Fri Jul 29, 2016 3:16 pm

Re: Gert's VGA add-on for the B+

Sun Aug 28, 2016 8:32 pm

Hi mahjongg,

thanks for your quick answer.
I knew that documentation and I've already studied it.

However there is no answers to my questions regarding:
1. possible dpi_group/dpi_mode values in device tree definitions,
2. setting and outputting a doubled pixel clock
3. moving HSYN and VSYN from GPIO2-GPIO3 to other GPIO pins
4. how to redirect the red, green and blue pixel values (which when using VGA666 appear parallelly on GPIO4-GPIO21) to a set of six other GPIO pins on which they would be output following each other.

With best regards,
Sanyi

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4244
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Gert's VGA add-on for the B+

Sun Aug 28, 2016 8:59 pm

More complete docs at https://www.raspberrypi.org/documentati ... /README.md
1 - AIUI they are just modified versions of hdmi_group/hdmi_mode that are used if you use a dpi_screen. See http://elinux.org/RPiconfig for a list of values for hdmi_group/mode. Most likely you'll be wanting group 2, mode 87 to then allow a custom setup via hdmi_timings.
2 - read https://www.raspberrypi.org/documentati ... /README.md, though I'm not sure I understand what you're after.
3 - not possible. I'm guessing you're after I2C on GPIO 2/3. If you're on a Pi 0/1/2 then you may be able to switch to use i2c-0 and GPIOs 0&1, but then you can't use the camera. Do NOT try that on a Pi3 as it will fail.
4 - as 3, not possible.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

michasanyi
Posts: 4
Joined: Fri Jul 29, 2016 3:16 pm

Re: Gert's VGA add-on for the B+

Sun Aug 28, 2016 9:25 pm

Dear 6by9,

thanks. That means that Red Bears' IoT pHAT (and a lot of other HAT's) unfortunately cannot be used with VGA.

With best regards,
Sanyi

PaddleStroke
Posts: 5
Joined: Mon Jan 25, 2016 9:53 am

Re: Gert's VGA add-on for the B+

Sat Sep 17, 2016 10:57 pm

Dear all,

Thank you very much for all this usefull topic!

I am interested to use this DPI interface to drive a 54 pins 3.5inch lcd and I just have one question :
Using DPI interfaced lcd, can we swap from DPI to HDMI when we plug in a HDMI screen? Same as when we use composite screen, it switch to HDMI when we plug in HDMI screen.

Is it possible with DPI? How would it be achieved?

Thanks

JTCook
Posts: 16
Joined: Tue Nov 12, 2013 1:53 am

Re: Gert's VGA add-on for the B+

Tue Oct 11, 2016 5:14 am

This question is along the lines of what some others are trying to do, but I wonder if it is possible to 240p (instead of 480i) with the composite video port with the Raspi instead of using VGA addon to another adapter? I know you can set HDMI to 240p, and with these settings using composite video out it will "squish" the screen, but it still outputs 480i.

mortaca
Posts: 7
Joined: Fri Oct 14, 2016 11:11 am

Re: Gert's VGA add-on for the B+

Mon Oct 17, 2016 1:45 am

Hi, I hope you can help me with this modification.
I want to use UART and at the same time DPI, I decompiled dpi24.dtbo and have disabled GPIO 14-15 and enable 10-11
Now, how do I can make a custom mode for dpi_output_format?
For example a change in the mode 6, something like this;

Mode 6 original - - 7 6 5 4 3 2 - - 7 6 5 4 3 2 - - 7 6 5 4 3 2
Mode 6 custom - - 7 6 5 4 3 2 - - 7 6 - - 5 4 3 2 7 6 5 4 3 2

Thanks.

aBUGSworstnightmare
Posts: 521
Joined: Tue Jun 30, 2015 1:35 pm

Re: Gert's VGA add-on for the B+

Mon Oct 17, 2016 4:54 am

mortaca wrote:Hi, I hope you can help me with this modification.
I want to use UART and at the same time DPI, I decompiled dpi24.dtbo and have disabled GPIO 14-15 and enable 10-11
Now, how do I can make a custom mode for dpi_output_format?
For example a change in the mode 6, something like this;

Mode 6 original - - 7 6 5 4 3 2 - - 7 6 5 4 3 2 - - 7 6 5 4 3 2
Mode 6 custom - - 7 6 5 4 3 2 - - 7 6 - - 5 4 3 2 7 6 5 4 3 2

Thanks.
Sorry dude, but this is not possible! You can't use DPI and GPIO in parallel because DPI is an alternate function of the GPIOs.
This picture
Image
from the DPI documentation https://www.raspberrypi.org/documentati ... /README.md shows you the available modes. Other modes are not possible!

mortaca
Posts: 7
Joined: Fri Oct 14, 2016 11:11 am

Re: Gert's VGA add-on for the B+

Mon Oct 17, 2016 8:59 am

That table know her well, my example is based on it, but in Mode 5 pins 10 and 11 is output green, is not possible to use the GPIO from 4 to 13 in Mode 5 and from 16 to 25 in mode 6?

Example Custom mode NOT WORKING:
Image

Another combination is use mode 7 changing rgb_order and lose two bits of the blue, but I would not like to lose a couple of bits of colour.

aBUGSworstnightmare
Posts: 521
Joined: Tue Jun 30, 2015 1:35 pm

Re: Gert's VGA add-on for the B+

Mon Oct 17, 2016 9:12 am

mortaca wrote:That table know her well, my example is based on it, but in Mode 5 pins 10 and 11 is output green, is not possible to use the GPIO from 4 to 13 in Mode 5 and from 16 to 25 in mode 6?

Example Custom mode NOT WORKING:
Image

Another combination is use mode 7 changing rgb_order and lose two bits of the blue, but I would not like to lose a couple of bits of colour.
this is not possible since there is no such thing as 'custom DPI mode'. Which color is related to what GPIO is given by SOC hardware (GPU)

mortaca
Posts: 7
Joined: Fri Oct 14, 2016 11:11 am

Re: Gert's VGA add-on for the B+

Tue Oct 18, 2016 12:36 am

Ok, the solution to use UART and DPI is to make a modified dpi24.dtbo and change rgb_order to put red instead of green because the human eye is more sensitive to green scale, the problem is I do not understand the dpi_output_format.
How is the magic number calculated?
output_format = (dpi_output_format >> 0) & 0xf;
rgb_order = (dpi_output_format >> 4) & 0xf;

output_enable_mode = (dpi_output_format >> 8) & 0x1;
invert_pixel_clock = (dpi_output_format >> 9) & 0x1;

hsync_disable = (dpi_output_format >> 12) & 0x1;
vsync_disable = (dpi_output_format >> 13) & 0x1;
output_enable_disable = (dpi_output_format >> 14) & 0x1;

hsync_polarity = (dpi_output_format >> 16) & 0x1;
vsync_polarity = (dpi_output_format >> 17) & 0x1;
output_enable_polarity = (dpi_output_format >> 18) & 0x1;

hsync_phase = (dpi_output_format >> 20) & 0x1;
vsync_phase = (dpi_output_format >> 21) & 0x1;
output_enable_phase = (dpi_output_format >> 22) & 0x1;
I think many people see this and not understand anything.

starquake
Posts: 5
Joined: Wed Apr 16, 2014 8:34 pm

Re: Gert's VGA add-on for the B+

Tue Nov 22, 2016 8:24 am

sigmaris wrote:I was able to use the VGA-666 board to display on a Phillips CM8833-II monitor, which was formerly used with an Amiga 500. T
Dear sigmaris,

What port on the CM8833-II did you use? Did you use the SCART connector? I have a CM8833 mk1 which only has the SCART connector.

Cheers!

mariusrdv
Posts: 7
Joined: Sun Dec 27, 2015 10:54 am

Re: Gert's VGA add-on for the B+

Tue Feb 07, 2017 8:51 am

Hello guys,

So, I have a sharp LQ038Q5DR01 lcd, and tried to use dpi connection. All looks good except grey scale colors. Tried a lot of configurations but result is the same. Problem is as here http://blog.reasonablycorrect.com/raw-dpi-raspberry-pi/
but I do not use any breadboard, raspberry pi 2 and lcd connected with 20cm(I think) wires.
Here is my images https://goo.gl/photos/KZwVV4gBNXahSyiD7
Reference image is http://reasonablycorrect.com/wp-content ... orbars.gif
Could it be that wires are too long ? I dont have shorter to try. What other problems could be ?
Btw, lcd itself is 18bit color, but custom exposed 40pin connector(came with lcd) uses 16bit(rgb 565)

Here is my config.txt

gpu_mem_1024=256
hdmi_ignore_cec_init=1
disable_overscan=1
start_x=1
#dtoverlay=lirc-rpi
disable_splash=0
gpu_mem_256=112
#sdtv_aspect=0
#dtparam=gpio_in_pin=18
gpu_mem_512=144
#dtparam=gpio_out_pin=17
#dtoverlay=spi-bcm2835-overlay

###
# For use with the adafruit 5' tft only.
##

dtparam=spi=off
dtparam=i2c_arm=off
dtoverlay=dpi24

#overscan_left=0
#overscan_right=0
#overscan_top=0
#overscan_bottom=0

framebuffer_width=320
framebuffer_height=240
#test_mode=1

enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87
dpi_output_format=19

hdmi_timings=320 0 0 0 72 240 0 0 0 5 0 0 0 0 0 3840000 1

aBUGSworstnightmare
Posts: 521
Joined: Tue Jun 30, 2015 1:35 pm

Re: Gert's VGA add-on for the B+

Tue Feb 07, 2017 4:25 pm

mariusrdv wrote:Hello guys,

So, I have a sharp LQ038Q5DR01 lcd, and tried to use dpi connection. All looks good except grey scale colors. Tried a lot of configurations but result is the same. Problem is as here http://blog.reasonablycorrect.com/raw-dpi-raspberry-pi/
but I do not use any breadboard, raspberry pi 2 and lcd connected with 20cm(I think) wires.
Here is my images https://goo.gl/photos/KZwVV4gBNXahSyiD7
Reference image is http://reasonablycorrect.com/wp-content ... orbars.gif
Could it be that wires are too long ? I dont have shorter to try. What other problems could be ?
Btw, lcd itself is 18bit color, but custom exposed 40pin connector(came with lcd) uses 16bit(rgb 565)

Here is my config.txt

gpu_mem_1024=256
hdmi_ignore_cec_init=1
disable_overscan=1
start_x=1
#dtoverlay=lirc-rpi
disable_splash=0
gpu_mem_256=112
#sdtv_aspect=0
#dtparam=gpio_in_pin=18
gpu_mem_512=144
#dtparam=gpio_out_pin=17
#dtoverlay=spi-bcm2835-overlay

###
# For use with the adafruit 5' tft only.
##

dtparam=spi=off
dtparam=i2c_arm=off
dtoverlay=dpi24

#overscan_left=0
#overscan_right=0
#overscan_top=0
#overscan_bottom=0

framebuffer_width=320
framebuffer_height=240
#test_mode=1

enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87
dpi_output_format=19

hdmi_timings=320 0 0 0 72 240 0 0 0 5 0 0 0 0 0 3840000 1

your timings (dpi_output_format and hdmi_timings) are wrong. Check the data sheet and use the excel-spreadsheet (from the Page linked) to have it calculated.

mariusrdv
Posts: 7
Joined: Sun Dec 27, 2015 10:54 am

Re: Gert's VGA add-on for the B+

Tue Feb 07, 2017 5:08 pm

Actually with lcd documentation is a problem, because I do not understand values in data sheet or those are just in different naming(page 7). For instance what are actually values for <h_front_porch> <h_sync_pulse> <h_back_porch> and <v_front_porch> <v_sync_pulse> <v_back_porch> ?
datasheet https://media.digikey.com/pdf/Data%20Sh ... 20Spec.pdf

And yes I used exel to calculate dpi_output_format=19, is because, my lcd react to only two values: output_format=3 and rgb_order=1, others values I can change to random ones, lcd doesn't effect in any way. Btw I do not use Enable signal, if that matters(tried with ENBL but looks the same)

Thank you

aBUGSworstnightmare
Posts: 521
Joined: Tue Jun 30, 2015 1:35 pm

Re: Gert's VGA add-on for the B+

Thu Feb 09, 2017 7:00 am

Here's a picture from the web showing the timing systematics
Image

Refer to 'Fig.3-A Input signal waveform' for the timing details (signal waveform) and Chapter 7 for the related values.

Some background:
a) Active data: The portion that has the valid display content horizontal and vertical (HA and VA)
b) Sync pulse width: (HS and VS)
c) Front Porch: Duration between end of valid display and the beginning of Sync (HF and VF)
Note: This is often interpreted in the wrong way! Front porch is located AFTER the active display
d) Back Porch: Duration between end of Sync and beginning of valid display (HB and VB)
Note: Back porch is located BEFORE active display
e) total period: equals a) + b) + c) + d) (HT and VT)

Some general rules to observe:
HT > HA + HS + HB
VT > VA + VS + VB
These data should be in the display data sheet. HB and VB might be missing.
If that's the case use these rules of thumb:
HS=HB and VS=VB
HS= 1/4 x (HT‐HA) and VS = 1/4 x (VT‐VA)

So, in case of your display the v_sync_pulse = 1 (TVp)
--> vertical back porch = v_back_porch= 5.
It's vertical display start position (TVs) - vertical Sync Pulse width (TVp) --> 6-1 = 5
Vertical front porch can be calculated now.

sigmaris
Posts: 4
Joined: Sun May 29, 2016 6:21 pm

Re: Gert's VGA add-on for the B+

Wed Jun 07, 2017 9:44 am

starquake wrote: What port on the CM8833-II did you use? Did you use the SCART connector? I have a CM8833 mk1 which only has the SCART connector.
I used the DE-9 Analog RGB connector, and connected the R, G, B, HSync, VSync and Ground pins to the corresponding VGA pins. Using SCART won't be quite the same as it only has a Composite Sync pin - you might get it to work with a circuit to combine the H and V sync into Composite.

Return to “B+ addons”

Who is online

Users browsing this forum: No registered users and 4 guests