19 R/F CONVERTER (RFC)
19-4
Seiko epson Corporation
S1C17F13 TeChniCal Manual
(Rev. 1.0)
4. Configure the following RFC
n
CTL register bits:
- RFC
n
CTL.EVTEN bit
(Enable/disable external clock input mode)
- RFC
n
CTL.SMODE[1:0] bits
(Select oscillation mode)
- Set the RFC
n
CTL.MODEN bit to 1. (Enable RFC operations)
Operating Modes
19.4.2
The RFC has two oscillation modes that use the RFC internal oscillation circuit and an external clock input mode
for measurements using an external input clock. The channels may be configured to a different mode from others.
Oscillation mode
The oscillation mode is selected using the RFC
n
CTL.SMODE[1:0] bits.
DC oscillation mode for resistive sensor measurements
This mode performs measurements by DC driving the reference resistor and the resistive sensor to oscillate.
Set the RFC into this mode when a DC bias resistive sensor is connected. This mode allows connection of
two resistive sensors to a channel.
AC oscillation mode for resistive sensor measurements
This mode performs measurements by AC driving the reference resistor and the resistive sensor to oscillate.
Set the RFC into this mode when an AC bias resistive sensor is connected. One resistive sensor only can be
connected to a channel.
External clock input mode (event counter mode)
This mode enables input of external clock/pulses to perform counting similar to the internal oscillation clock.
A sine wave may be input as well as a square wave (for the threshold value of the Schmitt input, refer to “R/F
Converter Characteristics, High level Schmitt input threshold voltage V
T+
and Low level Schmitt input thresh-
old voltage V
T-
” in the “Electrical Characteristics” chapter). This function is enabled by setting the RFC
n
CTL.
EVTEN bit to 1. The measurement procedure is the same as when the internal oscillation circuit is used.
RFC Counters
19.4.3
The RFC incorporates two counters shown below.
Measurement counter (MC)
The measurement counter is a 24-bit presettable up counter. Counting the reference oscillation clock and the
sensor oscillation clock for the same duration of time using this counter minimizes errors caused by voltage,
and unevenness of IC quality, as well as external parts and on-board parasitic elements. The counter values
should be corrected via software after the reference and sensor oscillations are completed according to the sen-
sor characteristics to determine the value being currently detected by the sensor.
Time base counter (TC)
The time base counter is a 24-bit presettable up/down counter. The time base counter counts up with TCCLK
during reference oscillation to measure the reference oscillation time. During sensor oscillation, it counts down
from the reference oscillation time and stops the sensor oscillation when it reaches 0x000000. This means that
the sensor oscillation time becomes equal to the reference oscillation time. The value counted during reference
oscillation should be saved in the memory. It can be reused at subsequent sensor oscillations omitting reference
oscillations.
Counter initial value
To obtain the difference between the reference oscillation and sensor oscillation clock count values from the
measurement counter simply, appropriate initial values must be set to the measurement counter before starting
reference oscillation.