Rev 4734 Rev 4735
Line 85... Line 85...
85 spi.SPI_write_byte(self.CS, 0x10) 85 spi.SPI_write_byte(self.CS, 0x10)
86 spi.SPI_write_byte(self.CS, 0x06) # DEC 86 spi.SPI_write_byte(self.CS, 0x06) # DEC
87 spi.SPI_write_byte(self.CS, 0x00) 87 spi.SPI_write_byte(self.CS, 0x00)
88 spi.SPI_write_byte(self.CS, 0x10) 88 spi.SPI_write_byte(self.CS, 0x10)
89 spi.SPI_write_byte(self.CS, self.L6470_KVAL_RUN) # KVAL_RUN 89 spi.SPI_write_byte(self.CS, self.L6470_KVAL_RUN) # KVAL_RUN
90 spi.SPI_write_byte(self.CS, 0xF8) 90 spi.SPI_write_byte(self.CS, 0x58)
91 spi.SPI_write_byte(self.CS, self.L6470_KVAL_ACC) # KVAL_ACC 91 spi.SPI_write_byte(self.CS, self.L6470_KVAL_ACC) # KVAL_ACC
92 spi.SPI_write_byte(self.CS, 0xF8) 92 spi.SPI_write_byte(self.CS, 0x58)
93 spi.SPI_write_byte(self.CS, self.L6470_KVAL_DEC) # KVAL_DEC 93 spi.SPI_write_byte(self.CS, self.L6470_KVAL_DEC) # KVAL_DEC
94 spi.SPI_write_byte(self.CS, 0xF8) 94 spi.SPI_write_byte(self.CS, 0x58)
95 spi.SPI_write_byte(self.CS, 0x18) # CONFIG 95 spi.SPI_write_byte(self.CS, 0x18) # CONFIG
96 spi.SPI_write_byte(self.CS, 0b00101110) 96 spi.SPI_write_byte(self.CS, 0b00101110)
97 spi.SPI_write_byte(self.CS, 0b10001000) 97 spi.SPI_write_byte(self.CS, 0b10000110)
98 self.MaxSpeed(self.maxspeed) 98 self.MaxSpeed(self.maxspeed)
99   99  
100 def setKVAL(self, hold = 0.5, run = 0.5, acc = 0.5, dec = 0.5): 100 def setKVAL(self, hold = 0.5, run = 0.5, acc = 0.5, dec = 0.5):
101 """ The available range is from 0 to 0.996 x VS with a resolution of 0.004 x VS """ 101 """ The available range is from 0 to 0.996 x VS with a resolution of 0.004 x VS """
102   102