Shop OBEX P1 Docs P2 Docs Learn Events
Is 18-bit VGA display possible — Parallax Forums

Is 18-bit VGA display possible

dr hydradr hydra Posts: 212
edited 2014-10-21 09:45 in Propeller 1
Just a proof of concept…has anyone tried to use three separate cogs to drive 18-bit color VGA. Since the propeller is basically setup to drive 6-bit VGA…is it possible to use three cogs…one for blue, one for red, and one for green to create an 18-bit color VGA display. I realize that due to the small memory size this display driver would not be very practical…but is it possible? The biggest problem I see is syncing the three cogs…could you sync the cogs and use one of the cogs to drive the hsync and vsync

Comments

  • kuronekokuroneko Posts: 3,623
    edited 2014-10-17 06:23
    dr hydra wrote: »
    I realize that due to the small memory size this display driver would not be very practical…but is it possible? The biggest problem I see is syncing the three cogs…could you sync the cogs and use one of the cogs to drive the hsync and vsync
    Certainly. No issues here except lack of memory.
  • localrogerlocalroger Posts: 3,451
    edited 2014-10-17 17:14
    Yeah all the techniques you need are used by Chip's hirez VGA objects in the OBEX; they do handoffs to swap the pins between cogs handling alternate lines rather than operating more pins, but the basic techniques you'd need are all there. The hardest part is syncing the Cog PLL's which aren't naturally shared like the master clock. The bigger problem is you'd probably need 3 bytes per pixel, and even assuming you're willing to dedicate most of Hub RAM to the bitmap that limits you to less than 100x100 very large square pixels.

    You could probably manage 12 bit color rez at 2 bytes per color, which still only gets you to 120x120. Then again 8-bit color (as done by a couple of platforms) only gets you 150x150. There are schemes for syncing up fetches from external RAM but then you're no longer really running the voltage dividers from the Propeller pin cog outputs.
  • RaymanRayman Posts: 14,653
    edited 2014-10-19 09:39
    I think syncing the cogs is a problem... I tried it with a 6-bit color VGA driver with three cogs, one for each 2-bit red, blue, green...
    It was almost OK, sometimes, but not 100% There is some magic required to sync cogs that I never figured out...
  • localrogerlocalroger Posts: 3,451
    edited 2014-10-20 08:30
  • Mark_TMark_T Posts: 1,981
    edited 2014-10-20 18:25
    dr hydra wrote: »
    Just a proof of concept…has anyone tried to use three separate cogs to drive 18-bit color VGA. Since the propeller is basically setup to drive 6-bit VGA…is it possible to use three cogs…one for blue, one for red, and one for green to create an 18-bit color VGA display. I realize that due to the small memory size this display driver would not be very practical…but is it possible? The biggest problem I see is syncing the three cogs…could you sync the cogs and use one of the cogs to drive the hsync and vsync

    One of the existing hi-res drivers has two cogs synchronized to drive the same pins alternating
    between rasterizing and outputting, so theie is already code to synchronize (forget which particular
    VGA library, there are many).

    If you want to actually drive a high res screen then one approach I've experimented with is using one cog to
    control SDRAM chips (the video generator drives the SDRAM control signals and a data latch used to hold
    the pixel to write, all the high bandwidth datapath is between SDRAM and display). Its not too hard to get
    40MHz pixel clock this way, 80 ought to be possible on a 4-layer board. 2 SDR SDRAMs give 16 bit colour
    upto 1024 pixels wide (and dozens of screen pages).
  • RaymanRayman Posts: 14,653
    edited 2014-10-21 05:56
    I have seen notes by Chip and others on how to sync cogs, but it didn't seem to work for me...

    I think the hi-res drivers do not actually have multiple cogs outputting at the same time... They take turns...
    The mouse cursor cog does output at the same time, I think. Don't notice any problems there.
    Maybe I was just doing something wrong, who knows.

    P2 was supposed to make this better as all cog outputs would update at exactly the same time.
    Not sure if this is still true though, since P2 plans have changed a lot...

    BTW: I was able to use the SSD1963 with Propeller to output VGA with 24-bit color.
    It's normally used with 4.3" and 5" displays, but was able to output VGA or HDMI at 640x480.
    Only issue there is that the Prop really isn't fast enough nor have enough ram to quickly update the screen.
    It takes ~ a second to paint a bitmap file from SD onto the screen, for example.
    Still, that is a reasonable approach if you need pretty graphics and it doesn't have to be fast.
  • tonyp12tonyp12 Posts: 1,951
    edited 2014-10-21 09:45
    If you ever plan to drive a 4"-7" TFT panel directly, this new chip S1D13L01 seems interesting
    it allows for two simultaneous image maps to be faded in and out etc
    With 384K it have 12x the memory than Prop1.
    http://www.mouser.com/ProductDetail/Epson-ICs/S1D13L01F00A100/?qs=sGAEpiMZZMsE420DPIasPtBmXZbCrpanWb9Rds0HdE8VTQo2CHM61w%3d%3d

    https://www.youtube.com/watch?v=EWO-TbPLw60

    It even support 3 wire spi, but I probably would go with 8-bit indirect as to get some speed but not waste to many prop pins.
Sign In or Register to comment.