Shop OBEX P1 Docs P2 Docs Learn Events
converting p2_vga_text to hdmi? — Parallax Forums

converting p2_vga_text to hdmi?

I'm attempting to use HDMI in my code in place of VGA for less components (the screen I'm using is HDMI like most these days, so I currently have a VGA-to-HDMI device with its own power and cabling in between).

I'm using the great p2_vga_text driver here https://github.com/totalspectrum/p2_vga_text and trying to change the smartpin config and blanking info in line with @Rayman 's WVGA HDMI here https://forums.parallax.com/discussion/172518/wvga-hdmi-vga-8bpp-graphics-driver-works-with-the-parallax-7-hdmi-lcd-in-spin2

Running either of them on their own works fine on this display. When I run my conversion code, all I've gotten is a big fat "no signal" message from the display. Has anyone done this already? I don't have enough spare RAM to use the bitmap method in the original HDMI code, so the text mode is a must for me.

Comments

  • evanhevanh Posts: 15,126
    edited 2022-03-09 16:51

    Well, the obvious request is: Post your adapted code.

    Also, first thing to point out is the digital encoding requires a sysclock that's 10x the dot clock. Therefore, any display mode chosen is restricted to a max dot clock of around 35 MHz. Oh, and the minimum is 250 MHz link speed, so 25 MHz dot clock is the minimum.

  • kwagnerkwagner Posts: 48
    edited 2022-03-10 19:22

    I didn't include my code because it's a stripped-down version specific to my application, rather than generic like the github code.
    But as I'm sure others would ask the same thing, I've included it here.

    As you can see, I'm only using one specific tile mode, but I don't entirely know how to remove the others from the code, so they remain as stubs. I'm also using pin 0 for the HDMI start pin, so any math involving that was removed. I tried the same resolution (in my case 1024x768) in Rayman's code, and it works on my display.

    Thanks for info on the clock speed. I'm using the same 300MHz as Rayman's demo, so should be good there.

    [edit: deleted bad code so as to not lead others astray]

  • evanhevanh Posts: 15,126

    1024x768 is nominally 65 MHz dot clock. So at 30 MHz you're probably down around 28 Hz vertical refresh. Modern HDMI displays will do that but older, monitors in particular, displays might reject it as too low ... I'll have a look ...

  • Thanks. I know it's a bit nonstandard, but my program was already written at that resolution, so keeping it would be ideal. The display seems to be fine with it at least when I modify Rayman's code, but it's possible it's being rejected. I'm only updating my display at ~20FPS, so I'm not losing any info.

  • evanhevanh Posts: 15,126

    Well, I can confirm it don't work. :)

  • haha :D thanks!
    I think I found some extra pins to add the hyperRAM module on, in which case I'd have the buffer space I need to make the bitmap version work. I'll give that a try.

  • evanhevanh Posts: 15,126

    Well, I do have it going now. But threw away your code entirely in the process. Started fresh from the "vga_tile_driver.spin2".

    In hindsight, after working out everything that needed changed to enable the DVI digital pin group, I probably didn't need to start over. There's a lot of changes needed to not use the four DACs.

  • kwagnerkwagner Posts: 48
    edited 2022-03-09 20:26

    Throwing out my code and starting fresh is probably the best troubleshooting step I could recommend :)
    Is your code in a shareable state?

    I've got the hyperRAM displaying, but the resolution isn't matching what the parameters say it should be.

  • evanhevanh Posts: 15,126
    edited 2022-03-10 11:15

    [updated in next post]

  • evanhevanh Posts: 15,126
    edited 2022-03-10 14:23

    I probably should now use the BITDAC mode. Currently uses the 1k5R logic drives ... updated.

    EDIT: Attached the edited demo files here.
    EDIT2: Improved calculation for vporches.
    EDIT3: Started over with updated tile driver.
    EDIT4: Bug fix for vblank calculation. EDIT5: And again for my TV limits.
    EDIT6: More precise terminal reporting of frequencies in "demo.spin2"
    EDIT7: Another reduction in vblank max limit based on my TV.

  • evanhevanh Posts: 15,126
    edited 2022-03-10 11:16

    Oh, Smile, my copy of the tile text driver is out of date. That won't help you. I'll start over again ...

    EDIT: Grr, there's something wrong, resolutions slightly screwy now ... Ha! Missed adjusting one XCONT.
    EDIT2: Yay, all cleaned up now.

  • Works brilliantly, thanks!

  • evanhevanh Posts: 15,126

    Cool.

Sign In or Register to comment.