Re: DIY R-2R DAC: πειρασμός, όχι αστεία...
Ας το πάρουμε από λίγο πιο πίσω. Το Soekris χρησιμοποιεί για ρολόι το γνωστό προγραμματιζόμενο ρολόι Si514 (0.8pS RMS jitter). Τη συχνότητα λειτουργίας του την ορίζει ο μικροελεγκτής του DAC (STM32) με βάση το εισερχόμενο σήμα. Δηλαδή διαβάζει το εισερχόμενο clock και συγχρονίζεται σε αυτό. Συγκεκριμένα λειτουργεί έτσι:
When not locked, the DAC's FPGA/uC will measure the input clock at very short intervals, until something in a standard sample rate show up.
It will then measure the clock over a little longer time, using that result to program the clock oscillator.
Set FIFO at half full, then open up for audio output.
It will continued to measure input clock over longer time, using that to make small adjustments as needed, the Si514 can be adjusted +-1000 ppm glitchless.
If clock goes out of large range for short period, or smaller range over longer time, the audio will be muted and DAC declared not locked.
FIFO will take up any slack insuring no jitter. If input clock is long term stable then adjustments will be very few and very small.
Reclocking FIFO with automatic clock tracking works like a charm, syncronize to < 1ppm at anything withing 1% range, and then tracks using a software PLL with 0.02 Hz Lowpass Filter and with 0.02ppm step changes.
Οπότε δεν υπάρχει κάποιο τσιπάκι (flipflop) το οποίο να κάνει το "κλασικό" reclocking. Γίνεται με πιο σοφιστικέ τρόπο.
Το FIFO που υπάρχει "μαζεύει" τις όποιες μικροαλλαγές στο clock.. Είναι αρκετά μικρό σε χωρητικότητα (δεν θυμάμαι ακριβώς πόσο μικρό, πάντως μπορεί να φτάσει και το 1mS ώστε να υπάρχει ελάχιστο latency).
Στη συνέχεια στο FPGA όλα τα σήματα γίνονται oversample ώστε να οδηγούν το ladder, το οποίο τρέχει πάντα στα ~3.072MHz, πάντα όμως με ζυγό και ακέραιο πολλαπλασιαστή ώστε το αποτέλεσμα να είναι πάντα bit perfect.
Π.χ. τα 48KHz γίνονται oversample 64 φορές ενώ τα 384KHz γίνονται μόνο x8.