19 R/F CONVERTER (RFC)
19-6
Seiko epson Corporation
S1C17F13 TeChniCal Manual
(Rev. 1.0)
The time base counter overflow sets the RFC
n
INTF.OVTCIF bit to 1 indicating that the reference oscilla-
tion 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 measurement
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 com-
pletion interrupt request occurs at this point.
The measurement counter overflow sets the RFC
n
INTF.OVMCIF to 1 indicating that the sensor oscillation
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, SSEN
x
= 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)
ESEN
x
IF = 1, SSEN
x
= 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)
SSEN
x
= 1
Count up
Count up
Count up
Count down
Start sensor oscillation
Start reference oscillation
Initial value n
0x000000 - n
4.4.1 Counter Operations During Reference/Sensor Oscillation
Figure 19.
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 19.4.4.1 lists the error factors. (n: measurement counter
initial value, m: measurement counter value at the end of sensor oscillation)