-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
16bit per pixel support #6
Comments
The code has an option in config.h to compile a colour version; that splits the H and V syncs for the AD724 PAL encoder I use. With regards to upgrading it from 8bpp to 16bpp, the honest answer is I'm not 100% sure. It should just be a case of modding the colour version; increasing the number of pins allocated, modifying the resistor ladder, switching the pixel DMA from 8 to 16 bits, and doubling the malloc. |
I'm having an issue with the relative phases of the hsync and pixel data which seems to start up randomly. |
Thanks for tagging me on this. I had seen the horizontal jitter in the output but hadn't been able to find the cause or even measure it properly, so I convinced myself it was a problem of my imagination or my display. I will try your clock fix. For the synchronization of state machines this discussion seems relevent. It seems you can hold state machines in reset and start them together in blocks: |
Yes, the problem is that it's the state machines' clock dividers that are out of sync rather than the state machines themselves and is the same type of issue that another user had recently on stardot with a BBC mode7 clock divider: I first used pio_clkdiv_restart_sm_mask then started the state machines:
But then I noticed that this call does all of the above simultaneously:
After making the above change it always starts up with the pixels and sync in the same phase and I now have a stable phase locked test source.
As mentioned above, the clocks don't have to be the same but to avoid jitter the pixel clock must have a whole number of cycles in the exact time taken for the sync pio to produce one line. This time is theoretically 512 cycles of 8 Mhz, however I'm not sure the clock divider is producing exactly 24 Mhz (8*3) nominal for the pio because the fractional divider has limited bits so you would need to work out the exact nominal frequencies that both pio dividers were producing to be able to check for jitter free operation. |
Just realised why 640 pixel mode wont work: 640x256x2 (16 bits per pixel) = 327680 bytes which is more RAM than the pico has. |
Maybe there's a compression algorithm fast enough to squeeze it in there. |
That's a really clever solution! 👍🏻 |
Hi @IanSB I've finally gotten around to updating this project - will take a look at some of your suggestions regarding the jitters. |
I've implemented the simultaneous PIO state machine start thanks. Will review the horizontal dot frequency as reducing the value I put in leads to a loss of sync. I suspect that's more down to running it on a breadboard. Will review that when the PCB comes in. |
I've been working on this vintage computer HDMI upscaler project for the Pi Zero:
https://github.com/IanSB/RGBtoHDMI/wiki
This takes up to 12 bpp digital inputs + sync and I was looking at sharpie7's test pattern generator fork of your project and it seems like it should be possible to modify your design for 16bpp support as I want to generate at least 12bpp digital test patterns for testing RGBtoHDMI boards.
Would it be possible to change this for 16bpp support and separate H & V syncs or are there any underlying bandwidth limitations etc?
The text was updated successfully, but these errors were encountered: