Go Down

Topic: Tiled Screen (Read 1 time) previous topic - next topic

riccardo_giacomazzi

Hi, if anyone is interested, I have published a library that implements a video controller in Tiled mode: on a resolution of 640x360 pixels a screen of 40x22.5 Tiles of 16x16 pixels each is built.

This allows to have a reasonable speed of updating the screen also passing through the JTAG interface.

You can create a very large virtual screen and view a 640x360 pixel window, with vertical and horizontal scrolling of the single pixel.

The library and the sources can be found on my GitHub: https://github.com/Giako68/TiledScreen

invincing

Hey, you just saved me from sending my brand new card back! I was almost certain that the HDMI output was broken at the HW level, but with your sketch I was able to get an image on the screen.

Basically, my issue is similar to this post:
https://forum.arduino.cc/index.php?topic=561263.msg3837146#msg3837146

The screen is just color noise with the regular HDMI output at 640x480. This is on a monitor with DVI input. With another monitor (HDMI input), the display just says "out of sync".

As I do get correct image with your sketch (on the DVI monitor, the HDMI monitor can't sync to this either), I think I just need to try more monitors in order to get the default 640x480 image size working...

May I ask what you are doing differently with the HDMI signal generation?

riccardo_giacomazzi

I chose the 640x360 resolution because, both on an HD Ready panel (1280x720) and on a Full HD panel (1920x1080), the pixels are square and all the same: on an HD Ready a pixel of the image occupies 2x2 pixels of the panel, while on a Full HD it occupies 3x3.

Unfortunately 640x360 is not a "standard" resolution, so some monitors or TVs may not accept it.

To choose the signal settings, I started from my monitor's EDID data for the closest resolution, i.e. 640x480.

If you can get the EDID data of the HDMI monitor, I can try varying the DVI signal settings to see if it accepts it.

The EDID data of my monitor are these:

Code: [Select]
Section "Monitor"
        Identifier "247ELPH"
        ModelName "247ELPH"
        VendorName "PHL"
        # Monitor Manufactured week 1 of 2012
        # EDID version 1.3
        # Digital Display
        DisplaySize 520 290
        Gamma 2.20
        Option "DPMS" "true"
        Horizsync 30-83
        VertRefresh 56-76
        # Maximum pixel clock is 170MHz
        #Not giving standard mode: 1920x1080, 60Hz
        #Not giving standard mode: 1280x1024, 60Hz
        #Not giving standard mode: 1440x900, 75Hz
        #Not giving standard mode: 1440x900, 60Hz
        #Not giving standard mode: 1680x1050, 60Hz

        #Extension block found. Parsing...
        Modeline        "Mode 16" 148.50 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
        Modeline        "Mode 0" 148.50 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
        Modeline        "Mode 1" 25.200 640 656 752 800 480 490 492 525 -hsync -vsync
        Modeline        "Mode 2" 27.027 720 736 798 858 480 489 495 525 -hsync -vsync
        Modeline        "Mode 3" 27.027 720 736 798 858 480 489 495 525 -hsync -vsync
        Modeline        "Mode 4" 74.250 1920 2008 2052 2200 1080 1082 1087 1125 +hsync +vsync interlace
        Modeline        "Mode 5" 27.027 1440 1478 1602 1716 480 484 487 525 -hsync -vsync interlace
        Modeline        "Mode 6" 27.027 1440 1478 1602 1716 480 484 487 525 -hsync -vsync interlace
        Modeline        "Mode 7" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
        Modeline        "Mode 8" 27.000 720 732 796 864 576 581 586 625 -hsync -vsync
        Modeline        "Mode 9" 27.000 720 732 796 864 576 581 586 625 -hsync -vsync
        Modeline        "Mode 10" 74.250 1280 1720 1760 1980 720 725 730 750 +hsync +vsync
        Modeline        "Mode 11" 74.250 1920 2448 2492 2640 1080 1082 1089 1125 +hsync +vsync interlace
        Modeline        "Mode 12" 27.000 1440 1464 1590 1728 576 578 581 625 -hsync -vsync interlace
        Modeline        "Mode 13" 27.000 1440 1464 1590 1728 576 578 581 625 -hsync -vsync interlace
        Modeline        "Mode 14" 148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
        Modeline        "Mode 15" 74.250 1280 1390 1420 1650 720 725 730 750 +hsync +vsync
        Modeline        "Mode 17" 27.00 720 736 798 858 480 489 495 525 -hsync -vsync
        Modeline        "Mode 18" 74.25 1280 1390 1430 1650 720 725 730 750 +hsync +vsync
        Modeline        "Mode 19" 27.00 720 732 796 864 576 581 586 625 -hsync -vsync
        Option "PreferredMode" "Mode 16"
EndSection


And these are the parameters I use to generate synchronisms:

Code: [Select]
  // -----------------------------------
  // 640x360@60Hz  -- PixClk = 25.200MHz
  // -----------------------------------
  parameter integer H_sync_start = 656;     
  parameter integer H_sync_stop = 751;
  parameter integer H_img_start = 0;
  parameter integer H_img_stop = 639;
  parameter integer H_screen_stop = 799;
  parameter integer H_polarity = 1'b0;
  parameter integer V_sync_start = 361;
  parameter integer V_sync_stop = 364;
  parameter integer V_img_start = 0;
  parameter integer V_img_stop = 359;
  parameter integer V_screen_stop = 449;
  parameter integer V_polarity = 1'b0;

Go Up