📄 eeprom_locations.h
字号:
/*
-02/23/2006: Petre M.
-this file contains the locations of variables in the EEPROM.
-05/11/2006: Only the addresses in Bank0 are given. The corresponding
addresses in Bank1 are the addresses in bank0 + the Start address of Bank1
*/
#define EE_Start_Address_bank0 0x00
#define EE_Start_Address_bank1 0x100
#define EE_Start_Address EE_Start_Address_bank0
//Active_Energy has 5 bytes. It is a High Importance buffer =>+2 bytes
//0x00
#define Day_Ac_Energy EE_Start_Address
//Reactive_Energy has 5 bytes. It is a High Importance buffer =>+2 bytes
//0x07
#define Day_Re_Energy Day_Ac_Energy+7
//Apparent_Energy has 5 bytes. It is a High Importance buffer =>+2 bytes
//0x0e
#define Day_Ap_Energy Day_Re_Energy+7
//this is the address in EEPROM where is stored the day of
//the month at the end of which the energies are stored
//It is a Low Importance buffer =>+1 byte
//0x15
#define EEPROM_Storage_Day Day_Ap_Energy+7
//Date.Weekday, Date.Year, Date.Day and Date.Month are stored here
//It is a High Importance buffer =>+2 bytes
//0x17
#define EEPROM_Date EEPROM_Storage_Day+2
//Date.Weekday, Date.Year, Date.Day and Date.Month are stored here in
//case the power goes down (VDCIN<1.2V)
//It is a Low Importance buffer =>+1 byte
//0x1d
#define EEPROM_Fault_Date EEPROM_Date+6
//here is stored the number of days with no power
//It is a Low Importance buffer =>+1 byte
//0x23
#define EEPROM_Fault_Days EEPROM_Fault_Date+6
//the monthly energy consumption is stored here
//0x25
#define Monthly_Energy EEPROM_Fault_Days+2
//it contains (5+2)*3=21 bytes, 5 plus 2 Ctrl bytes for each energy (High Importance)
//0x25
#define Monthly_Ac_Energy Monthly_Energy
//0x2c
#define Monthly_Re_Energy Monthly_Ac_Energy+7
//0x33
#define Monthly_Ap_Energy Monthly_Re_Energy+7
//it contains 1+1 Ctrl byte (Low Importance)
//0x3a
#define PHCAL_val Monthly_Ap_Energy+7
//it contains 1+1 Ctrl byte (Low Importance)
//0x3c
#define GAIN_val PHCAL_val+2
//it contains 2+1 Ctrl byte (Low Importance)
//0x3e
#define IBGAIN_val GAIN_val+2
//WGAIN_val[0]=LSB, WGAIN_val[1]=MSB
//it contains 2+1 Ctrl byte (Low Importance)
//0x41
#define WGAIN_val IBGAIN_val+3
//it contains 2+1 Ctrl byte (Low Importance)
//0x44
#define VARGAIN_val WGAIN_val+3
//it contains 2+1 Ctrl byte (Low Importance)
//0x47
#define VAGAIN_val VARGAIN_val+3
//it contains 2+1 Ctrl byte (Low Importance)
//0x4a
#define WATTOS_val VAGAIN_val+3
//it contains 2+1 Ctrl byte (Low Importance)
//0x4d
#define VAROS_val WATTOS_val+3
//0x50
#define IRMSOS_val VAROS_val+3
//it contains 2+1 Ctrl byte (Low Importance)
//0x53
#define VRMSOS_val IRMSOS_val+3
//it contains 2+1 Ctrl byte (Low Importance)
//0x56
#define CF1DEN_val VRMSOS_val+3
//it contains 2+1 Ctrl byte (Low Importance)
//0x59
#define CF2DEN_val CF1DEN_val+3
//it contains 1+1 Ctrl byte (Low Importance)
//0x5c
#define RTCCOMP_val CF2DEN_val+3
//it contains 1+1 Ctrl byte (Low Importance)
//0x5e
#define TEMPCAL_val RTCCOMP_val+2
//it contains 2+1 Ctrl byte (Low Importance)
//0x60
#define I_1A_threshold_val TEMPCAL_val+2
//it contains 2+1 Ctrl byte (Low Importance)
//0x63
#define V_1V_threshold_val I_1A_threshold_val+3
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -