Skip to content

Fix multisynth divider range #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 31, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions adafruit_si5351.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def configure_integer(self, pll, divider):
divider. This is the most accurate way to set the clock output
frequency but supports less of a range of values.
"""
assert 3 < divider < 901
assert 3 < divider < 2049
divider = int(divider)
# Make sure the PLL is configured (has a frequency set).
assert pll.frequency is not None
Expand All @@ -331,7 +331,7 @@ def configure_fractional(self, pll, divider, numerator, denominator):
fractional divider with numerator/denominator. Again this is less
accurate but has a wider range of output frequencies.
"""
assert 3 < divider < 901
assert 3 < divider < 2049
assert 0 < denominator <= 0xFFFFF # Prevent divide by zero.
assert 0 <= numerator < 0xFFFFF
divider = int(divider)
Expand Down