52 PCB0046_HSD_PWM() :
sw0(),
sw1(),
vinMeas(
sw1),
currentSenseSelector1(
sw1),
currentSenseSelector2(
sw1),
selH(
sw1),
selL(
sw1),
diagEn(
sw1),
fault0to3(
sw1),
fault4to7(
sw1),
73 int16_t
begin(uint8_t i2cAddress)
75 sw0.begin(Wire, i2cAddress,
false);
76 sw1.begin(Wire, i2cAddress + 1,
false);
83 if (!
sw0.isLatestFirmware() || !
sw1.isLatestFirmware()) {
104 for (
int i = 0; i < 8; ++i)
148 selectedFeedbackChannel = ch;
156 if (selectedFeedbackChannel >= 4)
180 if (selectedFeedbackChannel >= 4)
210 return((uint16_t) (
vinMeas.readAveraged_mV() * 11));
215 uint8_t selectedFeedbackChannel = 0;
@ PIN_MODE_ANALOGINPUT
(2)
@ SW_ERROR_WRONG_CHIP_FIRMWARE_VERSION
(#52) The Firmware version of the firmware didn't match what was expected by the host.
@ SW_ERROR_UNKNOWN_PIN_MODE
(#3) A Pin mode was indicated that is not avaialble on this model or version of Serial Wombat chip
@ SW_ERROR_WRONG_CHIP_TYPE
(#51) The chip type (04, 08, 18, etc) wasn't what was expected
SerialWombatPWM_18AB output0
uint16_t readCurrentFeedbackInstant_mA()
SerialWombatDigitalOutput_18AB selL
SerialWombatDigitalOutput_18AB selH
bool readChip4to7IsFaulted()
SerialWombatPWM_18AB output4
SerialWombatPWM_18AB output3
SerialWombatAnalogInput_18AB currentSenseSelector2
SerialWombatPWM_18AB output2
SerialWombatPWM_18AB output5
int16_t selectCurrentFeedbackChannel(uint8_t ch)
SerialWombatPWM_18AB output1
SerialWombatAnalogInput_18AB currentSenseSelector1
SerialWombatDigitalInput_18AB fault4to7
SerialWombatPWM_18AB output6
SerialWombatDigitalOutput_18AB diagEn
int16_t begin(uint8_t i2cAddress)
Initialize a PCB0046_HSD pcb on a given I2C address and the I2C address + 1.
SerialWombatDigitalInput_18AB fault0to3
SerialWombatPWM_18AB output7
bool readChip0to3IsFaulted()
SerialWombatAnalogInput_18AB vinMeas
SerialWombatPWM_18AB * outputArray[8]
uint16_t readCurrentFeedbackAverage_mA()
Class for a Serial Wombat chip. Each Serial Wombat chip on a project should have its own instance.
Extends the SerialWombatPWM class with SW18AB specific functionality, including SerialWombatAbstractS...