Shop OBEX P1 Docs P2 Docs Learn Events
PLL Counter mode trick for Pixel Clock — Parallax Forums

PLL Counter mode trick for Pixel Clock

RaymanRayman Posts: 14,849
edited 2009-09-14 15:01 in Propeller 1
Someone suggested using a different PLL mode to generate a pixel clock and it works!

I started by changing from CTRMODE %00001 to %00010 and it worked pretty good...
But, there were some small artifacts that I think are due to violating pixel setup and hold times...

So, I tried CTRMODE %00011· (PLL-differential) and used the B-output for !PLLx and it works
much better.

This approach is working great for my PSB touchscreen LCD with RGB data input.

I think it will work for many RGB devices.· One day, I hope to try out this HDMI chip to
convert the Prop's VGA output to HDMI.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm

Comments

  • SapiehaSapieha Posts: 2,964
    edited 2009-09-14 09:30
    Hi Rayman.

    It is possible to have more details else if You can post any driver for that display.
    I have one that ned that technique to function on Propeller

    Regards
    Christoffer J

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.
    For every stupid question there is at least one intelligent answer.
    Don't guess - ask instead.
    If you don't ask you won't know.
    If your gonna construct something, make it·as simple as·possible yet as versatile as posible.


    Sapieha
  • RaymanRayman Posts: 14,849
    edited 2009-09-14 10:12
    Here's a snippet of the modified VGA driver code to give a pixel clock:
                            mov     t1,#%00011_011    'set ctra configuration       'RJA  !!!!!!!!!!
    :max                    cmp     m8,_rate        wc      'adjust rate to be within 4MHz-8MHz
            if_c            shr     _rate,#1                '(vco will be within 64MHz-128MHz)
            if_c            add     t1,#%00000_001
            if_c            jmp     #:max
    :min                    cmp     _rate,m4        wc
            if_c            shl     _rate,#1
            if_c            sub     x,#%00000_001
            if_c            jmp     #:min
                            movi    ctra,t1                 '+22
                            movd    ctra,#25  '       'RJA: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm

    Post Edited (Rayman) : 9/14/2009 10:19:45 AM GMT
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2009-09-14 11:08
    Thanks for that Ray, it's something that I have kept in the back of my mind to have a look at. Have you captured the timing of the output yet? Would be good to check to see if anything needed to be done to improve the setup and hold times. If I have time I will hook it up and take some samples.

    *Peter*
  • SapiehaSapieha Posts: 2,964
    edited 2009-09-14 14:00
    Hi Rayman


    Thanks ..

    But can You have that pixelrate signal on any pin that can clock in data in TFT display?

    Regards.

    Christoffer J

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.
    For every stupid question there is at least one intelligent answer.
    Don't guess - ask instead.
    If you don't ask you won't know.
    If your gonna construct something, make it·as simple as·possible yet as versatile as posible.


    Sapieha
  • RaymanRayman Posts: 14,849
    edited 2009-09-14 15:01
    Christoffer: I think you're asking if the pixel clock can be on any pin... I think it can... It's this line that selects the output pin:

    movd ctra,#25 ' 'RJA: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
Sign In or Register to comment.