Microchip Technology ARD00342 User Manual

Page of 46
MCP3901 and PIC18F65J90 Energy Meter Reference Design
DS51968A-page 24
© 2012 Microchip Technology Inc.
3.18
RAW_POWER_REACT  
This is the raw reactive power. This register is read during the calibration for calculating 
the gain values associated with the reactive power and GAIN_POWER_REACT. This 
register is overwritten every LINE_CYC line cycle (written only once if calibration is 
enabled). This register is accumulated on a line-cycle basis.
3.19
POWER_REACT  
This is the value for reactive power. The goal is to get this value to equal X VAR/LSB. 
This is done with the GAIN_POWER_REACT register. When displaying the power, 
multiply the (decimal) value in this register by X to get the display value in watts. This 
register is overwritten every LINE_CYC line cycle (written only once if calibration is 
enabled).
3.20
PERIOD
This 32-bit register represents the total number of clock ticks that elapsed over the most 
recent LINE_CYC line cycle. Each LSB represents 1.6 µs with a 4 MHz clock on the 
microcontroller. This register is overwritten every LINE_CYC line cycle (written only 
once if calibration is enabled).
3.21
ENERGY_ACT
The design updates the Energy register using the CF Pulse blink output count. In this 
method, the Energy registers increments every pulse by a value equal to 
1/(METER_CONSTANT). 
ENERGY_ACT = ENERGY_ACT + (1/METER_CONSTANT)
The gain calibration registers GAIN_NUMR_ENERGY_ACT and 
GAIN_DENR_ENERGY_ACT operate the same for this method also.
Name
Bits
Cof
RAW_POWER_REACT
64
R
Name
Bits
Cof
POWER_REACT
32
R
Name
Bits
Cof
PERIOD
32
R
Name
Bits
Cof
ENERGY_ACT
32
R
RAW_ENERGY_ACT
64
R