Reference Application File for Monitoring Voltages from the LTC6804-2 Battery Monitor on the DC2100A PCB.
More...
Go to the source code of this file.
Reference Application File for Monitoring Voltages from the LTC6804-2 Battery Monitor on the DC2100A PCB.
Definition in file Voltage.h.
void Voltage_Init |
( |
void |
| ) |
|
Initializes the parts of the Voltage Module, that need to be initialized upon power-up of the PIC.
- Returns
- void
Definition at line 106 of file Voltage.c.
void Voltage_Monitor_Task |
( |
void |
| ) |
|
Executes the Voltage Monitor task.
- Measures all cell voltages in the system. Note that all DC2100A voltages are started simultaneously and read sequentially.
- A timestamp is attached to each voltage for mathematical operations to be performed on the samples.
- The state of the balancers is saved, as the cell voltage measurements are affected by the large DC2100A balance currents.
- Calculates the sum-of-cells voltages for each LTC6804 in the system.
- Monitors each cell for UV and OV. Balancing is stopped if UV or OV occurs, and in USB message is sent to the GUI
- Returns
- void
Definition at line 140 of file Voltage.c.
BOOLEAN Voltage_UVOV_Thresholds_Set |
( |
unsigned int16 |
vuv_value, |
|
|
unsigned int16 |
vov_value |
|
) |
| |
Sets the under-voltage and over-voltage thresholds in all DC2100A in the system.
- Returns
- TRUE if voltage thresholds successfully set.
- Parameters
-
vuv_value | over-voltage threshold in LTC6804_VOLTAGE_RESOLUTION. |
vov_value | under-voltage threshold in LTC6804_VOLTAGE_RESOLUTION. |
Definition at line 248 of file Voltage.c.
BOOLEAN Voltage_Wakeup_Init |
( |
void |
| ) |
|
Initializes the parts of the Voltage Module, that need to be initialized upon wakeup of the LTC6804.
- Returns
- TRUE if initialization was successful.
Definition at line 128 of file Voltage.c.
number of bits per mV in cell voltage measurements
Definition at line 69 of file Voltage.h.
#define VOLTAGE_TASK_RATE 100 |
in ms, the rate at which the voltage monitor task is executed
Definition at line 68 of file Voltage.h.
Bitmap indicating if a cell input on the LTC6804 is populated or shorted.
Definition at line 72 of file Voltage.h.
unsigned int8 voltage_balancestamp |
1 if balancers were on when these measurements were taken, otherwise 0
Definition at line 84 of file Voltage.c.
unsigned int16 voltage_cell[DC2100A_MAX_BOARDS][DC2100A_NUM_CELLS] |
Measured cell voltages for each board in LTC6804_VOLTAGE_RESOLUTION.
Definition at line 81 of file Voltage.c.
Bitmap indicating if a cell input on the LTC6804 is unpopulated (0), such that UV conditions should be ignored.
Definition at line 90 of file Voltage.c.
unsigned int16 voltage_ov_flags[DC2100A_MAX_BOARDS] |
Bitmap indicating if a cell input on the LTC6804 is over-voltage (1) or not (0).
Definition at line 88 of file Voltage.c.
unsigned int16 voltage_sum[DC2100A_MAX_BOARDS] |
Measured sum of the cell voltages for this board in LTC6804_SOC_RESOLUTION.
Definition at line 82 of file Voltage.c.
unsigned int32 voltage_timestamp |
Timestamp taken when voltage measurements were started.
Definition at line 83 of file Voltage.c.
unsigned int16 voltage_uv_flags[DC2100A_MAX_BOARDS] |
Bitmap indicating if a cell input on the LTC6804 is under-voltage (1) or not (0).
Definition at line 89 of file Voltage.c.
unsigned int16 voltage_vov_threshold |
over-voltage threshold in LTC6804_VOLTAGE_RESOLUTION.
Definition at line 86 of file Voltage.c.
unsigned int16 voltage_vuv_threshold |
under-voltage threshold in LTC6804_VOLTAGE_RESOLUTION.
Definition at line 87 of file Voltage.c.