Пример #1
0
import hipster_spi as h
import configure_si5338 as c

verbose = True
# restore HIPSTER SPI programming to default
if (verbose): print "Loading SPI map into HIPSTER"
h.restoreSpiMapToDefault()
if (verbose): print "Configuring HIPSTER"

# powerdown TX and ADCs
h.powerDownAllTXs()
h.powerDownAllADCs()

# configure HIPSTER to observe feedback divider
h.setBitInRegister(19,0)

# set HIPSTER biasing
h.setBias("MASTER",7)
h.setBias("CML",6)

# configure SI5338 clock chip
if (verbose): print "Configuring Si5338 Clock Chip"
c.configureSi5338("RegisterMap.txt")

# configure and lock PLL
# (not needed for external clock)
#h.setBiasPLL(12)  # CP current
#h.writeRegister(16,0x00b6)  # C1
#h.writeRegister(17,0x0001)  # C2
#h.setBitInRegister(18,6)  # R1 bit 2
#h.clearBitInRegister(18,5)  # R1 bit 1
Пример #2
0
# restore HIPSTER SPI programming to default
if (verbose): print "Loading SPI map into HIPSTER"
h.restoreSpiMapToDefault()
if (verbose): print "Configuring HIPSTER"

h.enableDACs()
h.setDACsToDefaults()
h.setADC2(1.4)

# powerdown TX and ADCs (expect ADC 0)
h.powerDownAllTXs()
h.powerDownAllADCs()
h.powerUpADC(0)

# configure HIPSTER to observe feedback divider
h.setBitInRegister(19,0)


# set HIPSTER biasing
h.setBias("MASTER",7)
h.setBias("CML",5)

# power down internal BGR
#h.setBitInRegister(22,6)


# configure SI5338 clock chip
if (verbose): print "Configuring Si5338 Clock Chip"
c.configureSi5338("RegisterMap_ADC.txt")

# configure and lock PLL