Shop OBEX P1 Docs P2 Docs Learn Events
display advice — Parallax Forums

display advice

Graham StablerGraham Stabler Posts: 2,507
edited 2007-10-15 22:03 in Propeller 1
I have a Hanse 4" PAL LCD module which according to their website has a 960X234 resolution, it works but the quality is pretty poor, vertical lines tend to have distinct amount of jiggling so they almost look like square waves.

I'd appreciate some ideas to improve the display.

Graham

Comments

  • RaymanRayman Posts: 14,162
    edited 2007-10-11 12:13
    Are you already using the "non-interlaced" mode? That would be the first thing to do, I think...
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-10-11 12:22
    Yes I am non-interlaced
  • potatoheadpotatohead Posts: 10,260
    edited 2007-10-11 15:04
    960 pixels?

    Stable jiggling, or moving jiggling?

    NTSC, VGA, other?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-10-11 15:43
    PAL as stated, fairly stable jiggle.

    The datasheet says resolution = 960X234 (dot)

    I assume that means pixels.

    Graham
  • BaggersBaggers Posts: 3,019
    edited 2007-10-11 15:49
    960x234 usually means 320*3(rgb)x234
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-10-11 15:52
    Ah ha of course.

    But it still looks bad [noparse]:)[/noparse]
  • potatoheadpotatohead Posts: 10,260
    edited 2007-10-11 16:11
    A-ha, that 960 number threw me off too.

    What display code are you running? I'm thinking maybe the vertical scale parameter is off somehow. (Parallax driver) I've seen that before on NTSC TV.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-10-11 16:17
    I've tried tv_text and graphics all running through tv.spin

    Looking more closely it seems as if every other row alternates position by one pixel left to right, hence the wiggle.

    Graham
  • potatoheadpotatohead Posts: 10,260
    edited 2007-10-11 17:09
    Ok, try an odd number of scanlines.

    This is the color interlace happening. Essentially, each scanline has only 160 pixels of resolution. If the color phase is offset, then one can get 320. The way that driver works really depends on the number of scanlines. If it's even, that color phase ends up being static.

    There is also another parameter that impacts this. If the number of scanlines does not work, I'll dig it up. Chip gave it to me, when I was trying to learn about color. I ended up with a display a lot like yours at one point.

    Actually, that's an NTSC thing. If you are running a PAL display, this should not come up. Maybe some conflicting settings are in play here?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!

    Post Edited (potatohead) : 10/11/2007 5:15:07 PM GMT
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-10-11 21:12
    What are scanlines and how do I adjust them?

    I've stared as tv.spin etc until I'm blue in the face already and could see nothing obvious to change.

    Graham
  • deSilvadeSilva Posts: 2,967
    edited 2007-10-11 21:19
    Graham, try deSilva's MPE_TEXT driver; it will display some B/W images so you can have something to compare against...
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-10-11 21:23
    Actually I would be happy with B/W, I quite fancy black text on white like my scope [noparse]:)[/noparse]

    I did try your driver this morning and I get a white line along the bottom of the screen and the text still shows a rough edge, I didn't have enough time to try it and understand exactly how it works other than to get your demo going on the demoboard.

    Graham
  • deSilvadeSilva Posts: 2,967
    edited 2007-10-11 21:33
    ?
    There should be no white line along the bottom ...
    The driver contains a testprogram, using some settings you of course have to adapt to your board. As I am using mostly non standard configurations I no longer care what a demo board or whatever board is smile.gif

    It alternately displays in "generic mode" 320 x 240 and interleaced mode, the second literally does not exist on your display and I wondered what it would make of it.

    The first (larger) display used each single pixel - there simply are no more on your display smile.gif
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-10-11 22:31
    Yes I ran the test program and it displays the text alternating between modes but there is a white line whether there should be or not.

    Graham
  • deSilvadeSilva Posts: 2,967
    edited 2007-10-12 07:54
    After some deep thinking I have to confess that I do not know what "a white line" is at all...
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-10-12 11:46
    A horizontal line that is white, clearly it is not supposed to be there, could it be because the screen has 234 vertical lines rather than 240?

    Graham
  • potatoheadpotatohead Posts: 10,260
    edited 2007-10-13 01:39
    I know this sounds silly, but have you counted them?

    (I'll be where I can dig up the distracting code I was working with tonight.)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
  • potatoheadpotatohead Posts: 10,260
    edited 2007-10-13 23:32
    Number of scanlines aside, here is the parameter I was looking for:

    ' NTSC/PAL metrics tables
    ' ntsc pal
    '
    wtab word lntsc - sntsc, lpal - spal 'hvis
    word lntsc / 2 - sntsc, lpal / 2 - spal 'hrest
    word lntsc / 2, lpal / 2 'hhalf
    word 243, 286 'vvis
    word 10+1, 18 'vinv
    word 6, 5 'vrep
    word $02_8A, $02_AA 'burst

    When Chip and I were talking about color interlace, he brought this one up.

    Add one to vinv to maybe address your problem. Also vvis is the number of visible vertical lines...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-10-14 13:38
    Fiddling with those values didn't help.

    I've attached a pic to show more clearly the problem. Horizontal lines are as sharp as can be but there are problems with registration between lines almost.

    Graham
    800 x 600 - 73K
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-10-14 14:11
    I'm wondering if I was expecting too much from the display, going to big fonts and thick lines makes the display more acceptable even if it does look a bit childish.
  • deSilvadeSilva Posts: 2,967
    edited 2007-10-14 14:52
    Graham,
    my only explanation is , that you try to run this monitor in interlaced mode (TEXT.SPIN does this by default, that was the main reason why i changed it to MPE_TEXT).

    Inlerlaced video on a 234 line monitor will look like something between really bad and horrible...
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-10-14 14:59
    I have mode as 0001, pal non-interlaced. I don't know if other changes need to be made.

    Graham
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2007-10-14 16:02
    Notice that the line above the offset one, the horizontal lines are faint. (Look at the top of the a in Main, and the serif of i)
  • deSilvadeSilva Posts: 2,967
    edited 2007-10-14 16:38
    Graham, this seems to lead to nothing... Can you please post alle parameter setting for TV? I mean this section
    tvparams                long    0               'status
                            long    1               'enable
                            long    %011_0000       'pins
                            long    %0000           'mode
                            long    0               'screen
                            long    0               'colors
                            long    x_tiles         'hc
                            long    y_tiles         'vc
                            long    10              'hx
                            long    1               'vx
                            long    0               'ho
                            long    0               'vo
                            long    60_000_000               'broadcast
                            long    0               'auralcog
    


    and the values for x_tile and y_tiles as well. I assume you have nothing changed inside the TV.SPIN?!
  • potatoheadpotatohead Posts: 10,260
    edited 2007-10-14 17:50
    Thanks for the picture. It's not quite what I had pictured mentally.

    Are those variations static, or dynamic?

    Edit: I suppose "squiggly" means dynamic.

    Have you another PAL source to compare?

    I find it hard to believe it's the display, but maybe...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Propeller Wiki: Share the coolness!

    Post Edited (potatohead) : 10/15/2007 3:26:32 AM GMT
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-10-14 21:26
    tvparams           long    0               'status
                            long    1               'enable
                            long    %001_0101       'pins
                            long    %0001           'mode
                            long    0               'screen
                            long    0               'colors
                            long    x_tiles         'hc
                            long    y_tiles         'vc
                            long    12              'hx
                            long    1               'vx
                            long    0               'ho
                            long    0               'vo
                            long    0               'broadcast
                            long    0               'auralcog
    
    
  • deSilvadeSilva Posts: 2,967
    edited 2007-10-14 22:26
    .. x_tiles and y_tiles, please.
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-10-15 18:30
    x_tiles = 16
    y_tiles = 12
  • deSilvadeSilva Posts: 2,967
    edited 2007-10-15 22:03
    I finally had some time for a short investigation, I used an XGA (800x600) beamer (as substitution for aTV set), my pet $80 6''-"car monitor" (480x240) and a colleague lent me (very willingly: "Keep it as long as you like") his tiny 2'' Parallax monitor...

    I used the MPE_TEXT_013.SPIN as reference, also modified for PAL, and an unmodified TV.SPIN.

    (1) NTSC: Fine sharp image with non-interlaced (16x14) on all displays
    Interlaced (40x28): absolutely stable image on the 6", but not sharp; flickering on the beamer; flickering considerably on the 2" with additional color artefacts.

    (2) PAL: As there is no good match between the scanlines and the number of display lines on the monitor, the 6" monitor showed visible "line-granularity", with alternating blacks each other line. Stable but not very good looking non-interlaced. Slightly flickering interlaced. Not very recommendable.

    Note that this monitor must have some build-in intelligence, as it has to be prepared for wide (480) and standard (320) width signals.

    The Beamer behaved brave with non-interlaced, but flickered slightly interlaced as in NTSC mode.
    The 2'' monitor was terrible! Non-interlaced showed unstable lines, similar as photographed by Graham, which also jittered at about 10 Hz. Interlaced showed increased color artefacts, in addition to jitter and flicker.

    The "white line" at the bottom described by Graham was not visible during either of these tests.


    I should say it is all a matter of the monitor quality, how well it can "interpolate" the non-matching signal lines and monitor lines. NTSC ist not "better" but - non-interlaced - closer to the 240 real lines of a low cost monitor. I was again astonished how bad all monitors behaved in interlaced mode... could this be still a norm inconsistency in TV.SPIN???

    Non-interlaced PAL works fine on "full-line" TVs as the beamer.

    BTW: The number of y-tiles could well be set to 14 for NTSC and to 16 for PAL.

    Post Edited (deSilva) : 10/15/2007 10:38:52 PM GMT
Sign In or Register to comment.