dcmotor12 2.1.0.0
DC Motor 12 Registers Settings

Settings for registers of DC Motor 12 Click driver. More...

Macros

#define DCMOTOR12_CONFIG12_OPEN_LOAD_NOP_100US   0x000000ul
 DC Motor 12 CONFIG1/2 register settings.
 
#define DCMOTOR12_CONFIG12_OPEN_LOAD_NOP_50US   0x002000ul
 
#define DCMOTOR12_CONFIG12_OPEN_LOAD_NOP_500US   0x004000ul
 
#define DCMOTOR12_CONFIG12_OPEN_LOAD_NOP_MASK   0x006000ul
 
#define DCMOTOR12_CONFIG12_DUTY_OFF_LOW_SIDE   0x000000ul
 
#define DCMOTOR12_CONFIG12_DUTY_OFF_HIGH_SIDE   0x001000ul
 
#define DCMOTOR12_CONFIG12_DUTY_OFF_MASK   0x001000ul
 
#define DCMOTOR12_CONFIG12_VBAT_UVC_0US   0x000000ul
 
#define DCMOTOR12_CONFIG12_VBAT_UVC_100US   0x000800ul
 
#define DCMOTOR12_CONFIG12_VBAT_UVC_MASK   0x000800ul
 
#define DCMOTOR12_CONFIG12_CLIMIT_UP_6p5A   0x000000ul
 
#define DCMOTOR12_CONFIG12_CLIMIT_UP_4p6A   0x000400ul
 
#define DCMOTOR12_CONFIG12_CLIMIT_UP_MASK   0x000400ul
 
#define DCMOTOR12_CONFIG12_CLIMIT_LOW_0p25A   0x000000ul
 
#define DCMOTOR12_CONFIG12_CLIMIT_LOW_0p25A   0x000000ul
 
#define DCMOTOR12_CONFIG12_CLIMIT_LOW_0p5A   0x000200ul
 
#define DCMOTOR12_CONFIG12_CLIMIT_LOW_0p5A   0x000200ul
 
#define DCMOTOR12_CONFIG12_CLIMIT_LOW_MASK   0x000200ul
 
#define DCMOTOR12_CONFIG12_OPEN_LOAD_OP_200mA   0x000000ul
 
#define DCMOTOR12_CONFIG12_OPEN_LOAD_OP_100mA   0x000080ul
 
#define DCMOTOR12_CONFIG12_OPEN_LOAD_OP_300mA   0x000100ul
 
#define DCMOTOR12_CONFIG12_OPEN_LOAD_OP_MASK   0x000180ul
 
#define DCMOTOR12_CONFIG12_SR_MODE_NORMAL   0x000000ul
 
#define DCMOTOR12_CONFIG12_SR_MODE_SLOW1   0x000010ul
 
#define DCMOTOR12_CONFIG12_SR_MODE_SLOW2   0x000020ul
 
#define DCMOTOR12_CONFIG12_SR_MODE_SLOW3   0x000030ul
 
#define DCMOTOR12_CONFIG12_SR_MODE_SLOW4   0x000040ul
 
#define DCMOTOR12_CONFIG12_SR_MODE_FAST2   0x000050ul
 
#define DCMOTOR12_CONFIG12_SR_MODE_FAST1   0x000060ul
 
#define DCMOTOR12_CONFIG12_SR_MODE_MASK   0x000070ul
 
#define DCMOTOR12_CONFIG12_OC_LATCH   0x000000ul
 
#define DCMOTOR12_CONFIG12_OC_LATCH   0x000000ul
 
#define DCMOTOR12_CONFIG12_OC_AUTO   0x000008ul
 
#define DCMOTOR12_CONFIG12_OC_AUTO   0x000008ul
 
#define DCMOTOR12_CONFIG12_OC_MASK   0x000008ul
 
#define DCMOTOR12_CONFIG12_SPI_DISR_10mS   0x000000ul
 
#define DCMOTOR12_CONFIG12_SPI_DISR_100mS   0x000002ul
 
#define DCMOTOR12_CONFIG12_SPI_DISR_1S   0x000004ul
 
#define DCMOTOR12_CONFIG12_SPI_DISR_DISABLE   0x000006ul
 
#define DCMOTOR12_CONFIG12_SPI_DISR_MASK   0x000006ul
 
