forked from M-Labs/nix-servo
disable calibration and 1V ref
This commit is contained in:
parent
9e34cd9dff
commit
0f628aecc7
|
@ -58,7 +58,7 @@ def check_version(spi):
|
||||||
def configure_dac(spi):
|
def configure_dac(spi):
|
||||||
power_down_reg = spi_read(spi, 0x01)
|
power_down_reg = spi_read(spi, 0x01)
|
||||||
spi_write(spi, 0x01, power_down_reg & ~(1 << 0)) # Clear EXTREF bit for internal reference
|
spi_write(spi, 0x01, power_down_reg & ~(1 << 0)) # Clear EXTREF bit for internal reference
|
||||||
spi_write(spi, 0x0D, 0x00) # Set RREF to 10 kΩ for 1.0V reference
|
# spi_write(spi, 0x0D, 0x00) # Set RREF to 10 kΩ for 1.0V reference
|
||||||
spi_write(spi, 0x04, 0xA0) # Enable on-chip IRSET (1.6 kΩ for 20mA output)
|
spi_write(spi, 0x04, 0xA0) # Enable on-chip IRSET (1.6 kΩ for 20mA output)
|
||||||
spi_write(spi, 0x07, 0xA0) # Enable on-chip QRSET (1.6 kΩ for 20mA output)
|
spi_write(spi, 0x07, 0xA0) # Enable on-chip QRSET (1.6 kΩ for 20mA output)
|
||||||
spi_write(spi, 0x05, 0x00) # Disable internal IRCML
|
spi_write(spi, 0x05, 0x00) # Disable internal IRCML
|
||||||
|
@ -125,7 +125,7 @@ def configure_ad9117():
|
||||||
return False
|
return False
|
||||||
|
|
||||||
configure_dac(spi)
|
configure_dac(spi)
|
||||||
dac_self_calibration(spi)
|
# dac_self_calibration(spi)
|
||||||
|
|
||||||
# Enable DAC outputs
|
# Enable DAC outputs
|
||||||
spi_write(spi, 0x01, spi_read(spi, 0x01) & ~((1 << 4) | (1 << 3)))
|
spi_write(spi, 0x01, spi_read(spi, 0x01) & ~((1 << 4) | (1 << 3)))
|
||||||
|
|
Loading…
Reference in New Issue