Shop OBEX P1 Docs P2 Docs Learn Events
Conversion from VGA_OUT to RGB_OUT — Parallax Forums

Conversion from VGA_OUT to RGB_OUT

Marc71Marc71 Posts: 14
edited 2011-01-27 10:09 in Propeller 1
Hello!
I have a question, you can convert the VGA output to RGB TV out, changing the driver vga_text vga_hires or to adapt the timing to 50/60, which change needs to be done on the output of the propeller.

Tanks!

Marc71

Comments

  • ericballericball Posts: 774
    edited 2011-01-26 05:30
    I suspect modifying TV.spin would be the way to go - keep the timing parameters but change the outputs. I'll see if I have some time today to play with it.
  • Marc71Marc71 Posts: 14
    edited 2011-01-26 09:58
    Thank ericball for help!

    Marc71
  • ericballericball Posts: 774
    edited 2011-01-26 11:03
    Actually, looking at VGA.spin, I'm wondering whether it might be possible to use it with minimal or no modification. Most of it comes down to sync, which depends on what kind of device / interface you are driving, and working out the timing. (i.e. although TV.spin uses 16x the colorburst clock for the pixel clock, there's no reason to use it for RGB)

    I've also done a little research on SCART (which is what I thought of when you said RGB out) and there's some additional configuration pins. SCART also uses a composite sync, so either you'd have to tie the two sync pins together or modify VGA.spin to only drive one.
  • Marc71Marc71 Posts: 14
    edited 2011-01-27 07:06
    Yes, I was talking about RGB Scart for connection to a TV NTSC / PAL.
    I suppose you should add logic gates for combining the composite sync pin, and change the timings in VGA.SPIN But how?

    Marc71
  • ericballericball Posts: 774
    edited 2011-01-27 10:09
    Okay, let's try to work out the parameters for a non-interlaced PAL signal (312 lines at ~50Hz).

    PAL has a line period of 64uS. Square pixel PAL (interlaced) has a 14.75 MHz pixel clock. We're doing non-interlaced so we will use half of that or 7.375MHz. That means there are 472 pixels (ticks) per line, of which we will use 384 for the active display. Sync (active low) is 4.7us or 35 pixels. 472 - 384 - 35 = 53 pixels for the front porch (11) & back porch (42).

    Keeping with the square pixel format, we will make the active display 288 lines. Sync is 3 lines and then the front porch is 2 lines and the back porch 19 lines, for a total of 312 lines. Okay, that should cover the vga.spin parameter block.

    vga_status :=0/1/2 = off/visible/invisible (output)
    vga_enable :=0/non-0 = off/on
    vga_pins :=%pppttt = pins, see vga.spin
    vga_mode :=%0000 (16x16 tiles) or %1000 (16x32 tiles, i.e. text)
    vga_screen :=pointer to screen (words), see vga.spin
    vga_colors :=pointer to colors (longs), four %RrGgBb00 format
    vga_ht :=24
    vga_vt :=18 (16x16 tiles) or 9 (16x32 tiles)
    vga_hx :=1
    vga_vx :=1
    vga_ho :=0
    vga_vo :=0
    vga_hd :=384
    vga_hf :=11
    vga_hs :=35
    vga_hb :=42
    vga_vd :=288
    vga_vf :=2
    vga_vs :=3
    vga_vb :=19
    vga_rate :=7375000

    However, that doesn't take care of the vertical sync. I need to look at the code, but I suspect the code will need a minor rewrite to output the desired waveform.
Sign In or Register to comment.