#define DCMOTOR12_CONFIG12_OPMODE_DISR_OFF   0x000000ul
 
#define DCMOTOR12_CONFIG12_OPMODE_DISR_CONTINUE   0x000001ul
 
#define DCMOTOR12_CONFIG12_OPMODE_DISR_MASK   0x000001ul
 
#define DCMOTOR12_CONFIG56_MOTOR_OPMODE_MAX   3u
 DC Motor 12 CONFIG5/6 register settings.
 
#define DCMOTOR12_CONFIG56_MOTOR_OPMODE_SHIFT   22ul
 
#define DCMOTOR12_CONFIG56_MOTOR_OPMODE_MASK   0xC00000ul
 
#define DCMOTOR12_CONFIG56_DRV_FREQ_MAX   2047u
 
#define DCMOTOR12_CONFIG56_DRV_FREQ_SHIFT   11ul
 
#define DCMOTOR12_CONFIG56_DRV_FREQ_MASK   0x3FF800ul
 
#define DCMOTOR12_CONFIG56_DUTY_PERIOD_MAX   2047u
 
#define DCMOTOR12_CONFIG56_DUTY_PERIOD_SHIFT   0ul
 
#define DCMOTOR12_CONFIG56_DUTY_PERIOD_MASK   0x0007FFul
 
#define DCMOTOR12_DIAG1_PIN   0x01
 DC Motor 12 PCA9538A pin mask.
 
#define DCMOTOR12_DIAG2_PIN   0x02
 
#define DCMOTOR12_EN1_PIN   0x04
 
#define DCMOTOR12_EN2_PIN   0x08
 
#define DCMOTOR12_CM_SEL_PIN   0x10
 
#define DCMOTOR12_SLP_PIN   0x20
 
#define DCMOTOR12_DEFAULT_CONFIG   0xE3
 DC Motor 12 PCA9538A pin direction config.
 
#define DCMOTOR12_MODE_OUTPUT_OFF   0x00
 DC Motor 12 channel operation mode settings.
 
#define DCMOTOR12_MODE_FORWARD   0x01
 
#define DCMOTOR12_MODE_REVERSE   0x02
 
#define DCMOTOR12_MODE_BRAKE   0x03
 
#define DCMOTOR12_PIN_LOW_LEVEL   0
 DC Motor 12 pin logic level setting.
 
#define DCMOTOR12_PIN_HIGH_LEVEL   1
 
#define DCMOTOR12_VREF_3V3   3.3
 DC Motor 12 ADC setting.
 
#define DCMOTOR12_VREF_5V   5.0
 
#define DCMOTOR12_NUM_CONVERSIONS   5000
 DC Motor 12 current calculation values.
 
#define DCMOTOR12_RSENSE   220.0f
 
#define DCMOTOR12_VOLTAGE_TO_CURRENT   0.00238167f
 
#define DCMOTOR12_DEVICE_ADDRESS_A1A0_00   0x70
 DC Motor 12 device address setting.
 
#define DCMOTOR12_DEVICE_ADDRESS_A1A0_01   0x71
 
#define DCMOTOR12_DEVICE_ADDRESS_A1A0_10   0x72
 
#define DCMOTOR12_DEVICE_ADDRESS_A1A0_11   0x73
 
#define DCMOTOR12_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE
 Data sample selection.
 
#define DCMOTOR12_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE
 

Detailed Description

Settings for registers of DC Motor 12 Click driver.

Macro Definition Documentation

◆ DCMOTOR12_CM_SEL_PIN

#define DCMOTOR12_CM_SEL_PIN   0x10

◆ DCMOTOR12_CONFIG12_CLIMIT_LOW_0p25A [1/2]

#define DCMOTOR12_CONFIG12_CLIMIT_LOW_0p25A   0x000000ul

◆ DCMOTOR12_CONFIG12_CLIMIT_LOW_0p25A [2/2]

#define DCMOTOR12_CONFIG12_CLIMIT_LOW_0p25A   0x000000ul

◆ DCMOTOR12_CONFIG12_CLIMIT_LOW_0p5A [1/2]

#define DCMOTOR12_CONFIG12_CLIMIT_LOW_0p5A   0x000200ul

◆ DCMOTOR12_CONFIG12_CLIMIT_LOW_0p5A [2/2]

#define DCMOTOR12_CONFIG12_CLIMIT_LOW_0p5A   0x000200ul

