20 R/F CONVERTER (RFC)
20-6
Seiko Epson Corporation
S1C31D50/D51 TECHNICAL MANUAL
(Rev. 2.00)
The time base counter overflow sets the RFC_
n
INTF.OVTCIF bit to 1 indicating that the reference oscil-
lation has been terminated abnormally. If the RFC_
n
INTE.OVTCIE bit = 1, a time base counter overflow
error interrupt request occurs at this point.
Sensor oscillation
When the RFC_
n
TRG.SSENA bit (sensor A) or the RFC_
n
TRG.SSENB bit (sensor B) is set to 1 in Step
7 of the conversion procedure above, the RFC Ch.
n
starts CR oscillation using the sensor. The measure-
ment counter starts counting up using the CR oscillation clock from 0x000000. The time base counter starts
counting down using TCCLK from the value at the end of reference oscillation.
When the time base counter reaches 0x000000 or the measurement counter overflows (0xffffff
→
0x000000), the RFC_
n
TRG.SSENA bit or the RFC_
n
TRG.SSENB bit that started oscillation is cleared to 0
and the sensor oscillation stops automatically.
The time base counter reaching 0x000000 sets the RFC_
n
INTF.ESENAIF bit (sensor A) or the RFC_
n
INTF.ESENBIF bit (sensor B) to 1 indicating that the sensor oscillation has been terminated normally. If
the RFC_
n
INTE.ESENAIE bit = 1 or the RFC_
n
INTE.ESENBIE bit = 1, a sensor A or sensor B oscillation
completion interrupt request occurs at this point.
The measurement counter overflow sets the RFC_
n
INTF.OVMCIF to 1 indicating that the sensor oscilla-
tion has been terminated abnormally. If the RFC_
n
INTE.OVMCIE bit = 1, a measurement counter overflow
error interrupt request occurs at this point.
Max. count value
(0xffffff)
Min. count value
(0x000000)
Max. count value
(0xffffff)
Min. count value
(0x000000)
Overflow
(normal termination)
EREFIF = 1, SREF = 0
Overflow
(error termination)
OVMCIF = 1, SSENx = 0
Count value m1
Count value m2
Varies depending on
the environment
Calculate the sensor detecting
value from the measurement
counter value m1 and m2.
Overflow
(error termination)
OVTCIF = 1, SREF = 0
Underflow
(normal termination)
ESENxIF = 1, SSENx = 0
0x000000
(Automatically set by reference oscillation
or set via software)
(Automatically set by reference oscillation
or set via software)
Time
Reference oscillation time t
REF
Sensor oscillation time t
SEN
(= t
REF
)
Measurement counter
Time base counter
SREF = 1
Software settings
TC[23:0] = 0x000000
MC[23:0] = initial value (0x000000 - n)
SSENx = 1
Count up
Count up
Count up
Count down
Start sensor oscillation
Start reference oscillation
Initial value n
0x000000 - n
Figure 20.4.4.1 Counter Operations During Reference/Sensor Oscillation
Forced termination
To abort reference oscillation or sensor oscillation, write 0 to the RFC_
n
TRG.SREF bit (reference oscillation),
the RFC_
n
TRG.SSENA bit (sensor A oscillation), or the RFC_
n
TRG.SSENB bit (sensor B oscillation) used to
start the oscillation. The counters maintain the value at the point they stopped, note, however, that the conver-
sion results cannot be guaranteed if the oscillation is resumed. When resuming oscillation, execute from counter
initialization again.
Conversion error
Performing reference oscillation and sensor oscillation with the same resistor and capacitor results n
≈
m. The
difference between n and m is a conversion error. Table 20.4.4.1 lists the error factors. (n: measurement counter
initial value, m: measurement counter value at the end of sensor oscillation)