Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: CUER_CAN CUER_DS1820 LTC2943 LTC6804 mbed PowerControl
Diff: LTC2943_Read.h
- Revision:
- 4:9050c5d6925e
- Child:
- 28:f1f882bd1653
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LTC2943_Read.h Tue Jan 10 00:57:19 2017 +0000 @@ -0,0 +1,49 @@ +#ifndef LTC2943_READ_H +#define LTC2943_READ_H + +#include "mbed.h" +#include "LTC2943.h" + +#define i2c_sda p9 +#define i2c_scl p10 +#define alcc_pin p11 //ALERT:CHANGE THIS VALUE ALERT:CHANGE THIS VALUE ALERT:CHANGE THIS VALUE ALERT:CHANGE THIS VALUE ALERT:CHANGE THIS VALUE ALERT:CHANGE THIS VALUE ALERT:CHANGE THIS VALUE +#define BATTERY_CAPACITY 100 //in Ah //TODO: change this to the right value +#define R_SENSE 100 //in Ohms + +/*@ALCC_MODES +* +LTC2943_ALERT_MODE 0x04 +LTC2943_CHARGE_COMPLETE_MODE 0x02 +LTC2943_DISABLE_ALCC_PIN 0x00 +*/ +#define ALCCMODE 0x00 + +/*@ADC_MODES +* +LTC2943_AUTOMATIC_MODE 0xC0 +LTC2943_SCAN_MODE 0x80 +LTC2943_MANUAL_MODE 0x40 +LTC2943_SLEEP_MODE 0x00 +*/ +#define ADCMODE 0xC0 //In this mode the LTC2943 will continuously carry out voltage, current and temperature measurements + +//VALUES BELOW TO BE CHANGED +#define chargeLow 0.1 +#define chargeHigh 1.1 + +#define currentLow -1.1 +#define currentHigh 1.1 + +#define voltageLow 0.1 +#define voltageHigh 1.1 + +#define temperatureLow 1.1 +#define temperatureHigh 50.1 + +//function prototypes +void dummyfunction(void); +void LTC2943_initialise(); + +extern LTC2943 ltc2943; //defined in LTC2943_Read.cpp + +#endif \ No newline at end of file