Download Print this page

Epson S1C17W15 Technical Manual page 238

Cmos 16-bit single chip microcontroller

Advertisement

18 R/F CONVERTER (RFC)
The time base counter overflow sets the RFCnINTF.OVTCIF bit to 1 indicating that the reference oscilla-
tion has been terminated abnormally. If the RFCnINTE.OVTCIE bit = 1, a time base counter overflow error
interrupt request occurs at this point.
Sensor oscillation
When the RFCnTRG.SSENA bit (sensor A) or the RFCnTRG.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 RFCnTRG.SSENA bit or the RFCnTRG.SSENB bit that started oscillation is cleared to 0
and the sensor oscillation stops automatically.
The time base counter reaching 0x000000 sets the RFCnINTF.ESENAIF bit (sensor A) or the RFCnINTF.
ESENBIF bit (sensor B) to 1 indicating that the sensor oscillation has been terminated normally. If the RF-
CnINTE.ESENAIE bit = 1 or the RFCnINTE.ESENBIE bit = 1, a sensor A or sensor B oscillation comple-
tion interrupt request occurs at this point.
The measurement counter overflow sets the RFCnINTF.OVMCIF to 1 indicating that the sensor oscillation
has been terminated abnormally. If the RFCnINTE.OVMCIE bit = 1, a measurement counter overflow error
interrupt request occurs at this point.
Max. count value
(0xffffff)
Initial value n
Measurement counter
0x000000 - n
Min. count value
(0x000000)
MC[23:0] = initial value (0x000000 - n)
Max. count value
(0xffffff)
Time base counter
Min. count value
(0x000000)
TC[23:0] = 0x000000
Figure 18.4.4.1 Counter Operations During Reference/Sensor Oscillation
Forced termination
To abort reference oscillation or sensor oscillation, write 0 to the RFCnTRG.SREF bit (reference oscillation),
the RFCnTRG.SSENA bit (sensor A oscillation), or the RFCnTRG.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 coun-
ter 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 18.4.4.1 lists the error factors. (n: measurement counter
initial value, m: measurement counter value at the end of sensor oscillation)
18-6
(normal termination)
EREFIF = 1, SREF = 0
Count up
Overflow
(error termination)
OVTCIF = 1, SREF = 0
Count up
Reference oscillation time t
REF
SREF = 1
Start reference oscillation
Seiko Epson Corporation
Overflow
(error termination)
OVMCIF = 1, SSENx = 0
Count up
0x000000
(Automatically set by reference oscillation
or set via software)
(Automatically set by reference oscillation
or set via software)
Count down
Sensor oscillation time t
SEN
SSENx = 1
Start sensor oscillation
Overflow
Count value m1
Varies depending on
the environment
Count value m2
Calculate the sensor detecting
value from the measurement
counter value m1 and m2.
Time
(= t
)
REF
Underflow
(normal termination)
ESENxIF = 1, SSENx = 0
Software settings
S1C17W15 TECHNICAL MANUAL
(Rev. 1.3)

Advertisement

loading