Counting Time 2

Precision timing: Build a timer that beats rounding errors!

DESCRIPTION:
NOTE: You should have solved the counting_time_1 problem before attempting this

As you might have observed in the last problem, using a simple counter based divider approach gives good results with very little logic but is not very accurate.

The rate accuracy of the timer is heavily dependent upon the exact values of the system clock and required output clock.

This is bad news because the system clock is not something that can be tweaked around for the sake of a more accurate timer. Nor can the output rate be changed if you want to ensure interoperability with third party devices who can only talk at standard baud rates.

Forget UART, what if there is a different application for which you need a clock of precisely 12345.678 Hz with a tolerance of < 2 Hz? Can the previous circuit achieve this?

In this problem we shall attempt to significantly improve the accuracy of our timer.

Loading the interactive workspace...