Electronics > Projects, Designs, and Technical Stuff

Modern equivalent of 74HC4046 PLL?

<< < (17/19) > >>

Miti:

--- Quote from: BrianHG on July 25, 2020, 12:28:17 pm ---
I'm curious, what kind of panel are you using?
Most standard vesa video modes, like 1024x768 has a 65MHz clock, not 55.125MHz.

In fact, looking here: http://tinyvga.com/vga-timing

--- Code: ---http://tinyvga.com/vga-timing/1024x768@60Hz
--- End code ---

I don't see any multiple of 55.125MHz.

LOL, if your scope output 512x256 2 bit color, you have enough ram on the smallest CycloneIV to store an entire frame.
With a standard UART at 921600 baud, you can display around 3fps on a PC without any compression.
Probably around 10fps with dumb RLE compression.

--- End quote ---

This one:
https://www.aliexpress.com/i/4000282196847.html

I know it is not a standard VGA pixel clock but the panel, and two monitors, have no issues locking onto this pixel rate and auto adjusting the position right in the middle. This is the only frequency that I found to give me a VGA framerate identical to the video framerate, with a little tweak in the front and back porch. This simplifies my buffering a lot. I don't need external double or tipple buffer to avoid flickers.
I also avoid the need for blending with driving the LCD panel directly, as the panel is only 640x480.
The video output is 509?x254 visible if my measurements are correct, so double the pixels and triple the lines, would fit quite nicely into 1024x768 VGA with some spare pixels left and right and lines top and bottom.

Edit: In Reply #10 you can see a picture of the panel showing a test pattern with the exact specs that I mentioned before, including three pixel wide horizontal lines.

BrianHG:
Ok. No prob.  I assumed you would use the panel at it's native edge to edge and scale the scope's sample image onto it either with a panel which was exact 2x by 3x, or, you would use a lower res panel like 640x480 and do a bi-linear or bi-cubic filtering, or even a sub-pixel scaling.  (IE sup-pixel scaling of a 640x480 LCD panel makes the panel appear to be 1920x480.  (some panels have a special RGB matrix which make their 640x480 sub-pixel mode more like 1280x960) This trick would make 512 pixels, or 509 pixels stretch much more nicely onto 1920 pixels wide without clunky edges.  However, you MUST be feeding the panel at it's native res, otherwise you will get color artifacts when doing this trick wrong.)

Miti:
Ok, so I implemented the PLL clock, the ADC I2C reader and the IR into the VGA pattern generator. The ADC reads the brightness potentiometer, the IR input is used to select different color schemes. The module will have few color schemes with different colors for low and high brightness to give a bit of color to this old thing.

I then compared the vertical sync pulses of the spectrum analyzer and of the VGA output. Without HSync they drift slightly relative to each other. Once I connected the HSync, they are dead locked as they should be, and the pattern is very stable. I let them run for minutes and there was zero drift. Se attached.

BrianHG:
Excellent.  Though I don't know the extent of you project, but if you stored the entire source image in the Cyclone DualPort ram, you don't really need the output video locked into the source video.  Your perfect locking is good if you only want to use a single 9kbit block of ram to generate the output image.

Is it just me, or is your video in 49.8Hz and your video out 99.6Hz?
LCD screens wouldn't flicker at 49.8Hz unless you want to drive VGA CRTs.

I assume for the brightness, you will just be assigning 2 contrast levels to the 2 source video levels before sending that to the LCD.

Maybe something with a little optional color, like you stated...

(FPGA tech note:  When defining any type of large memories like dual port or fifos with Cyclone FPGAs, they will round up you chosen memory size to the nearest 9kbits when fitted in the FPGA fabric.  So, if you have a 512x8 line buffer, it will still end up consuming a 1024x9 chunk in the Cyclone block ram.  The undefined region will just be ignored and never used.)

Miti:

--- Quote from: BrianHG on July 26, 2020, 02:12:05 am ---Excellent.  Though I don't know the extent of you project, but if you stored the entire source image in the Cyclone DualPort ram, you don't really need the output video locked into the source video.  Your perfect locking is good if you only want to use a single 9kbit block of ram to generate the output image.

--- End quote ---

You are right, the reason I wanted to use only half image buffer is to reduce the output lag relative to the input image. Not sure if that is important though.


--- Quote from: BrianHG on July 26, 2020, 02:12:05 am ---Is it just me, or is your video in 49.8Hz and your video out 99.6Hz?
LCD screens wouldn't flicker at 49.8Hz unless you want to drive VGA CRTs.

--- End quote ---

I assume you say that because you don't see the middle pulse in channel 1. Look at the gap in the thick yellow trace. They are both same frequency.
If you read from output port while you write to the input port, the image may blink for a moment. Also, when the output image starts in the middle of the input image due to drift, if there's a dramatic change in the input image, I think it would show. That's the flicker I was talking about.


--- Quote from: BrianHG on July 26, 2020, 02:12:05 am ---I assume for the brightness, you will just be assigning 2 contrast levels to the 2 source video levels before sending that to the LCD.

Maybe something with a little optional color...

--- End quote ---

The input image would have 2 bits. 00 for black, 01 for low brightness and 11 for high brightness. The input from the ADC is a 10 bit value. The VGA output is 0-1023, even though it will be mapped to 16 or 32 output levels, I haven't decided yet. My intention is to multiply the ADC value with bit 0 or bit 1 to get the VGA output value and color according to the color scheme.
There will be 5 - 6 color schemes selected either using an external IR remote, or fixed scheme using jumpers.
There's a hole on the side of the case for focus adjustment in the CRT display that I can use for an IR sensor.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod