HDMI Tutorial for P2, please...
JonTitus
Posts: 193
in Propeller 2
The 7-inch LCD works nicely with my P2 EVAL board and it displays the rotating colorful spirals. Now I want to do useful things such as display signal traces, ASCII characters, and other information. Could we please have a tutorial that explains how to create and use a buffer of data and how to send it to the HDMI display? The spiral-display code is difficult to understand. A few simple examples and explanations might help P2 programmers. Perhaps an HDMI object will be available soon? Cheers. --Jon
Comments
https://forums.parallax.com/discussion/170820/hdmi-4-channel-oscilloscope-demo/p1
But, HDMI and VGA are nearly identical under the hood. So any 640x480 VGA code you find can probably be made to work with HDMI...
Note that mode. DVI/HDMI, direct from the prop2, needs the sysclock ten times faster than the same VGA mode. So, a 25 MHz VGA mode needs 250 MHz sysclock when sent via DVI signalling. There is some wiggle room for different modes but not a lot. The minimum data rate is spec'd at 250 MT/s, and the max is limited by the prop2 to somewhere between 300 MT/s and 350 MT/s.
Bending the rules also works in many cases. Particularly with reduced blanking timings.
Then we can build our screen data and let the hardware do the work it was designed for.
Mike
Why don't we take some of those FPGA's that were used to build the P2 and make them into an HDMI device that maybe can give us 4K.
Mike
Pixel-repetition is part of the HDMI spec. It doesn't lower the HDMI clock but it does reduce the resolution. Some anyway, I don't know whether 320x240 would work with HDMI pixel-repetition and line-repetition.
Update: I hacked it for Parallax 800x480 LCD
1. Where in your example code does the data get taken from the buffer and sent to the display?
2. What does this portion of the code do?
Why do you subtract 70 from the $1000 address?
How does the "birds_16bpp.bmp" data get into the buffer?
Given your program I just want to try to put some bits, bytes, or words in the buffer to see what happens. What is the format for the 16bpp.bmp data, 16 MSB, 16 LSB, or other..?
Thanks. --Jon
The program then uses the streamer hardware to feed the bitmap data out to the VGA or HDMI pins. The CMOD and pin config determines which.
Note: Hubexec will automatically force a hidden RDFAST itself if you use it.
EDIT: And with a little reduced blanking it'll even do 75 Hz still on 25 MHz dot clock. Disappointingly, my old 16:10 aspect DVI monitor doesn't know the 75 Hz mode. Or even 72 Hz. Oh for the analogue days, when the syncs only had to be in range to get a picture.
dgately
EDIT: Rayman might have something too.
I would have liked to add a simple graphics library to the driver, but until SPIN2 supports dead code elimination that is not really going anywhere as it would bloat too much to have a whole collection of uncalled methods linked into the driver all the time. Because the memory format changes you need to code several copies of some functions for the various bit depths etc.
Are they 1920x1080 monitors that repeat pixels automatically when given 960x540? Have you tried @ 50 Hz with ~ 300 MHz sysclock.
It shows a 256 color indexed image using LUT (with offset fix)
Update: See three posts ahead for a better version of this Spin2 file.
https://www.amazon.com/Projector-PVO-Portable-Cartoon-Interfaces/dp/B08B8DKYPS
Might be a good fit as the native resolution is actually lower than this...
- My cheapo widescreen TV I'm testing with just says "480p" in the display info when using anything higher than 640 across. I have no idea what it perceives the horizontal resolution is set to.
- My old DVI monitor just refuses to recognise anything above 640 across.
Yep, 50 Hz with 300 MHz works .
Now with Spin2 to start assembly and removed assembly clock setting code.
250 MHz seems to be working for me, but maybe should be faster.
It doesn't work for me on the 7" Parallax screen but it does on my 4K monitor.
On the 7" Screen I get the occasional flicker of the image, I'd say 99% of the time the image is black.
I've experienced this with all your demos but all the Parallax ones (Spiral etc) are fine.
You did change the basepin to match your setup, right?
I can't think of what else it could be, except maybe using too much power due to higher clock frequency...
I just did it on the P2 Eval board too (was using a different board). It does need two USB inputs to give it enough power if powering from the board...
Just the boost I needed... Bresenham's line algorithm was helpful: https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm#Algorithm_for_integer_arithmetic
I'm pretty sure it's not power related, I've only had trouble with your demos so far ;-)
I've tried with various power supplies, with the same result.
My pin group is the same as yours (48), I know it's right because I've plugged into my monitor and it's fine.
This problem is more related to the 7" screen I think, maybe it's on the edge of it's tolerances.
I've been looking at differences in the code in a bid to understand how all the modes are set etc.
I'm interested in how this value is calculated, I've looked through the docs and it's not entirely clear to me how this works.
Can anyone shed some light on this for me please?
Do you have a rev.a board?
These values changed between rev a and rev b as I recall...