Shop Learn
How to do 1080p? — Parallax Forums

How to do 1080p?

Was just thinking about this...

Looks like for 60Hz, you need pixel clock something like 143 MHz.
I don't think we can do that with 80 MHz clockfreq.

But, maybe we could do 30 Hz. Then, the question is what monitor would take a 30 Hz signal over VGA.
Maybe my HDTV will do that, not sure.

I could also use a TFP410 board to convert to HDMI.
I think the smart pins should give me a pixel clock now.
I'm pretty confident my TV will accept 30Hz over HDMI.
But, it would probably take a lot of tinkering with I2C settings on TFP410 to make that work.

If I did the math right, should have enough RAM for a 1-bit image at 1920x1080.
But, that's not too exciting.
Still, if could do a text driver with different colors for each character it might be interesting...

«1

Comments

  • 1080i is 74.25 MHz

    HDMI also offers a 24 frame mode for film. That might actually be a decent option at this stage.

  • cgraceycgracey Posts: 13,375
    1080p clocks at 148.5MHz.

    720p clocks at 74.25MHz.

    You should be able to do 720p, with some double-wide pixels every ~14th column, by setting the streamer NCO to 74.25/80 * 2^31.

    The colorspace converter would need to be used to convert the RGB to Y-Pb-Pr signaling. We were doing it on Prop2 Hot and the current Prop2 is capable.
  • potatoheadpotatohead Posts: 10,156
    edited 2016-03-04 22:06
    I've ran the colorspace converter insane fast, just a while back, as a test on TV. 2500+ pixels / line... worked just fine. (Yeah, I know, can't see them individually on a TV, but you can test for the converter working properly with bands of colors, and the old monochrome composite displays will do 800+ pixels.) From all appearances, it's just as capable as the P2 hot design was, in this respect. Good news, when we get faster system clocks.

    :)

    What I don't understand is how to calculate constants for the colorspace converter. I want to do Y-C (S-video) and Y Pb Pr (component) at some point. @cgracey, no rush. :) Sorting out Smart IO (SIO, which I'm liking a lot more as a term) comes first.

    @all: Hey, how does one calculate these things?

    "some double-wide pixels every ~14th column, by setting the streamer NCO to 74.25/80 * 2^31."

    I'm still learning about how NCO systems operate, and could really use a pointer to some good overview type info.


  • cgraceycgracey Posts: 13,375
    The NCO in the streamer is 1.0 of the system for clock for the adder value $8000_0000.

    74.25/80 = 0.928125, then multiplied by $8000_0000 = $76CC_CCCC.

    It's generating an MSB on about 13 of 14 clocks, which means it's streaming pixels out on about 93% of all clock cycles. Every 14th, it repeats a pixel. This gives an average pixel rate of 74.25MHz.
  • RaymanRayman Posts: 11,819
    I'm thinking that 80 MHz pixel clock for 1080p@30Hz will work, at least for HDMI connection.
    Digital connections seem to be very forgiving...
  • 1080p30 is a standard format, and most HDTV monitors will handle it.
  • RaymanRayman Posts: 11,819
    edited 2016-03-05 00:04
    Just did a quick test with VGA connector...
    My PC monitor didn't like it but TV didn't complain.

    This is 1080p at 80 MHz pixel clock.
    Didn't bother inverting image yet...

    This TV is very old though, 2006. Not sure if newer ones would be more or less picky...
    1632 x 1224 - 689K
  • RaymanRayman Posts: 11,819
    Here's the code...
  • No luck here Rayman.

    Tried a newish hp monitor, an older tv, and an old sony monitor (that prob doesn't support HD anyway). The hp monitor comes up with an advisory message "Input Signal out of range, change settings to 1920x1080-60Hz"

    Had a look at the waveform, looks good.
  • Tried a new acer T232 as well, also comes up with unsupported mode message.

    On thing I noticed on the scope, not sure whether it matters or not, but the hsync pulses (which are quite brief) are somewhat smeared out by the capacitance of the vga cable, especially the 5m low loss vga cable I was testing with. After seeing that I went back to ~1m standard vga cables, but results were same

  • Rayman
    Works on my little TV but reports 1920x1080 @30Hz detected.
    592 x 1056 - 299K
  • jmgjmg Posts: 14,593
    edited 2016-03-05 04:07
    potatohead wrote: »
    @all: Hey, how does one calculate these things?

    "some double-wide pixels every ~14th column, by setting the streamer NCO to 74.25/80 * 2^31."

    I'm still learning about how NCO systems operate, and could really use a pointer to some good overview type info.
    To find the jitter repeats, I use Egyptian Fractions, which gives
    1+ 1/13 + 1/1931 + 1/7.45M

    not sure how this will paste - wolframalpha gives :
    gif&s=9

    The 1/13 is the correction Chip mentions, but there are others here too.
    1931 adds one more, which could give a diagonal effect, and 1/7.45M is close to a 10Hz flicker effect.
    Both of those are probably undesirable, so choices are
    a) NCO is reset every line, so the effects always line up vertically, and do not move.
    b) A target of 74285714.285Hz is chosen instead, gives NCO adder of 0x76DB6DB7
    That's ~ 480ppm different, from 74.25M, but similar to what the reset gives.

  • RaymanRayman Posts: 11,819
    Interesting...

    Well, I did notice small, maybe 1/2" black bars on left and right of image on my HDTV. Makes me wonder if that's the result of picking 80 MHz instead of 74.25 MHz...

    Ozpropdev shows much wider bars, but maybe monitor is in 4:3 mode?

    Anyway, maybe there's some hope here...
  • Rayman wrote: »
    Ozpropdev shows much wider bars, but maybe monitor is in 4:3 mode?
    That's correct, it was in 4:3 mode.
    In 16:9 mode picture is right to edges. No visible black bars.

  • So will the final version of the P2 Chip have a PLL? Otherwise, how can we do a jitter-free 74.25 MHz?
  • RaymanRayman Posts: 11,819
    I guess we could use a 148.5 MHz oscillator...

    Tried it with another PC monitor. Won't show picture, instead shows little message box on screen saying that it recommends 1920x1080@60 Hz.

    I'm guessing that HDTVs have to be able to show 1080 at 24 fps. So, they have a frame buffer that lets them refresh the screen with the same image. This also allows them to do 30 fps. Monitors probably don't have this and have to refresh at least 60 fps to avoid flicker...
  • RaymanRayman Posts: 11,819
    Also, it may be just fine with anywhere around 160 MHz pixel rate.
    Monitors may synchronize to the sync signals.

    I suppose I can test this by trying 1920/2 x 1080 at 60 Hz...
  • RaymanRayman Posts: 11,819
    edited 2016-03-05 20:52
    Well, that didn't work so well (960x1080@60Hz)...

    HDTV shows image, but with major dot crawl.
    One monitor I have shows image fine (no dot crawl), but missing a few horizontal pixels.
    Another monitor shows image for a second with dot crawl and then goes blank then shows image, etc.

    Maybe I did something wrong or maybe it is sensitive to frequency.
    Bet it'd be OK with HDMI connection though...


    Actually, I think this is working OK. I probably didn't have enough coffee when testing this morning...
  • cgraceycgracey Posts: 13,375
    The only PLL in the Prop2 will be for the main clock. If you want 148.5MHz, you'll need to clock the whole chip at that frequency.
  • jmgjmg Posts: 14,593
    cgracey wrote: »
    The only PLL in the Prop2 will be for the main clock. If you want 148.5MHz, you'll need to clock the whole chip at that frequency.

    The present PLL has has a single divider, and a PFD = Fin, VCO = PFD * N
    Can that be extended with a second divider to allow better frequency choices ?

    PFD = Fin/M, VCO = PFD * N

    5 bits of M.N allows ~5MHz PFD, and 6 bits allows ~2.5MHz of PFD.
    CMOS-in can clock higher than Xtal Oscillators, so M ~ N covers that.

    It will be interesting to test USB operation with non 48MHz NCO - hopefully, USB systems can tolerate that,

    Using this example, 12MHz average, can be generated with 148.5/(12+3/8),
    ~ 6.7ns of jitter

  • Thanks jmg.

    I have been reading on NCO, jitter and various solutions.

    Some systems have an additional tuning word. Does doing this make sense for P2, or is it IP restricted, or of limited use?

    For TV, there is a universal 13.5Mhz frequency we can build on, FYI. Maybe it's worth some discussion to optimize our options.
  • jmgjmg Posts: 14,593
    potatohead wrote: »
    Some systems have an additional tuning word. Does doing this make sense for P2, or is it IP restricted, or of limited use?
    Do you have some examples ?

    A Tuning word might make sense on shorter adders, but P2 has 32b.

    Chip has mentioned reset of NCO on things like the shifter, and I think even Pre-load of phase was under consideration.

    Maybe the Tuning word does the same thing ? : Gives a timebase where the NCO repeats, removing any lower frequency jitter elements, at the expense of slight frequency error / retrim. (much as I did above)

    A reset NCO is also useful for fractional Baud. Removes any inter0byte jitter, but allows intra-byte edge snap to nearest clock.
    Auto-Baud and timing systems that use whole character basis, do not see jitter.

  • RaymanRayman Posts: 11,819
    edited 2016-03-05 20:51
    Ok, so this is weird...
    I fixed the dot crawl problem on my HDTV in 960x1080p60 mode with 80 MHz pixel clock

    But, I don't see why this fixed it...
    Here's the change:
    hsync           'xcont   m_bs,#0                 'horizontal sync
                    xzero   m_bs,#0                 'horizontal sync
    

    This is a trick for this issue when using the NCO, making every horizontal line start at zero phase
    But, I have it set to output at full clock speed with this:
    setxfrq ##$8000_0000
    

    So either something is wrong (unlikely) or I don't fully understand this (more likely)

    Ok, strike all that, now I have no pixel crawl either way...
    Very strange... Downloaded the code I posted that I thought was giving me dot crawl earlier and now it works...

    Maybe my Prop Tool code wasn't synchronized right with PNUT code when I loaded.

    Anyway, it looks like you don't have to have the exact right frequency for 1080p to work on an HDTV.
    But, you probably should pick a VGA mode for computer monitors...
  • jmgjmg Posts: 14,593
    Rayman wrote: »
    Ok, strike all that, now I have no pixel crawl either way...
    That makes more sense.
    One test is 80MHz, and the other is ~ 80M/(1+1/13) ?


  • RaymanRayman Posts: 11,819
    edited 2016-03-05 22:17
    Ok, I've get a better bmp and it looks good on my HDTV at 960x1080p60.

    This is using the code posted above.

    The image actually looks better than this photo when you stand several feet away from the screen...
    1632 x 1224 - 889K
  • RaymanRayman Posts: 11,819
    edited 2016-03-05 21:20
    Still doesn't work right on either of my two computer monitors here though.
    One shows the image then blanks then shows then blanks, etc.
    The other one shows the image almost OK, but the lower lines (below the birds feet) are missing.
  • Yep the 60hz version works on all 2 hd monitors and 1 hdtv here.

    Nice work Rayman
  • RaymanRayman Posts: 11,819
    Guess it's really more like 65 Hz refresh. Glad to hear it works other TVs.
  • RaymanRayman Posts: 11,819
    jmg wrote: »
    Can that be extended with a second divider to allow better frequency choices ?

    PFD = Fin/M, VCO = PFD * N

    5 bits of M.N allows ~5MHz PFD, and 6 bits allows ~2.5MHz of PFD.
    CMOS-in can clock higher than Xtal Oscillators, so M ~ N covers that.

    This is how the SSD1921 and SSD1963 display controllers work... It does give you more flexibility in output frequency...

  • Works OK on my TV.
    Reports 1920x1080@60Hz signal.
Sign In or Register to comment.