I finally got the Clock Gen Click library to work in my MikroBasic Project.
This is the click board that uses the Si5351a chip.
The demo example for my PIC18F45K22, the one that comes installed on my Easy Pic 7 Pro board, works great.
I see the frequencies changing with the following code:
Code: Select all
'Set Frequency to 5Mhz
clockgen_set_frequency(CLOCKGEN_CLOCK_0, CLOCKGEN_PLLA, 5)
Delay_ms(1000)
But why was the clockgen_set_frequency written to only accept LongWord Integer values??? If I want say 3.315 Mhz, I cannot use this procedure! I do not wish to use the other functions to and have to manually calculate all the frequency values, then send writes to the Si5351a. It looks as if I am forced to do this.
I realize that the author got us most of the way there, but the math is ugly and If the author could provide an alternative example, like setting the frequency to 3.315 Mhz, I would greatly appreciate it!
thanks
Jeff