◆ DCMOTOR12_CONFIG12_CLIMIT_LOW_MASK

#define DCMOTOR12_CONFIG12_CLIMIT_LOW_MASK   0x000200ul

◆ DCMOTOR12_CONFIG12_CLIMIT_UP_4p6A

#define DCMOTOR12_CONFIG12_CLIMIT_UP_4p6A   0x000400ul

◆ DCMOTOR12_CONFIG12_CLIMIT_UP_6p5A

#define DCMOTOR12_CONFIG12_CLIMIT_UP_6p5A   0x000000ul

◆ DCMOTOR12_CONFIG12_CLIMIT_UP_MASK

#define DCMOTOR12_CONFIG12_CLIMIT_UP_MASK   0x000400ul

◆ DCMOTOR12_CONFIG12_DUTY_OFF_HIGH_SIDE

#define DCMOTOR12_CONFIG12_DUTY_OFF_HIGH_SIDE   0x001000ul

◆ DCMOTOR12_CONFIG12_DUTY_OFF_LOW_SIDE

#define DCMOTOR12_CONFIG12_DUTY_OFF_LOW_SIDE   0x000000ul

◆ DCMOTOR12_CONFIG12_DUTY_OFF_MASK

#define DCMOTOR12_CONFIG12_DUTY_OFF_MASK   0x001000ul

◆ DCMOTOR12_CONFIG12_OC_AUTO [1/2]

#define DCMOTOR12_CONFIG12_OC_AUTO   0x000008ul

◆ DCMOTOR12_CONFIG12_OC_AUTO [2/2]

#define DCMOTOR12_CONFIG12_OC_AUTO   0x000008ul

◆ DCMOTOR12_CONFIG12_OC_LATCH [1/2]

#define DCMOTOR12_CONFIG12_OC_LATCH   0x000000ul

◆ DCMOTOR12_CONFIG12_OC_LATCH [2/2]

#define DCMOTOR12_CONFIG12_OC_LATCH   0x000000ul

◆ DCMOTOR12_CONFIG12_OC_MASK

#define DCMOTOR12_CONFIG12_OC_MASK   0x000008ul

◆ DCMOTOR12_CONFIG12_OPEN_LOAD_NOP_100US

#define DCMOTOR12_CONFIG12_OPEN_LOAD_NOP_100US   0x000000ul

DC Motor 12 CONFIG1/2 register settings.

Specified CONFIG1/2 register settings for ADC of DC Motor 12 Click driver.

◆ DCMOTOR12_CONFIG12_OPEN_LOAD_NOP_500US

#define DCMOTOR12_CONFIG12_OPEN_LOAD_NOP_500US   0x004000ul

◆ DCMOTOR12_CONFIG12_OPEN_LOAD_NOP_50US

#define DCMOTOR12_CONFIG12_OPEN_LOAD_NOP_50US   0x002000ul

◆ DCMOTOR12_CONFIG12_OPEN_LOAD_NOP_MASK

#define DCMOTOR12_CONFIG12_OPEN_LOAD_NOP_MASK   0x006000ul

◆ DCMOTOR12_CONFIG12_OPEN_LOAD_OP_100mA

#define DCMOTOR12_CONFIG12_OPEN_LOAD_OP_100mA   0x000080ul

◆ DCMOTOR12_CONFIG12_OPEN_LOAD_OP_200mA

#define DCMOTOR12_CONFIG12_OPEN_LOAD_OP_200mA   0x000000ul

◆ DCMOTOR12_CONFIG12_OPEN_LOAD_OP_300mA

#define DCMOTOR12_CONFIG12_OPEN_LOAD_OP_300mA   0x000100ul

◆ DCMOTOR12_CONFIG12_OPEN_LOAD_OP_MASK

#define DCMOTOR12_CONFIG12_OPEN_LOAD_OP_MASK   0x000180ul

◆ DCMOTOR12_CONFIG12_OPMODE_DISR_CONTINUE

#define DCMOTOR12_CONFIG12_OPMODE_DISR_CONTINUE   0x000001ul

◆ DCMOTOR12_CONFIG12_OPMODE_DISR_MASK

#define DCMOTOR12_CONFIG12_OPMODE_DISR_MASK   0x000001ul

◆ DCMOTOR12_CONFIG12_OPMODE_DISR_OFF

