Wren6991 / PicoDVI

Bitbanged DVI on the RP2040 Microcontroller
BSD 3-Clause "New" or "Revised" License
1.23k stars 135 forks source link

Release one core in 640x240 mode #27

Closed mlorenzati closed 2 years ago

mlorenzati commented 2 years ago

I successfully integrated pico dvi to capture RGB15Khz video (pre VGA) with a triple s&h ADC. The 320x240 mode leaves 1 core for my HSYNC VSYNC interrupts and to call DMA which calls dedicated pio. The 640x480 is not working (either capture and pause hdmi or viceversa) since 2 cores are fully used and interrupts are interferring in bad moments. Since RGB15K uses just 240 vertical lines in progressive mode, could be the code arranged to either generate a black line in odd lines or to repeat the odd line in the even ones. How could this be achieved? image

Wren6991 commented 2 years ago

You could start by increasing DVI_VERTICAL_REPEAT to 2, so that the horizontal interrupt uses each TMDS buffer for two scanlines. Search for it in the code, I think 2 is the default, and the 640x480 demos override it to 1 in their cmake files.

mlorenzati commented 2 years ago

Excellent, I tested it and now I have a free core to attend IRQs and do some bg tasks! Thanks @Wren6991 for your reply, of course when and if this sees the light there would be proper mention to you and will commit to the BSD-3 clause license.

mlorenzati commented 2 years ago

image 640x240 RGB 2 HDMI, I run a half buffer with circular indexes.