Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #define E4K_FVCO_MIN_KHZ 2600000 /* 2.6 GHz */
- #define E4K_FVCO_MAX_KHZ 3900000 /* 3.9 GHz */
- int main() {
- /* \brief table of R dividers in case 3phase mixing is enabled,
- * the values have to be halved if it's 2phase */
- static const unsigned int vco_r_table_3ph[] = {
- 4, 8, 12, 16, 24, 32, 40, 48
- };
- unsigned long min_freq, max_freq;
- int i;
- printf("Calculating 2phase frequencies\n");
- for(i=0; i < 8 /*sizeof(vco_r_table_3ph)*/; i++) {
- min_freq = E4K_FVCO_MIN_KHZ * 1000UL / (vco_r_table_3ph[i]/2);
- max_freq = E4K_FVCO_MAX_KHZ * 1000UL / (vco_r_table_3ph[i]/2);
- printf("Divider %d: min=%ld Hz max=%ld Hz\n", vco_r_table_3ph[i]/2, min_freq, max_freq);
- }
- printf("\nCalculating 3phase frequencies\n");
- for(i=0; i < 8 /*sizeof(vco_r_table_3ph)*/; i++) {
- min_freq = E4K_FVCO_MIN_KHZ * 1000UL / vco_r_table_3ph[i];
- max_freq = E4K_FVCO_MAX_KHZ * 1000UL / vco_r_table_3ph[i];
- printf("Divider %d: min=%ld Hz max=%ld Hz\n", vco_r_table_3ph[i], min_freq, max_freq);
- }
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement