Timer/counter output objects, Edgedivide output – Echelon FT 3150 Smart Transceiver User Manual

Page 86

Advertising
background image

Chapter 3 - Input/Output Interfaces

80

FT 3120 / FT 3150 Smart Transceiver Data Book

A call to this function returns the current value of the totalcount value corresponding to the total number of active
clock edges since the last call. The counter is then reset, and ready for the next series of input transitions.

The actual active edge of the input depends on whether or not the invert option was used in the declaration of the
function block. The default is the negative edge.

Timer/Counter Output Objects

Edgedivide Output

This output object acts as a frequency divider by providing an output frequency on either pin IO0 or IO1. The output
frequency is a divided-down version of the input frequency applied on pins IO4 – IO7. The object is useful for any
divide-by-n operation, where n is passed to the timer/counter object through the application program and can be from
1 to 65,535. The value of 0 forces the output to the off level and halts the timer/counter.

A new divide value will not take effect until after the output toggles, with two exceptions: if the output is initially
disabled, the new (non-zero) output will start immediately after t

fout

; or, for a new divide value of 0, the output is

disabled immediately.

Normally the negative edges of the input sync pulses are the active edge. Using the invert keyword in the object
declaration makes the positive edge active.

The initial state of the output pin is logic 0 by default. This can also be changed to logic 1 through the object
declaration.

Figure 3.44 shows the pinout and timing information for this output object.

Advertising
This manual is related to the following products: