ESPHome 2026.6.0-dev
Loading...
Searching...
No Matches
atm90e26_reg.h
Go to the documentation of this file.
1#pragma once
2
3namespace esphome::atm90e26 {
4
5/* Status and Special Register */
6static const uint8_t ATM90E26_REGISTER_SOFTRESET = 0x00; // Software Reset
7static const uint8_t ATM90E26_REGISTER_SYSSTATUS = 0x01; // System Status
8static const uint8_t ATM90E26_REGISTER_FUNCEN = 0x02; // Function Enable
9static const uint8_t ATM90E26_REGISTER_SAGTH = 0x03; // Voltage Sag Threshold
10static const uint8_t ATM90E26_REGISTER_SMALLPMOD = 0x04; // Small-Power Mode
11static const uint8_t ATM90E26_REGISTER_LASTDATA = 0x06; // Last Read/Write SPI/UART Value
12
13/* Metering Calibration and Configuration Register */
14static const uint8_t ATM90E26_REGISTER_LSB = 0x08; // RMS/Power 16-bit LSB
15static const uint8_t ATM90E26_REGISTER_CALSTART = 0x20; // Calibration Start Command
16static const uint8_t ATM90E26_REGISTER_PLCONSTH = 0x21; // High Word of PL_Constant
17static const uint8_t ATM90E26_REGISTER_PLCONSTL = 0x22; // Low Word of PL_Constant
18static const uint8_t ATM90E26_REGISTER_LGAIN = 0x23; // L Line Calibration Gain
19static const uint8_t ATM90E26_REGISTER_LPHI = 0x24; // L Line Calibration Angle
20static const uint8_t ATM90E26_REGISTER_NGAIN = 0x25; // N Line Calibration Gain
21static const uint8_t ATM90E26_REGISTER_NPHI = 0x26; // N Line Calibration Angle
22static const uint8_t ATM90E26_REGISTER_PSTARTTH = 0x27; // Active Startup Power Threshold
23static const uint8_t ATM90E26_REGISTER_PNOLTH = 0x28; // Active No-Load Power Threshold
24static const uint8_t ATM90E26_REGISTER_QSTARTTH = 0x29; // Reactive Startup Power Threshold
25static const uint8_t ATM90E26_REGISTER_QNOLTH = 0x2A; // Reactive No-Load Power Threshold
26static const uint8_t ATM90E26_REGISTER_MMODE = 0x2B; // Metering Mode Configuration
27static const uint8_t ATM90E26_REGISTER_CS1 = 0x2C; // Checksum 1
28
29/* Measurement Calibration Register */
30static const uint8_t ATM90E26_REGISTER_ADJSTART = 0x30; // Measurement Calibration Start Command
31static const uint8_t ATM90E26_REGISTER_UGAIN = 0x31; // Voltage RMS Gain
32static const uint8_t ATM90E26_REGISTER_IGAINL = 0x32; // L Line Current RMS Gain
33static const uint8_t ATM90E26_REGISTER_IGAINN = 0x33; // N Line Current RMS Gain
34static const uint8_t ATM90E26_REGISTER_UOFFSET = 0x34; // Voltage Offset
35static const uint8_t ATM90E26_REGISTER_IOFFSETL = 0x35; // L Line Current Offset
36static const uint8_t ATM90E26_REGISTER_IOFFSETN = 0x36; // N Line Current Offse
37static const uint8_t ATM90E26_REGISTER_POFFSETL = 0x37; // L Line Active Power Offset
38static const uint8_t ATM90E26_REGISTER_QOFFSETL = 0x38; // L Line Reactive Power Offset
39static const uint8_t ATM90E26_REGISTER_POFFSETN = 0x39; // N Line Active Power Offset
40static const uint8_t ATM90E26_REGISTER_QOFFSETN = 0x3A; // N Line Reactive Power Offset
41static const uint8_t ATM90E26_REGISTER_CS2 = 0x3B; // Checksum 2
42
43/* Energy Register */
44static const uint8_t ATM90E26_REGISTER_APENERGY = 0x40; // Forward Active Energy
45static const uint8_t ATM90E26_REGISTER_ANENERGY = 0x41; // Reverse Active Energy
46static const uint8_t ATM90E26_REGISTER_ATENERGY = 0x42; // Absolute Active Energy
47static const uint8_t ATM90E26_REGISTER_RPENERGY = 0x43; // Forward (Inductive) Reactive Energy
48static const uint8_t ATM90E26_REGISTER_RNENERG = 0x44; // Reverse (Capacitive) Reactive Energy
49static const uint8_t ATM90E26_REGISTER_RTENERGY = 0x45; // Absolute Reactive Energy
50static const uint8_t ATM90E26_REGISTER_ENSTATUS = 0x46; // Metering Status
51
52/* Measurement Register */
53static const uint8_t ATM90E26_REGISTER_IRMS = 0x48; // L Line Current RMS
54static const uint8_t ATM90E26_REGISTER_URMS = 0x49; // Voltage RMS
55static const uint8_t ATM90E26_REGISTER_PMEAN = 0x4A; // L Line Mean Active Power
56static const uint8_t ATM90E26_REGISTER_QMEAN = 0x4B; // L Line Mean Reactive Power
57static const uint8_t ATM90E26_REGISTER_FREQ = 0x4C; // Voltage Frequency
58static const uint8_t ATM90E26_REGISTER_POWERF = 0x4D; // L Line Power Factor
59static const uint8_t ATM90E26_REGISTER_PANGLE = 0x4E; // Phase Angle between Voltage and L Line Current
60static const uint8_t ATM90E26_REGISTER_SMEAN = 0x4F; // L Line Mean Apparent Power
61static const uint8_t ATM90E26_REGISTER_IRMS2 = 0x68; // N Line Current rms
62static const uint8_t ATM90E26_REGISTER_PMEAN2 = 0x6A; // N Line Mean Active Power
63static const uint8_t ATM90E26_REGISTER_QMEAN2 = 0x6B; // N Line Mean Reactive Power
64static const uint8_t ATM90E26_REGISTER_POWERF2 = 0x6D; // N Line Power Factor
65static const uint8_t ATM90E26_REGISTER_PANGLE2 = 0x6E; // Phase Angle between Voltage and N Line Current
66static const uint8_t ATM90E26_REGISTER_SMEAN2 = 0x6F; // N Line Mean Apparent Power
67
68} // namespace esphome::atm90e26