
S1C621C0 TECHNICAL MANUAL
EPSON
55
CHAPTER 4: PERIPHERAL CIRCUITS AND OPERATION (R/F Converter)
4.10.3 Operation of R/F conversion
(1) Counter
The R/F converter incorporates two types of counters. One is the measurement counter MCxx that
counts the aforementioned oscillation clock, and the other is the time base counter that counts the
internal clock for reference counting.
The measurement counter is used to count (count up) the CR oscillation clock by the reference resist-
ance and sensor, and the results of R/F conversion can be obtained by reading this counter. The
measurement counter is 16 bits (MC00–MC15) and can be read in 4-bit units.
This counter is designed so that it counts serially in order of the reference resistance and the sensor.
Also it switches the CR oscillation from reference resistance to sensor at the point an overflow occurs
(counter = 0000H) during counting of the reference resistance oscillation. Furthermore, both of the
oscillation times of the reference resistance and sensor are designed to be the same by the time base
counter described later. Therefore, by converting a proper initial value for counting of the oscillation of
the reference resistance into a complement (value subtracted from 0000H) and setting it into the counter
before starting to count, the number of counts for the sensor oscillation is obtained by reading this
counter after the R/F conversion. In other words, the difference between the reference resistance and
sensor oscillation frequencies can be found easily. For instance, if resistance values of the reference
resistance and the sensor are equivalent, the same value as the initial value before converting into a
complement will be obtained as the result.
The time base counter is a 16-bit up/down counter to equal both oscillation times for the reference
resistance and the sensor. For the input clock, either OSC1 clock (Typ. 32.768 kHz) or OSC3 clock (Typ.
455 kHz) can be selected using the software. This selection can be done using the register RFCLK
(D0HD1). When "1" is set to the register, OSC3 clock is selected and when "0" is set, OSC1 clock is
selected.
When R/F conversion is started, the time base counter starts counting-down from "0000H" at the same
time the measurement counter starts counting for oscillation by reference resistance. After that, when
the oscillation switches to the sensor side, this counter also switches to counting-up and counts up
oppositely from the value that is counted during oscillation of the reference resistance. The counting-up
continues until the counter value is "0000H". When the counter becomes "0000H", the counter stops and
the sensor oscillation also stops. In other words, the oscillation times of reference resistance and sensor
can be made the same.
(2) R/F conversion sequence
R/F conversion starts by writing "1" to the register RFRUN (D2HD1).
Further the following settings must be done before starting the R/F conversion.
1. Sensor selection (SENS0)
2. Selecting the time base counter input clock (RFCLK)
3. Initial value setting to the measurement counter
4. Turning the OSC3 oscillation ON (OSCC) ...when the OSC3 clock is selected at 2.
Note: It takes at least 5 msec from the time the OSC3 oscillation circuit goes ON until the oscillation
stabilizes. Consequently, when starting a remote output, secure 5 msec or more waiting time for
oscillation stabilization after turning the OSC3 oscillation ON.
Further, the oscillation stabilization time varies depending on the external oscillator characteristics
and conditions of use, so allow ample margin when setting the waiting time.
When R/F conversion is initiated by the RFRUN register, oscillation by the reference resistance begins
first, and the measurement counter starts counting up from the initial value by the oscillation clock. The
time base counter also starts counting down by the internal clock.
Timing in starting oscillation and starting counting are shown in Figure 4.10.3.1.
CR oscillation starts in synchronizing with the falling edge of the OSC1 or OSC3 clock (one of these that
is selected as the time base counter input clock) immediately after writing "1" to the RFRUN register.
The measurement counter starts counting up at the falling edge of the first clock after CR oscillation is
initiated.
The time base counter becomes enable at the falling edge of the first internal clock (OSC1 or OSC3).
Then, it counts down by the falling edge of the internal clock.