Dualslope input – Echelon FT 3150 Smart Transceiver User Manual

Page 77

Advertising
background image

FT 3120 / FT 3150 Smart Transceiver Data Book

71

Timer/Counter Input Objects

Input timer/counter objects have the advantage (over non-timer/counter objects) in that input events will be captured
even if the application processor is occupied doing something else when the event occurs. A true when statement
condition for an event being measured by a timer/counter is the completion of the measurement and a value
being returned to an event register. If the processor is delayed due to software processing and cannot read the
register before another event occurs, then the value in the register will reflect the status of the last event. The
timer/counters are automatically reset upon completion of a measurement. The first measured value of a
timer/counter is always discarded to eliminate the possibility of a bad measurement after the chip comes
out of a reset condition.
Single events can not be measured with the timer/counters. Figure 3.35 shows an
example of how the timer/counter objects are processed with a Neuron C when statement.

Figure 3.35 Example of when Statement Processing Using the Ontime Input Function

Dualslope Input

This input object uses a timer/counter to control and measure the integration periods of a dualslope integrating analog
to digital converter (see Figure 3.36). The timer/counter provides the control output signal and senses a comparator
output signal. The control output signal controls an external analog multiplexer which switches between the unknown
input voltage and a voltage reference. The input pin of the timer/counter is driven by an external comparator which
compares the output of the integrator with a voltage reference. At the end of conversion, the external comparator will
drive a low level to one of pins IO4 – IO7. If external circuitry indicates “end of conversion” with a high level, use
the invert keyword in the I/O declaration.

Example of a
when
statement
missing a present
event but evalu-
ating a previous
event

TIME

INPUT

SIGNAL

Example of a
when statement
evaluating true
(unless it is the
first event)

STOP TIMER/COUNTER
SET FLAG LOAD NEW VALUE
INTO REGISTER

START

TIMER/

COUNTER

READ TIMER/COUNTER FLAG AND REGISTER

FROM THE PREVIOUS EVENT

END OF

io_in()

START OF

io_in()

STOP

TIMER/COUNTER

SET FLAG

LOAD EVENT

REGISTER

START

TIMER/

COUNTER

TIME

INPUT

SIGNAL

(event)

t

ret

t

fin

READ

TIMER/

COUNTER
FLAG AND

REGISTER

CLEAR FLAG

END OF

io_in()

START OF

io_in()
(when

statement)

t

ret

t

fin

Advertising
This manual is related to the following products: