14-03-2017, 10:10 PM
I'll cover this in more detail tomorrow but the main concept you need is a Numerically Controlled Oscillator: https://en.wikipedia.org/wiki/Numericall...oscillator Sometimes called a DTO (Discrete TIme Oscillator). This is definitely beyond beginner's level but isn't too hard to understand for the purposes we'll be using it for. You don't need to worry about spurii etc as shown in that wiki article. DTOs are amazingly useful in digital design and have a specific application in standards conversion.
An adder and register, used as an accumulator, can perform arbitrary frequency division by non-integer values. For N bits the division ratio is K/(2^N) where K is the coefficient that you're adding at each clock cycle. There's also a slightly more complex method of doing X/Y division where Y isn't a power of 2 but we don't need that here. Here's a clue. 405/625 can be more than adequately approximated with a simple DTO. You can get both the line number as an integer and the fractional part which tells you how near the output line is to an input line. That fractional part drives the interpolator. Incidentally, if you vary the coefficient that will adjust the height of the output picture - you've just made part of a zoom machine
Tomorrow I'll post samples of code from my own 625 to 405 converter showing how all this works in practice.
An adder and register, used as an accumulator, can perform arbitrary frequency division by non-integer values. For N bits the division ratio is K/(2^N) where K is the coefficient that you're adding at each clock cycle. There's also a slightly more complex method of doing X/Y division where Y isn't a power of 2 but we don't need that here. Here's a clue. 405/625 can be more than adequately approximated with a simple DTO. You can get both the line number as an integer and the fractional part which tells you how near the output line is to an input line. That fractional part drives the interpolator. Incidentally, if you vary the coefficient that will adjust the height of the output picture - you've just made part of a zoom machine
Tomorrow I'll post samples of code from my own 625 to 405 converter showing how all this works in practice.