test07d
modified:
- Simplified char ROM code/logic.
- Added support for hex digits to char ROM.
- Counter is now 6 digits: Lowest 2 count frames 0..63 in hex; next 3 are decimal and tick over every 64 frames; highest is a continuation, but counts in hex. Hence, highest reading can be
F9993F
before it rolls over to000000
. - How close can we get to 64Hz with our current clock? Take 25MHz, divide by 64, and then divide by these horizontal values to get close to good vertical values:
Divide by... ...lines ...rounded Hz 772 505.99 63.9989Hz 775 504.03 64.0041Hz 789 495.09 64.0115Hz 786 496.98 63.9972Hz - Should try using a flexible carry-based BCD counter: https://www.element14.com/community/groups/fpga-group/blog/2014/10/12/seven-segment-bcd-counter-using-the-valentfx-logi-edu
- Check out:
- https://allaboutfpga.com/sequence-detector-using-mealy-and-moore-state-machine-vhdl-codes/
- https://zipcpu.com/dsp/2017/12/14/logic-pll.html
- https://zipcpu.com/tutorial/
- https://hackaday.com/2015/06/15/hackaday-prize-entry-an-open-source-graphics-card/ and https://hackaday.io/project/6309-vga-graphics-over-spi-and-serial-vgatonic
- https://hackaday.io/project/841-teaching-fpga-parallel-computing?utm_source=hackaday&utm_medium=hacklet&utm_campaign=28
- https://hackaday.io/project/1943-vgatonic and https://github.com/dqydj/VGAtonic
- http://pldworld.org/html/technote/intro.cpld.fpga.design.pdf
NOTE: With my little old TFT monitor, I successfully tweaked the timing to use a line timing of 772 "dots" and a frame timing of 506 lines. This makes the monitor sync at ~63.99Hz, and still correctly show the 640x480 image. As a result, the counter remains very closely in sync with my iPhone stopwatch, second by second.
I have since changed the code back to use normal 640x480 @60Hz timing.
Project ideas for next test:
- Move a cursor on the screen in X and Y. Left button increments X, right button increments Y, both have wrap-around.
- Simulate acceleration and deceleration using inertia counters.
- Keyboard or keypad input, or even RS-232, to make things more interesting.
- Interfacing with SRAM for video bitmap image.