#define DCMOTOR12_CONFIG12_OPMODE_DISR_OFF   0x000000ul

◆ DCMOTOR12_CONFIG12_SPI_DISR_100mS

#define DCMOTOR12_CONFIG12_SPI_DISR_100mS   0x000002ul

◆ DCMOTOR12_CONFIG12_SPI_DISR_10mS

#define DCMOTOR12_CONFIG12_SPI_DISR_10mS   0x000000ul

◆ DCMOTOR12_CONFIG12_SPI_DISR_1S

#define DCMOTOR12_CONFIG12_SPI_DISR_1S   0x000004ul

◆ DCMOTOR12_CONFIG12_SPI_DISR_DISABLE

#define DCMOTOR12_CONFIG12_SPI_DISR_DISABLE   0x000006ul

◆ DCMOTOR12_CONFIG12_SPI_DISR_MASK

#define DCMOTOR12_CONFIG12_SPI_DISR_MASK   0x000006ul

◆ DCMOTOR12_CONFIG12_SR_MODE_FAST1

#define DCMOTOR12_CONFIG12_SR_MODE_FAST1   0x000060ul

◆ DCMOTOR12_CONFIG12_SR_MODE_FAST2

#define DCMOTOR12_CONFIG12_SR_MODE_FAST2   0x000050ul

◆ DCMOTOR12_CONFIG12_SR_MODE_MASK

#define DCMOTOR12_CONFIG12_SR_MODE_MASK   0x000070ul

◆ DCMOTOR12_CONFIG12_SR_MODE_NORMAL

#define DCMOTOR12_CONFIG12_SR_MODE_NORMAL   0x000000ul

◆ DCMOTOR12_CONFIG12_SR_MODE_SLOW1

#define DCMOTOR12_CONFIG12_SR_MODE_SLOW1   0x000010ul

◆ DCMOTOR12_CONFIG12_SR_MODE_SLOW2

#define DCMOTOR12_CONFIG12_SR_MODE_SLOW2   0x000020ul

◆ DCMOTOR12_CONFIG12_SR_MODE_SLOW3

#define DCMOTOR12_CONFIG12_SR_MODE_SLOW3   0x000030ul

◆ DCMOTOR12_CONFIG12_SR_MODE_SLOW4

#define DCMOTOR12_CONFIG12_SR_MODE_SLOW4   0x000040ul

◆ DCMOTOR12_CONFIG12_VBAT_UVC_0US

#define DCMOTOR12_CONFIG12_VBAT_UVC_0US   0x000000ul

◆ DCMOTOR12_CONFIG12_VBAT_UVC_100US

#define DCMOTOR12_CONFIG12_VBAT_UVC_100US   0x000800ul

◆ DCMOTOR12_CONFIG12_VBAT_UVC_MASK

#define DCMOTOR12_CONFIG12_VBAT_UVC_MASK   0x000800ul

◆ DCMOTOR12_CONFIG56_DRV_FREQ_MASK

#define DCMOTOR12_CONFIG56_DRV_FREQ_MASK   0x3FF800ul

◆ DCMOTOR12_CONFIG56_DRV_FREQ_MAX

#define DCMOTOR12_CONFIG56_DRV_FREQ_MAX   2047u

◆ DCMOTOR12_CONFIG56_DRV_FREQ_SHIFT

#define DCMOTOR12_CONFIG56_DRV_FREQ_SHIFT   11ul

◆ DCMOTOR12_CONFIG56_DUTY_PERIOD_MASK

#define DCMOTOR12_CONFIG56_DUTY_PERIOD_MASK   0x0007FFul

◆ DCMOTOR12_CONFIG56_DUTY_PERIOD_MAX

#define DCMOTOR12_CONFIG56_DUTY_PERIOD_MAX   2047u

◆ DCMOTOR12_CONFIG56_DUTY_PERIOD_SHIFT

#define DCMOTOR12_CONFIG56_DUTY_PERIOD_SHIFT   0ul

◆ DCMOTOR12_CONFIG56_MOTOR_OPMODE_MASK

#define DCMOTOR12_CONFIG56_MOTOR_OPMODE_MASK   0xC00000ul

◆ DCMOTOR12_CONFIG56_MOTOR_OPMODE_MAX

#define DCMOTOR12_CONFIG56_MOTOR_OPMODE_MAX   3u

DC Motor 12 CONFIG5/6 register settings.

