updated adoo10.py for RAM mode frequency control

This commit is contained in:
Garrett 2019-11-05 14:54:20 -06:00 committed by Robert Jördens
parent fd7081830c
commit 61ca46ec3f

View File

@ -345,7 +345,8 @@ class AD9910:
@kernel @kernel
def set_cfr1(self, power_down=0b0000, phase_autoclear=0, def set_cfr1(self, power_down=0b0000, phase_autoclear=0,
drg_load_lrr=0, drg_autoclear=0, drg_load_lrr=0, drg_autoclear=0,
internal_profile=0, ram_destination=0, ram_enable=0): internal_profile=0, ram_destination=0, ram_enable=0,
manual_osk_external=0, osk_enable=0, select_auto_osk=0):
"""Set CFR1. See the AD9910 datasheet for parameter meanings. """Set CFR1. See the AD9910 datasheet for parameter meanings.
This method does not pulse IO_UPDATE. This method does not pulse IO_UPDATE.
@ -363,10 +364,13 @@ class AD9910:
self.write32(_AD9910_REG_CFR1, self.write32(_AD9910_REG_CFR1,
(ram_enable << 31) | (ram_enable << 31) |
(ram_destination << 29) | (ram_destination << 29) |
(manual_osk_external << 23) |
(internal_profile << 17) | (internal_profile << 17) |
(drg_load_lrr << 15) | (drg_load_lrr << 15) |
(drg_autoclear << 14) | (drg_autoclear << 14) |
(phase_autoclear << 13) | (phase_autoclear << 13) |
(osk_enable << 9) |
(select_auto_osk << 8) |
(power_down << 4) | (power_down << 4) |
2) # SDIO input only, MSB first 2) # SDIO input only, MSB first
@ -526,7 +530,7 @@ class AD9910:
@kernel @kernel
def set_asf(self, asf): def set_asf(self, asf):
self.write32(_AD9910_REG_ASF, asf) self.write32(_AD9910_REG_ASF, asf<<2)
@kernel @kernel
def set_pow(self, pow_): def set_pow(self, pow_):