config.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef DCLOAD_CONFIG_H
  2. #define DCLOAD_CONFIG_H
  3. #define DC_LOAD_VER "36"
  4. #define I2C_EPROM_ADDRESS 0x57
  5. #define I2C_MCP4725_ADDRESS 0x61 //the DAC I2C address with MCP4725 pin A0 set high
  6. #define I2C_MCP79410_ADDRESS 0x6f //0x6f is the default address for the MCP79410 Real Time Clock IC
  7. #define I2C_MCP342x_ADDRESS 0x68 //0x68 is the default address for the MCP3426 device
  8. #define rxPin 8
  9. #define txPin 7
  10. #define COL_RED 63488
  11. #define COL_GREEN 1024
  12. #define COL_GRAY 50712
  13. #define COL_BLUE 1055
  14. #define line_len 21
  15. #define MODE_CC 1
  16. #define MODE_CP 2
  17. #define MODE_CR 3
  18. #define MODE_TC 4
  19. #define MODE_TP 5
  20. #define MODE_TT 6
  21. #define MODE_TL 7
  22. #define MODE_BC 8
  23. #define CURRENTCUTOFF_ADDRESS 0x00
  24. #define POWERCUTOFF_ADDRESS 0x20
  25. #define TEMPCUTOFF_ADDRESS 0x40
  26. #define pinA 2 //digital pin (also interrupt pin) for the A pin of the Rotary Encoder (changed to digital pin 2)
  27. #define pinB 4 //digital pin for the B pin of the Rotary Encoder
  28. #define CURSORPOS_PIN 17 //analog pin A3 used as a digital pin to set cursor position (rotary encoder push button)
  29. #define LOADONOFF_PIN 15 //analog pin A1 used as a digital pin to set Load ON/OFF
  30. #define TRIGGERPULSE_PIN 16 //analog pin A2 used as a digital pin for trigger pulse input in transient mode
  31. #define FAN_PIN 3 //digital pin 3 for fan control output (changed to Digital pin 3)
  32. #define TEMP_PIN A6 //analog pin used for temperature output from LM35 (was A0 previously but changed)
  33. #define setCurrentCalibrationFactor 0.980 //calibration adjustment - set as required if needed (was 1.000)
  34. #define displayCurrentCal 0.000 //calibration correction for LCD current display (was 0.040)
  35. #define ResistorCutOff 999 //maximum Resistor we want to deal with in software
  36. #define MCP4725_I2CADDR_DEFAULT (0x62) //< Default i2c address
  37. #define MCP4725_CMD_WRITEDAC (0x40) //< Writes data to the DAC
  38. #define MCP4725_CMD_WRITEDACEEPROM (0x60) //< Writes data to the DAC and the EEPROM (persisting the assigned
  39. #define PIC_USB_GRAY 2
  40. #define PIC_USB_BLACK 3
  41. #define LiPoCutOffVoltage 3.0 //set cutoff voltage for LiPo battery
  42. #define LiFeCutOffVoltage 2.8 //set cutoff voltage for LiFe battery
  43. #define NiCdCutOffVoltage 1.0 //set cutoff voltage for NiCd battery
  44. #define ZiZnCutOffVoltage 1.0 //set cutoff voltage for ZiZn battery
  45. #define PbAcCutOffVoltage 1.75 //set cutoff voltage for PbAc battery
  46. #define DEBOUNCE_DELAY 50
  47. #endif // DCLOAD_CONFIG_H