Hey friends,
So I have been working on my video generation circuit for monochrome PAL.
Basically I have a few counters, one for counting the line number and another for counting the column number.
To find VSYNC, I then use some logic gates to find when the line is either 1, 2 or 3, and when it is, then the final signal is made low.
I do the same for horizontal sync, but I count columns instead, and if the column is either 1 or 2, then HSYNC is made low.
However I am having some problems. When I look at the output on my scope, I find the signals, and VSYNC seems ok, however HSYNC is unstable, and it doesnt show properly, the part that should be high shows on the scope and both high and low. it seems the scope cant work out what it is, however the scope is 100MHZ and my signal is just 15KHz.
I think this is due to the fact that this circuit is asynchronous in that I am using logic gates to compare the counter outputs and immediately use that as the final SYNC signal. Is his the problem?
Whenever the counter changes, then the logic gates will obviously start oscillating like crazy, and then stabilize, however on the scope it just shows as a mess of signals.
What should I do? Should I use flip flops to record the signals before using them ? If I use the column counter clock (2us) for the flip flop, and so at each clock edge, after the gates have worked out the output, I clock the result into the flip flop and use that. But won't the flip flop oscillate in between either? Maybe it shouldnt since a flip flop is really a more sophisticated Latch, and hence if the result is the same between clocks then the output will be stable.
Please help and thank you!
So I have been working on my video generation circuit for monochrome PAL.
Basically I have a few counters, one for counting the line number and another for counting the column number.
To find VSYNC, I then use some logic gates to find when the line is either 1, 2 or 3, and when it is, then the final signal is made low.
I do the same for horizontal sync, but I count columns instead, and if the column is either 1 or 2, then HSYNC is made low.
However I am having some problems. When I look at the output on my scope, I find the signals, and VSYNC seems ok, however HSYNC is unstable, and it doesnt show properly, the part that should be high shows on the scope and both high and low. it seems the scope cant work out what it is, however the scope is 100MHZ and my signal is just 15KHz.
I think this is due to the fact that this circuit is asynchronous in that I am using logic gates to compare the counter outputs and immediately use that as the final SYNC signal. Is his the problem?
Whenever the counter changes, then the logic gates will obviously start oscillating like crazy, and then stabilize, however on the scope it just shows as a mess of signals.
What should I do? Should I use flip flops to record the signals before using them ? If I use the column counter clock (2us) for the flip flop, and so at each clock edge, after the gates have worked out the output, I clock the result into the flip flop and use that. But won't the flip flop oscillate in between either? Maybe it shouldnt since a flip flop is really a more sophisticated Latch, and hence if the result is the same between clocks then the output will be stable.
Please help and thank you!