The 'BD65496MUV' Library
Public Types | Public Member Functions | List of all members
BD65496MUV Class Reference

The main class of the Arduino library for the BD65496MUV Single Brushed DC Motor Driver. More...

#include <BD65496MUV.h>

Public Types

enum  DriverMode { Speed_n_Dir, H_Bridge }
 
enum  PowerMode { Running, Standby }
 
enum  SwitchingSpeed { On150_Off50, On250_Off70, On350_Off90, On500_Off110 }
 
enum  ShortBreakMode { On, Off }
 

Public Member Functions

 BD65496MUV (uint8_t pinInA, uint8_t pinInB, uint8_t pinPwmMode, DriverMode driverMode=DriverMode::Speed_n_Dir)
 Constructor of the BD65496MUV class with the pwm mode pin. More...
 
 BD65496MUV (uint8_t pinInA, uint8_t pinInB, DriverMode driverMode=DriverMode::Speed_n_Dir, bool pinPwmModeDefined=false, uint8_t pinPwmMode=0, bool pinPsDefined=false, uint8_t pinPs=0, PowerMode powerMode=PowerMode::Running, bool pinTrDefined=false, uint8_t pinTr1=0, uint8_t pinTr2=0, SwitchingSpeed switchingSpeed=SwitchingSpeed::On150_Off50, ShortBreakMode shortBreakMode=ShortBreakMode::Off)
 Constructor of the BD65496MUV class with all pins (Pro-Mode). More...
 
void setSpeed (int16_t speed)
 Set the speed of the motor. More...
 
int16_t getSpeed ()
 Get the speed of the moter. More...
 
void setDriverMode (DriverMode driverMode)
 Set the driver mode of the driver. More...
 
DriverMode getDriverMode ()
 Get the dirver mdoe of the driver. More...
 
void setPowerMode (PowerMode powerMode)
 Set the power mode of the driver. More...
 
PowerMode getPowerMode ()
 Get the power mode of the driver. More...
 
void setSwitchingSpeed (SwitchingSpeed switchingSpeed)
 Set the switching speed of the driver. More...
 
SwitchingSpeed getSwitchingSpeed ()
 Get the switching speed of the driver. More...
 
void setShortBreakMode (ShortBreakMode shortBreakMode)
 Set the short break mode of the driver. More...
 
ShortBreakMode getShortBreakMode ()
 Get the short break mode of the dirver. More...
 
uint16_t getVersion ()
 Get the version of the library. More...
 

Detailed Description

The main class of the Arduino library for the BD65496MUV Single Brushed DC Motor Driver.

Constructor & Destructor Documentation

◆ BD65496MUV() [1/2]

BD65496MUV::BD65496MUV ( uint8_t  pinInA,
uint8_t  pinInB,
uint8_t  pinPwmMode,
DriverMode  driverMode = DriverMode::Speed_n_Dir 
)

Constructor of the BD65496MUV class with the pwm mode pin.

Parameters
driverModeThe driver mode of the driver (Speed_n_Dir or H_Bridge).
pinInAThe pin number to which the INA pin is connected.
pinInBThe pin number to which the INB pin is connected.
pinPwmModeThe pin number to wicht the pmw mode pin is connected.

◆ BD65496MUV() [2/2]

BD65496MUV::BD65496MUV ( uint8_t  pinInA,
uint8_t  pinInB,
DriverMode  driverMode = DriverMode::Speed_n_Dir,
bool  pinPwmModeDefined = false,
uint8_t  pinPwmMode = 0,
bool  pinPsDefined = false,
uint8_t  pinPs = 0,
PowerMode  powerMode = PowerMode::Running,
bool  pinTrDefined = false,
uint8_t  pinTr1 = 0,
uint8_t  pinTr2 = 0,
SwitchingSpeed  switchingSpeed = SwitchingSpeed::On150_Off50,
ShortBreakMode  shortBreakMode = ShortBreakMode::Off 
)

Constructor of the BD65496MUV class with all pins (Pro-Mode).

Parameters
driverModeThe driver mode of the driver (Speed_n_Dir or H_Bridge).
pinInAThe pin number to which the INA pin is connected.
pinInBThe pin number to which the INB pin is connected.
pinPwmModeDefinedFlag that defines if the pwm mode pin is connected.
pinPwmModeThe pin number to which the pmw mode pin is connected.
pinPsDefinedFlag that defines if the PS pin is connected.
pinPsThe pin number to which the PS pin is connected.
powerModeThe power mode of the driver (Running or Standby).
pinTrDefinedFlag that defines if the TR pins are connected.
pinTr1The pin number to which the TR1 pin is connected.
pinTr2The pin number to which the TR2 pin is connected.
On150_Off50The switching speed of the driver (On150_Off50, On250_Off70, On350_Off90, On500_Off110).
shortBreakModeThe short break mode of the driver (On or Off).

Member Function Documentation

◆ setSpeed()

void BD65496MUV::setSpeed ( int16_t  speed)

Set the speed of the motor.

Parameters
speedThe speed of the motor (from -255 to 255).

◆ getSpeed()

int16_t BD65496MUV::getSpeed ( )

Get the speed of the moter.

Returns
The current speed of the motor.

◆ setDriverMode()

void BD65496MUV::setDriverMode ( BD65496MUV::DriverMode  driverMode)

Set the driver mode of the driver.

Parameters
driverModeThe driver mode (Speed_n_Dir or H_Bridge).

◆ getDriverMode()

BD65496MUV::DriverMode BD65496MUV::getDriverMode ( )

Get the dirver mdoe of the driver.

Returns
The current driver mode of the driver.

◆ setPowerMode()

void BD65496MUV::setPowerMode ( BD65496MUV::PowerMode  powerMode)

Set the power mode of the driver.

Parameters
powerModeThe power mode (Running or Standby).

◆ getPowerMode()

BD65496MUV::PowerMode BD65496MUV::getPowerMode ( )

Get the power mode of the driver.

Returns
The current power mode of the driver.

◆ setSwitchingSpeed()

void BD65496MUV::setSwitchingSpeed ( BD65496MUV::SwitchingSpeed  switchingSpeed)

Set the switching speed of the driver.

Parameters
switchingSpeedThe switching speed (On150_Off50, On250_Off70, On350_Off90, On500_Off110).

◆ getSwitchingSpeed()

BD65496MUV::SwitchingSpeed BD65496MUV::getSwitchingSpeed ( )

Get the switching speed of the driver.

Returns
The current switching speed of the driver.

◆ setShortBreakMode()

void BD65496MUV::setShortBreakMode ( BD65496MUV::ShortBreakMode  shortBreakMode)

Set the short break mode of the driver.

Parameters
shortBreakModeThe short break mode (On or Off).

◆ getShortBreakMode()

BD65496MUV::ShortBreakMode BD65496MUV::getShortBreakMode ( )

Get the short break mode of the dirver.

Returns
The current short break mode of the driver.

◆ getVersion()

uint16_t BD65496MUV::getVersion ( )

Get the version of the library.

Returns
The current version of the library.

The documentation for this class was generated from the following files: