I’ve been playing around with the original Alchitry Cu board and I have a project in mind for generating an NTSC compatible color video signal. This requires the circuitry to run at a multiple of the NTSC colorburst frequency (~3.5795 MHz). I’m targeting a frequency of 8 times that number, 28.636 MHz. I’ve run the icepll tool but am unable to find any values that will generate any precise multiple of the colorburst frequency with the PLL and onboard 100 MHz clock.
Can I just connect an external 28.636 MHz oscillator to one of the Cu’s IO pins and use it as the FPGA clock source? Are there any special considerations I would need to take with this approach, or is there a better way to do what I’m trying to do?
You can hook up an external clock. For something like this, that’s probably your best bet. The clock signal should be a 3.3V square wave and not just a crystal.
See this doc. You will want to use one of the pins that has the GCLK label on it. These are clock capable inputs that allow the signal to be routed efficiently though the whole FPGA.
Thanks for the response. I’ll try the external clock approach. It looks like the document you’ve linked requires approved access. Can you approve my access request when you get the chance?
Using external clock sources is probably a good exercise in itself, but I just wanted to point out that you should be able to synthesize a very reasonable waveform at any frequency as long as you have a high enough sample rate and some memory + DAC. I successfully produced NTSC color video using a microcontroller that was DMA:ing data out at about 12 MHz and I just used a precalculated single-period sine wave (I think with 64 steps) that got stepped through using fixed-point math. Essentially figure out the required delta to add each clock cycle and index your waveform buffer using some of the MSBs of that counter such that it wraps at the desired frequency. At 100 MHz it should be much smoother and require less fiddling with analog filters to hide the DAC steps. I plan to try this myself with the Au V2 soonish…