16 R/F COnVeRTeR
16-6
Seiko epson Corporation
S1C63003/004/008/016 TeChniCal Manual
(Rev. 1.1)
Measurement counter
(MC)
(00000H-n)
(1) Set the initial value
00000H-n
00000H
Count up
FFFFFH
0
0
Count up
:
m
Time base counter
(TC)
00000H
Count down
:
x
x
FFFFFH
00000H
(2) Start reference oscillation
(Set RFRUNR to "1")
(3) Read the measurement counter and process the m - n value by the program
Setting by software
Set the complement of the initial
value n on the measurement counter.
Set "00000H" on the time base counter.
(Set "00000H" on the measurement counter.
Set x on the time base counter.)
Oscillation by
reference resistance
The CR oscillation stops when
the measurement counter overflows
and an interrupt occurs. Save the TC value
into the memory.
When the value of the time base
counter reaches "00000H,"
oscillation and counting stop,
and an interrupt occurs.
Oscillation by
sensor
Count up
Reference oscillation
(1) Set the initial value
(00000H)
(x)
(2) Start sensor oscillation
(Set RFRUNS to "1")
Sensor oscillation
4.3 Sequence of R/F conversion
Figure 16.
Note: Set the initial value of the measurement counter taking into account the measurable range and the
overflow of counters.
interrupt Function
16.5
The R/F converter has a function which allows interrupt to occur when an R/F conversion has completed or an error
has occurred.
When the measurement counter reaches "00000H" during counting of the reference oscillation, both counters stop
counting and RFRUNR is set to "0." At the same time, the interrupt factor flag IRFR is set to "1."
When the time base counter reaches "00000H" during counting of the sensor oscillation, both counters stop counting
and RFRUNS is set to "0." At the same time, the interrupt factor flag IRFS is set to "1."
If the measurement counter overflows during counting of the sensor oscillation, both counters stop counting and
RFRUNS is set to "0." In this case, the interrupt factor flag IRFE is set to "1." At the same time, the OVMC flag is
also set to 1.
If the time base counter overflows during counting of the reference oscillation, both counters stop counting and
RFRUNR is set to "0." In this case, the interrupt factor flag IRFE is set to "1." At the same time, the OVTC flag is
also set to 1.
These interrupt factors allow masking by the interrupt mask registers EIRFR, EIRFS and EIRFE, and an interrupt is
generated to the CPU when these registers are set to "1." When the interrupt mask register is set to "0," an interrupt
is not generated to the CPU even if the interrupt factor flag is set to "1." The interrupt factor flag is reset to "0" by
writing "1."
Timing of interrupt by the R/F converter is shown in Figures 16.5.1 to 16.5.4.