Shop OBEX P1 Docs P2 Docs Learn Events
Psp 4.3" lcd — Parallax Forums

Psp 4.3" lcd

James NewmanJames Newman Posts: 133
edited 2008-02-18 21:10 in Propeller 1
Has anyone ever used one of these? It would take all but maybe a couple of pins of the prop, but if using a prop dedicated for video, and the remaining pins for communication to another prop... I think it'd work pretty well. A bit pricey, but there are some around the net for $40 or less.

Post Edited (James Newman) : 2/18/2008 5:38:34 AM GMT

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-02-18 06:01
    Can you post a link?
  • James NewmanJames Newman Posts: 133
    edited 2008-02-18 06:06
    Sorry, there is one above, but it's maybe a bit hard to see... I should have just used the url as the link text tongue.gif
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-02-18 06:24
    Aha! That's why I always surround my links with [noparse][[/noparse]u] and &#091/u]. The display is a synchronous device requiring around a 9MHz clock. Other than that, you could use just the two MSBs of each color input, along with the HSYNC and VSYNC in the manner of a VGA interface. If I recall correctly, you can get the video clock to output by using 00010 for the clock mode, instead of the usual 00001. I'm not sure what the phase relationship with the pixels is, though. If you have to invert the clock to get the negative transistion in the middle of the pixel (per the datasheet), you could always use mode 00011 with OUTB. In any event, you'd set up VSCL for one clock per pixel.

    -Phil
  • deSilvadeSilva Posts: 2,967
    edited 2008-02-18 07:47
    Phil Pilgrim (PhiPi) said...
    If I recall correctly, you can get the video clock to output by using 00010 for the clock mode, instead of the usual 00001.
    This is quite astonishing! I have not been aware of that trick.... How does VID know what Timer to take?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-02-18 08:35
    Gad! I hate it when it's past my bedtime and you've just had your morning coffee! smile.gif

    That's a good enough question to make me question my assertion, and it may be the result of crosstalk from another counter matter that came up awhile back. Anyway, I'm too tired to track it down right now; it'll have to wait until (my) morning.

    -Phil

    Update: 'Just found the answer to your question: the video hardware always uses PLL A. Now I can sleep.

    Post Edited (Phil Pilgrim (PhiPi)) : 2/18/2008 8:44:48 AM GMT
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-02-18 18:52
    Here's some code I wrote to test the Prop's clocked video out capabilities. It uses PLL mode 00011 that provides an inverse clock on OUTB, in order to get the 1->0 clock transisiton in the middle of the pixel that's required by the PSP display.

    [b]CON[/b]
    
      [b]_clkmode[/b]      = [b]xtal[/b]1 + [b]pll[/b]16x
      [b]_xinfreq[/b]      = 5_000_000
    
    [b]PUB[/b] Start
    
      [b]cognew[/b](@demo, 0)
    
    [b]DAT[/b]
    
                  [b]org[/b]       0
    demo          [b]mov[/b]       [b]frqa[/b],[b]frqa[/b]0
                  [b]mov[/b]       [b]ctra[/b],[b]ctra[/b]0
                  [b]mov[/b]       [b]dira[/b],[b]dira[/b]0
                  [b]mov[/b]       [b]vscl[/b],[b]vscl[/b]0
                  [b]mov[/b]       [b]vcfg[/b],[b]vcfg[/b]0
    
    :loop         [b]waitvid[/b]   colors,pixels
                  [b]jmp[/b]       #:loop
    
    [b]frqa[/b]0         [b]long[/b]      $0e66_6666                      '4.5MHz
    [b]ctra[/b]0         [b]long[/b]      %00011 << 26 | %100 << 23 | 1   'PLL x2, OUTB on pin 0, OUTA on pin 1
    [b]dira[/b]0         [b]long[/b]      %1_0000_0001                    'Pins 0 and 8 out.
    [b]vscl[/b]0         [b]long[/b]      1 << 12 | 32                    '1 clock/pixel, 32 clocks/frame
    [b]vcfg[/b]0         [b]long[/b]      %01 << 29 | 0 << 28 | 0 << 27 | 0 << 26 | %001 << 9 | %1111_1111
    colors        [b]long[/b]      $ff_00
    pixels        [b]long[/b]      $aaaa_aaaa
    
    
    


    Attached is the resulting scope trace. Channel 1 is the video output; channel 2, the clock.

    -Phil
    640 x 480 - 13K
  • deSilvadeSilva Posts: 2,967
    edited 2008-02-18 21:10
    The WAITVID takes 7 µs (32/4.5) This is just A TINY LITTLE BIT to fast for SPIN. But persons who like to experiment with this can use SPIN when they constrain themselves to 1 MHz (or less)
Sign In or Register to comment.