Shop OBEX P1 Docs P2 Docs Learn Events
VGA Driver/object Does Not Work on my Sony LCD — Parallax Forums

VGA Driver/object Does Not Work on my Sony LCD

GoogGoog Posts: 65
edited 2006-06-15 01:17 in Propeller 1
Hi all,

I'm just loving the Propeller Demo board (rev c)! So far, I've been able to get all examples to work just fine and I've been modifying them and having a blast!

The VGA examples work on my Sony CRT monitor just fine.· But when I try them on my Sony SDM-M51 LCD monitor, it just sits there, black... well, maybe.· The problem is that it is in power save mode and nothing seems to trigger it to come alive.· I've found a setting that turns off power save mode and it still displays nothing (so I'm not actually sure it is·'power save' related).

Has anyone seen this? Is there some sort of signal that needs to awaken my monitor? My cable is good - or else it wouldn't work on my regular computer (right?).

Thanks!
Goog
·

Comments

  • rtowlerrtowler Posts: 29
    edited 2006-06-13 21:33
    I would guess that your refresh rate is incorrect. Most all monitors, CRT and LCD, will "sleep" when they are given a signal they can't handle. LCD monitors tend to have limited refresh rates (60Hz is standard, some support one or two higher rates). Most all PC monitors support a wide range of refresh rates which is probably why it works on your CRT but not LCD.

    I don't have a propeller and I have no idea how to fix this but look into the refresh rate.

    -Rick
  • GoogGoog Posts: 65
    edited 2006-06-13 23:04
    Sounds reasonable... I noticed the following in the vga_hires_text.spin file:

    ' 1024 x 768 @ 57Hz settings: 128 x 64 characters

    · hp = 1024···· 'horizontal pixels
    · vp = 768····· 'vertical pixels
    · hf = 16······ 'horizontal front porch pixels
    · hs = 96······ 'horizontal sync pixels
    · hb = 176····· 'horizontal back porch pixels
    · vf = 1······· 'vertical front porch lines
    · vs = 3······· 'vertical sync lines
    · vb = 28······ 'vertical back porch lines
    · hn = 1······· 'horizontal normal sync state (0|1)
    · vn = 1······· 'vertical normal sync state (0|1)
    · pr = 60······ 'pixel rate in MHz at 80MHz system clock (5MHz granularity)

    This is all over my head, but it would appear that it is trying to set the freq. to ~60MHz.· Is there something I should tinker with to see if I can get it to work? (I also tried the other settings that were commented out, to no avail.)

    Thanks for the reply!

    Goog
  • rtowlerrtowler Posts: 29
    edited 2006-06-13 23:40
    Your best bet is probably someone else in this forum but I can say these settings look very much like an xFree86 modeline. I did a search and found this which appears to be a modeline for your sony monitor:

    Section "Monitor"
    Identifier "SDM-M51"
    VendorName "Unknown"
    ModelName "Unknown"
    HorizSync 28 - 61
    VertRefresh 48 - 65
    # 1024x768 @ 60 Hz, 48.4 kHz hsync
    Modeline "1024x768" 65 1024 1064 1208 1344 768 771 777 806 -hsync -vsync

    I didn't dig up the xFree86 docs, but from what I remember and a guess or two it would equate to:

    hp = 1024 'horizontal pixels
    vp = 768 'vertical pixels
    hf = 40 'horizontal front porch pixels
    hs = 144 'horizontal sync pixels
    hb = 136 'horizontal back porch pixels
    vf = 3 'vertical front porch lines
    vs = 6 'vertical sync lines
    vb = 29 'vertical back porch lines
    hn = 1 'horizontal normal sync state (0|1)
    vn = 1 'vertical normal sync state (0|1)
    pr = 65 'pixel rate in MHz at 80MHz system clock (5MHz granularity)


    I *think* the difference is that the XFree modeline values are cumulative and the propeller config params aren't. Also, I don't know if -h/v sync is "normal" i.e. 1 or 0 so you may want to try changing the hn and vn parms.

    If you get something on the screen but the screen image is shifted (right/left or up/down) or too wide or tall you will need to fine tune the front/back porch and sync pixel values. There is a logic to it, but I always use the GUI tool that ships with X to do this so I can't tell you it off the top of my head.

    -Rick
  • GoogGoog Posts: 65
    edited 2006-06-14 05:24
    Well, I don't understand any of this stuff, but I tried what was suggested (thanks, Rick).· Still nothing coming on the·monitor - I fiddled with the values, but nothing seems to get it to turn on.· I noticed the LEDs on the board were flickering - perhaps at 60Hz - so there is something going on.

    If I get anything else to happen, I'll post it.

    Thanks again,

    Goog
  • cgraceycgracey Posts: 14,133
    edited 2006-06-14 05:28
    Because the 1024x768 VGA driver (at least the hires text one) refreshes at 57 Hz, not 60 Hz, maybe the Sony monitor thinks it's too slow of a signal. The Propeller can be run off a 6 MHz crystal very reliably. This results in 96 MHz operation, or 20% faster than 80 MHz. This will result in a 68 Hz refresh rate which might make the monitor happier. The original timing for that object was from a 75 Hz refresh rate because it used fewer pixel clocks to generate a screen, hence 57 Hz instead of something slightly slower.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
  • GoogGoog Posts: 65
    edited 2006-06-14 05:36
    So, basically just replace the 5MHz crystal with a 6MHz one on my board? No other changes? (Sorry, I'm not an electronics guru --YET!).

    Goog
  • cgraceycgracey Posts: 14,133
    edited 2006-06-14 05:39
    That's all you've got to do.

    To be more thorough, you should update the _XINFREQ to 6_000_000 to let the compiler know what frequency you are really running rat. The VGA will speed up, regardless.
    Goog said...

    So, basically just replace the 5MHz crystal with a 6MHz one on my board? No other changes? (Sorry, I'm not an electronics guru --YET!).

    Goog



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
  • JavalinJavalin Posts: 892
    edited 2006-06-14 18:58
    Chip,

    Would this crystal be suitable - its 6mhz but 30pf/ load.· I see the 5mhz ones from digikey are 20pf.

    http://uk.farnell.com/jsp/endecaSearch/partDetail.jsp?SKU=9509577&N=401
    thanks,

    James
  • cgraceycgracey Posts: 14,133
    edited 2006-06-15 01:17
    I'm sure this would be fine.
    Javalin said...
    Chip,

    Would this crystal be suitable - its 6mhz but 30pf/ load.· I see the 5mhz ones from digikey are 20pf.

    http://uk.farnell.com/jsp/endecaSearch/partDetail.jsp?SKU=9509577&N=401

    thanks,

    James
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
Sign In or Register to comment.