Has base BMU code but sends dummy temperature and voltage readings to test CAN

Dependencies:   CUER_CAN DS1820 LTC2943 LTC6804 mbed

Fork of BMS_BMUCore_Max by CUER

LTC2943_Read.h

Committer:
DasSidG
Date:
2017-07-02
Revision:
15:e901aff1f5b3
Parent:
4:9050c5d6925e

File content as of revision 15:e901aff1f5b3:

#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