![]() |
DC2343A
FW 1.0.2 / GUI 1.0.10
LTC3335 Nanopower Buck-Boost DC/DC with Integrated Coulomb Counter
|
Firmware Driver Header File for LTC3335 Nanopower Buck-Boost DC/DC with Integrated Coulomb Counter. More...
Go to the source code of this file.
Firmware Driver Header File for LTC3335 Nanopower Buck-Boost DC/DC with Integrated Coulomb Counter.
This driver was designed to provide the following services to application code:
Software correction was not included in this driver due to Program Memory limitations in the PIC16F1459. See the LTC3335.vb file in with the DC2343A GUI source code for an example of software correction of the LTC3335 coulomb count.
Definition in file LTC3335.h.
Data Structures | |
struct | LTC3335_ALARM_TYPE |
The alarm conditions which cause the LTC3335 to activate the /INT pin. More... | |
Functions | |
void | LTC3335_Init (void) |
Initializes the LTC3335 driver. More... | |
bool_t | LTC3335_Set_Voltage (bool_t enabled, LTC3335_OUTPUT_VOLTAGE_TYPE voltage) |
Enables/Disables software control of the LTC3335 output voltage. More... | |
bool_t | LTC3335_Get_Voltage (bool_t *enabled, LTC3335_OUTPUT_VOLTAGE_TYPE *voltage) |
Get whether the software control of the LTC3335 output voltage is enabled/disabled. More... | |
bool_t | LTC3335_Set_Prescaler (uint8_t prescaler) |
Sets the specified prescaler setting for the LTC3335. More... | |
bool_t | LTC3335_Get_Prescaler (uint8_t *prescaler) |
Gets the prescaler setting from the LTC3335. More... | |
bool_t | LTC3335_Set_Alarm_Threshold (uint8_t threshold) |
Sets the specified alarm threshold for the LTC3335. More... | |
bool_t | LTC3335_Get_Alarm_Threshold (uint8_t *threshold) |
Gets the alarm threshold from the LTC3335. More... | |
bool_t | LTC3335_Set_Accumulator (uint8_t accumulator) |
Sets the specified accumulator value for the LTC3335. More... | |
bool_t | LTC3335_Get_Accumulator (uint8_t *accumulator) |
Gets the specified accumulator value from the LTC3335. More... | |
bool_t | LTC3335_Get_Alarms (LTC3335_ALARM_TYPE *alarms) |
Gets the alarms active from the LTC3335. More... | |
bool_t | LTC3335_Clear_Int (void) |
Sends the command to clear the INT condition. More... | |
bool_t | LTC3335_Set_Counter_Test (bool_t enabled) |
Enables/Disables the LTC3335 Counter Test feature. More... | |
bool_t | LTC3335_Get_Counter_Test (bool_t *enabled) |
Gets whether the LTC3335 Counter Test feature is Enabled/Disabled. More... | |
bool_t | LTC3335_Get_Counter_Test_Results (bool_t *enabled, uint32_t *edge_count, uint32_t *time) |
Gets whether the LTC3335 Counter Test feature is Enabled/Disabled. More... | |
bool_t | LTC3335_Reset_Counter_Test (void) |
Resets the number of edges and the amount of time stored for the Counter Test feature. More... | |
void | LTC3335_Counter_Test_Task (void) |
Task that must be run periodically, for the edges and time to be stored for the LTC3335 Counter Test feature. More... | |
Macros | |
LTC3335 Driver Properties | |
#define | LTC3335_BAUD_RATE 400 |
in kHz, Max Clock Operating Frequency (fSCL from datasheet page 5) More... | |
#define | LTC3335_PRESCALER_MAX 15 |
the maximum prescaler that be selected for the LTC3335. More... | |
LTC3335 I/O | |
#define | LTC3335_DVCC DVCC_OUT_PIN |
DVCC pin must be high for LTC3335 to communicate. More... | |
#define | LTC3335_PGOOD PGOOD_IN_PIN |
PGOOD is high when LTC3335 is in regulation. More... | |
#define | LTC3335_IRQ IRQ_IN_PIN |
IRQ is low when alarm condition is present or has not been cleared. More... | |
bool_t LTC3335_Clear_Int | ( | void | ) |
void LTC3335_Counter_Test_Task | ( | void | ) |
bool_t LTC3335_Get_Accumulator | ( | uint8_t * | accumulator | ) |
bool_t LTC3335_Get_Alarm_Threshold | ( | uint8_t * | threshold | ) |
bool_t LTC3335_Get_Alarms | ( | LTC3335_ALARM_TYPE * | alarms | ) |
bool_t LTC3335_Get_Counter_Test | ( | bool_t * | enabled | ) |
bool_t LTC3335_Get_Counter_Test_Results | ( | bool_t * | enabled, |
uint32_t * | edge_count, | ||
uint32_t * | time | ||
) |
Gets whether the LTC3335 Counter Test feature is Enabled/Disabled.
Gets the number of edges and the amount of time since the Counter Test was last reset, which allows edges/sec to be calculated. The edges/sec is proportional to battery current.
enabled | TRUE if Counter Test is enabled, FALSE is Counter Test is disabled. |
edge_count | The number of edges counted since the Counter Test was last reset. |
time | The number of timer ticks since the Counter Test was last reset. |
bool_t LTC3335_Get_Prescaler | ( | uint8_t * | prescaler | ) |
bool_t LTC3335_Get_Voltage | ( | bool_t * | enabled, |
LTC3335_OUTPUT_VOLTAGE_TYPE * | voltage | ||
) |
Get whether the software control of the LTC3335 output voltage is enabled/disabled.
Gets the voltage setting, if software control is enabled.
enabled | TRUE if software control of output voltage is enabled, FALSE is software control is disabled (output voltage set by pins 3-5). |
voltage | The output voltage setting if software control is enabled. |
void LTC3335_Init | ( | void | ) |
bool_t LTC3335_Reset_Counter_Test | ( | void | ) |
bool_t LTC3335_Set_Accumulator | ( | uint8_t | accumulator | ) |
bool_t LTC3335_Set_Alarm_Threshold | ( | uint8_t | threshold | ) |
bool_t LTC3335_Set_Counter_Test | ( | bool_t | enabled | ) |
bool_t LTC3335_Set_Prescaler | ( | uint8_t | prescaler | ) |
bool_t LTC3335_Set_Voltage | ( | bool_t | enabled, |
LTC3335_OUTPUT_VOLTAGE_TYPE | voltage | ||
) |
Enables/Disables software control of the LTC3335 output voltage.
If software control is enabled, the voltage is set to the specified setting.
enabled | TRUE to enable software control of output voltage, FALSE to disable software control (output voltage set by pins 3-5). |
voltage | The output voltage setting if software control is enabled. |
#define LTC3335_BAUD_RATE 400 |
#define LTC3335_DVCC DVCC_OUT_PIN |
#define LTC3335_IRQ IRQ_IN_PIN |
#define LTC3335_PGOOD PGOOD_IN_PIN |