There's something a bit strange happening with the updated COLTEST program. Once I've selected a genlock mode, if I then switch between modes I eventually get into a position where the screen goes blank (sometimes the monitor will complain with an 'Input not supported' message). Once this happens, even switching back to mode 0 (genlock off) doesn't work, and I need to reset the Pico and reboot the Atom to get the screen working again.hoglet wrote: ↑Sat Mar 04, 2023 1:32 pm I've done a bit more work on the genlock code:
- refactored the code so the bulk of the genlock implementation is in it's own source file
- defined an common interface for genlock implementations
- updated the GENLOCK N command to allow switching between implementions at run time
- replaced the adhoc control code with a properly designed "PD control" based algorithm
<---SNIP--->
The different genlock implementations (selected by the GENLOCK command) are:
- N=0 is genlock off
- N=1 is genlock on, by varying CLKDIV (780ppm step size)
- N=2 is genlock on, by variying HTOTAL (125ppm step size)
- N=3 is genlock on, by varying VTOTAL (1900ppm step size)
<---SNIP--->
Ken, it's possibly worth you retesting the N=2 mode, as the implementation is now a bit better. You may still need to manually tweak CLOCK and PHASE on monitor.
There is also a GENDEBUG <0|1> command that enables/disables debugging to the serial port.
And here's an updated COLTEST program which uses the 0,1,2 and 3 keys to change between modes
But, anyway, when it does work...
N=1: I get the usual shimmer / wobble. Adjusting CLOCK of PHASE doesn't seem to make any difference.
N=2: Adjusting the monitor CLOCK setting to 52 and pulling the PHASE setting down very low (below about 5) seems to have nailed it! Rock solid on the Lenovo. I'm now wondering if I haven't been aggressive enough with the PHASE setting previously!
N=3: Produces an up / down wobble by one or two pixel lines.
Hopefully there's nothing more to do! I've got my updated PCB on order, that has both HSYCN & VSYNC available to the Pico, so that might give us some more options, if needed?