Lucas Murray ME 305 Portfolio
|
A motor driver class for the DRV8847 driver from TI. More...
Public Member Functions | |
def | __init__ (self, timNum) |
Initializes and returns a driver object. More... | |
def | enable (self) |
Brings the driver out of sleep mode. More... | |
def | disable (self) |
Puts the driver in sleep mode. | |
def | faultCB (self, IRQ_src) |
Callback function to run on fault condition. More... | |
def | motor (self, pinIn1, pinIn2, chA, chB) |
Creates a DC motor object connected to the driver. More... | |
Public Attributes | |
timPWM | |
nSleep | |
nFault | |
faultInt | |
A motor driver class for the DRV8847 driver from TI.
Objects of this class can be used to configure the DRV8847 motor driver and to create one or more objects of the Motor class which can be used to perform motor control.
Refer to the DRV8847 datasheet here: https://www.ti.com/lit/ds/symlink/drv8847.pdf
def driver.DRV8847.__init__ | ( | self, | |
timNum | |||
) |
Initializes and returns a driver object.
timNum | the timer number for the pins being used |
def driver.DRV8847.enable | ( | self | ) |
Brings the driver out of sleep mode.
To bring the driver out of sleep mode without causing a fault, the fault pin is disabled for 50 microseconds while it turns on
def driver.DRV8847.faultCB | ( | self, | |
IRQ_src | |||
) |
Callback function to run on fault condition.
IRQ_src | The source of the interrupt request. |
def driver.DRV8847.motor | ( | self, | |
pinIn1, | |||
pinIn2, | |||
chA, | |||
chB | |||
) |
Creates a DC motor object connected to the driver.
pinIn1 | The first pin associated with the motor |
pinIn2 | The second pin associated with the motor |
chA | The first channel associated with the motor |
chB | The second channel associated with the motor |