Loading...
Searching...
No Matches
ltc4150_params_t Struct Reference

Parameters required to set up the LTC4150 coulomb counter. More...

Detailed Description

Parameters required to set up the LTC4150 coulomb counter.

Definition at line 147 of file ltc4150.h.

#include <ltc4150.h>

Data Fields

gpio_t interrupt
 Pin going LOW every time a specific charge is drawn, labeled INT.
 
gpio_t polarity
 Pin indicating (dis-)charging, labeled POL.
 
gpio_t shutdown
 Pin to power off the LTC4150 coulomb counter, labeled SHDN.
 
uint16_t pulses_per_ah
 Pulse per ampere hour of charge.
 
uint16_t flags
 Configuration flags controlling if inter pull ups are required.
 
const ltc4150_recorder_t ** recorders
 NULL or a NULL-terminated array of data recorders
 
void ** recorder_data
 NULL or an array of the user defined data for each recorder
 

Field Documentation

◆ flags

uint16_t ltc4150_params_t::flags

Configuration flags controlling if inter pull ups are required.

Most breakout boards and the MSBA2 board use external pull up resistors, so no internal pull ups are required. Clear the flags to use internal pull ups instead.

Definition at line 182 of file ltc4150.h.

◆ interrupt

gpio_t ltc4150_params_t::interrupt

Pin going LOW every time a specific charge is drawn, labeled INT.

Definition at line 151 of file ltc4150.h.

◆ polarity

gpio_t ltc4150_params_t::polarity

Pin indicating (dis-)charging, labeled POL.

Set this pin to GPIO_UNDEF to treat every pulse as discharging. This pin is pulled low by the LTC4150 in case the battery is discharging.

Definition at line 158 of file ltc4150.h.

◆ pulses_per_ah

uint16_t ltc4150_params_t::pulses_per_ah

Pulse per ampere hour of charge.

pulses = 3600 * 32.55 * R

Where R is the resistance (in Ohm) between the SENSE+ and SENSE- pins. E.g. the MSBA2 has 0.390 Ohm (==> 45700 pulses), while most breakout boards for the LTC4150 have 0.050 Ohm (==> 5859 pulses).

Definition at line 174 of file ltc4150.h.

◆ recorder_data

void** ltc4150_params_t::recorder_data

NULL or an array of the user defined data for each recorder

Precondition
If
See also
ltc4150_params_t::recorders is not NULL, this must point to an array of void-Pointers of the same length.
Note
Unlike
See also
ltc4150_param_t::callback, this array does not need to be NULL-terminated

Definition at line 195 of file ltc4150.h.

◆ recorders

const ltc4150_recorder_t** ltc4150_params_t::recorders

NULL or a NULL-terminated array of data recorders

Precondition
If not NULL, the last element of the array must be NULL

Definition at line 187 of file ltc4150.h.

◆ shutdown

gpio_t ltc4150_params_t::shutdown

Pin to power off the LTC4150 coulomb counter, labeled SHDN.

Set this pin to GPIO_UNDEF if the SHDN pin is not connected to the MCU

Definition at line 164 of file ltc4150.h.


The documentation for this struct was generated from the following file: