Support to non consecutive VGA_GPIO_SYNC
Opened this issue · 1 comments
dquadros commented
I am using PicoVGA with a RP2014 Zero board that has a more limited option of pins than the Pi Pico. I want to use UART and SPI and for that I need to assign VGA_GPIO_SYNC to a GPIO that is not consecutive to the color pins. From a quick look at the code, it seems that this will only affect the pins initialization in vga.c, (VGA_GPIO_SYNC would need to be initialized separately):
// connect PIO to the pad
for (i = VGA_GPIO_FIRST; i <= VGA_GPIO_LAST; i++) pio_gpio_init(VGA_PIO, i);
...
// set pin direction to output
pio_sm_set_consecutive_pindirs(VGA_PIO, VGA_SM(layer), VGA_GPIO_FIRST, VGA_GPIO_NUM, true);
Can you confirm this? Is this change worth a pull request?
Panda381 commented
Yes you are right. It was my mistake not to take into account that synchronisation can be separate from colour. Yes, it is sufficient to initialize SYNC separately. I want to point out a second problem yet - some monitors (rarely, rather older types) do not support CSYNC composite sync. If the output doesn't work for you, try it again on another monitor, preferably a newer LCD.