Specified CONFIG5/6 register settings for ADC of DC Motor 12 Click driver.

◆ DCMOTOR12_CONFIG56_MOTOR_OPMODE_SHIFT

#define DCMOTOR12_CONFIG56_MOTOR_OPMODE_SHIFT   22ul

◆ DCMOTOR12_DEFAULT_CONFIG

#define DCMOTOR12_DEFAULT_CONFIG   0xE3

DC Motor 12 PCA9538A pin direction config.

Specified PCA9538A pin direction config of DC Motor 12 Click driver.

◆ DCMOTOR12_DEVICE_ADDRESS_A1A0_00

#define DCMOTOR12_DEVICE_ADDRESS_A1A0_00   0x70

DC Motor 12 device address setting.

Specified setting for device slave address selection of DC Motor 12 Click driver.

◆ DCMOTOR12_DEVICE_ADDRESS_A1A0_01

#define DCMOTOR12_DEVICE_ADDRESS_A1A0_01   0x71

◆ DCMOTOR12_DEVICE_ADDRESS_A1A0_10

#define DCMOTOR12_DEVICE_ADDRESS_A1A0_10   0x72

◆ DCMOTOR12_DEVICE_ADDRESS_A1A0_11

#define DCMOTOR12_DEVICE_ADDRESS_A1A0_11   0x73

◆ DCMOTOR12_DIAG1_PIN

#define DCMOTOR12_DIAG1_PIN   0x01

DC Motor 12 PCA9538A pin mask.

Specified PCA9538A pin mask of DC Motor 12 Click driver.

◆ DCMOTOR12_DIAG2_PIN

#define DCMOTOR12_DIAG2_PIN   0x02

◆ DCMOTOR12_EN1_PIN

#define DCMOTOR12_EN1_PIN   0x04

◆ DCMOTOR12_EN2_PIN

#define DCMOTOR12_EN2_PIN   0x08

◆ DCMOTOR12_MODE_BRAKE

#define DCMOTOR12_MODE_BRAKE   0x03

◆ DCMOTOR12_MODE_FORWARD

#define DCMOTOR12_MODE_FORWARD   0x01

◆ DCMOTOR12_MODE_OUTPUT_OFF

#define DCMOTOR12_MODE_OUTPUT_OFF   0x00

DC Motor 12 channel operation mode settings.

Specified channel operation mode settings for ADC of DC Motor 12 Click driver.

◆ DCMOTOR12_MODE_REVERSE

#define DCMOTOR12_MODE_REVERSE   0x02

◆ DCMOTOR12_NUM_CONVERSIONS

#define DCMOTOR12_NUM_CONVERSIONS   5000

DC Motor 12 current calculation values.

Specified current calculation values for ADC of DC Motor 12 Click driver.

◆ DCMOTOR12_PIN_HIGH_LEVEL

#define DCMOTOR12_PIN_HIGH_LEVEL   1

◆ DCMOTOR12_PIN_LOW_LEVEL

#define DCMOTOR12_PIN_LOW_LEVEL   0

DC Motor 12 pin logic level setting.

Specified setting for pin logic level of DC Motor 12 Click driver.

◆ DCMOTOR12_RSENSE

#define DCMOTOR12_RSENSE   220.0f

◆ DCMOTOR12_SET_DATA_SAMPLE_EDGE

#define DCMOTOR12_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE

Data sample selection.

This macro sets data samples for SPI modules.

Note
Available only on Microchip PIC family devices. This macro will set data sampling for all SPI modules on MCU. Can be overwritten with dcmotor12_init which will set SET_SPI_DATA_SAMPLE_MIDDLE by default on the mapped mikrobus.

◆ DCMOTOR12_SET_DATA_SAMPLE_MIDDLE

#define DCMOTOR12_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE

◆ DCMOTOR12_SLP_PIN

#define DCMOTOR12_SLP_PIN   0x20

◆ DCMOTOR12_VOLTAGE_TO_CURRENT

#define DCMOTOR12_VOLTAGE_TO_CURRENT   0.00238167f

◆ DCMOTOR12_VREF_3V3

#define DCMOTOR12_VREF_3V3   3.3

DC Motor 12 ADC setting.

Specified settings for ADC of DC Motor 12 Click driver.

◆ DCMOTOR12_VREF_5V

#define DCMOTOR12_VREF_5V   5.0