Справочник Пользователя для Microchip Technology ARD00342
MCP3901 and PIC18F65J90 Energy Meter Reference Design
DS51968A-page 20
© 2012 Microchip Technology Inc.
3.4
STATUS
The STATUS register contains the operational status of the energy meter. The bit
functions are defined in the table below.
functions are defined in the table below.
3.5
CAL_CONTROL
This is the Calibration mode control register. Bit 0 enables the Calibration mode. In this
mode, the power meter operates as normal, but no updates are made to the voltage,
current, power or energy registers as long as bit 1 is low. When bit 1 is set high, the
registers are updated for LINE_CYC line cycles (only power and energy registers are
updated). After this time, bit 1 is set low by the PIC18F65J90 and the update of the
registers will stop. This allows the calibration software to set bit 0, clear the registers,
set bit 1 and start reading the desired registers, as well as the CAL_CONTROL register,
to check the status of bit 1. When bit 1 goes low, the LINE_CYC line cycles have
passed and the registers are final. Note that bit 0 takes effect immediately, and bit 1 will
take effect on the very next line cycle. When bit 1 goes low, all registers will be ready
to read.
mode, the power meter operates as normal, but no updates are made to the voltage,
current, power or energy registers as long as bit 1 is low. When bit 1 is set high, the
registers are updated for LINE_CYC line cycles (only power and energy registers are
updated). After this time, bit 1 is set low by the PIC18F65J90 and the update of the
registers will stop. This allows the calibration software to set bit 0, clear the registers,
set bit 1 and start reading the desired registers, as well as the CAL_CONTROL register,
to check the status of bit 1. When bit 1 goes low, the LINE_CYC line cycles have
passed and the registers are final. Note that bit 0 takes effect immediately, and bit 1 will
take effect on the very next line cycle. When bit 1 goes low, all registers will be ready
to read.
REGISTER 3-2:
STATUS REGISTER
U-0
U-0
U-0
U-0
U-0
U-0
R
U-0
—
—
—
—
—
—
PH_S
—
bit 7
bit 0
Legend:
R = Readable bit
W = Writable bit
U = Unimplemented bit, read as ‘0’
-n = Value at POR
‘1’ = Bit is set
‘0’ = Bit is cleared
x = Bit is unknown
bit 7-2
Unimplemented: Read as ‘0’
bit 1
PH_S: Phase Sign bit
1
= CT may be in backward (if enabled)
0
= Operation normal
bit 0
Unimplemented: Read as ‘0’
REGISTER 3-3:
CAL_CONTROL REGISTER (NOTE 1)
U-0
U-0
U-0
U-0
U-0
U-0
R/W-0
R/W-0
—
—
—
—
—
Reserved
CAL_UPDATE
CAL_MODE
bit 7
bit 0
Legend:
R = Readable bit
W = Writable bit
U = Unimplemented bit, read as ‘0’
-n = Value at POR
‘1’ = Bit is set
‘0’ = Bit is cleared
x = Bit is unknown
bit 7-3
Unimplemented: Read as ‘0’
bit 2
Reserved: