How to do 1080p?
Rayman
Posts: 14,768
in Propeller 2
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...
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...
Comments
HDMI also offers a 24 frame mode for film. That might actually be a decent option at this stage.
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.
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.
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.
Digital connections seem to be very forgiving...
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...
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.
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
Works on my little TV but reports 1920x1080 @30Hz detected.
1+ 1/13 + 1/1931 + 1/7.45M
not sure how this will paste - wolframalpha gives :
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.
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...
In 16:9 mode picture is right to edges. No visible black bars.
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...
Monitors may synchronize to the sync signals.
I suppose I can test this by trying 1920/2 x 1080 at 60 Hz...
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...
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
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.
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.
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:
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:
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...
One test is 80MHz, and the other is ~ 80M/(1+1/13) ?
This is using the code posted above.
The image actually looks better than this photo when you stand several feet away from the screen...
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.
Nice work Rayman
This is how the SSD1921 and SSD1963 display controllers work... It does give you more flexibility in output frequency...
Reports 1920x1080@60Hz signal.