Manual ME-582x Series
Revision 0.9
4 Programming
page 25
Meilhaus Electronic
ME_TYPE_FI, subtype ME_SUBTYPE_SINGLE. Each channel can be
programmed independently.
With the ME-5821 board, 4 additional frequency measurement channels
(FI_C0…3) are available which can be addressed as one subdevice.
Note:
If the frequency and duty cycle are the magnitudes you want, these
can easily be calculated from the values returned for
<pdTime>.
The for-
mula is:
Frequency [Hz] = 1/period [s]
Duty cycle [%
] =
(„duration of the first phase of the period“[s]/ period [s] x
100
4.1.2.2
Pulse Generator
In the pulse generator operating mode (FO = "Frequency Output") you can
output rectangular signals with a variable duty cycle at frequencies of up to
3 kHz and with a resolution of 1 tick. On the ME-5820, all 4 pulse genera-
tor channels (FO_B0…3) are addressed as subdevices of type
ME_TYPE_FO, subtype ME_SUBTYPE_SINGLE. Each channel can be
programmed independently.
The first phase of the rectangular signal is "high" by default. By setting the
ME_IO_SINGLE_TYPE_FO_START_LOW flag it is also possible to start
the output with a "low" level.
With the ME-5821 board, 4 addition
al pulse generators (FO_D0…3) are
available, addressed as one subdevice.
Note:
An output channel can also be read back!
4.1.3
Counters (8254)
ME-5820
ME-5821
✔
✔
The programming of the counters is done in operation mode „Single“. A
counter device of type 82C54 provides three 16-bit counters. Each counter
is accessed as a subdevice of type ME_TYPE_CTR, subtype ME_SUB-
TYPE_CTR_8254.
Note
the order of operation as described in the ME-iDS
manual and in the ME-iDS help file (see ME-iDS Control Center).