BECKHOFF DK9222-0213-0063 User Manual

Page 8

Advertising
background image

XFC

Oversampling

Application Note DK9222-0213-0063

4 | Identifying high and low bits

The duration between two transitions indicates the bit state (high = 1 or low = 0). When transitions (changes in the sign
of the signal’s value) are detected, the time between the transitions is measured and named ConstantTime. The value of
ConstantTime is compared to 330 µs to identify the bit status.
The lower duration limit between two transitions is 417 µs at 30 fps, the upper limit of a half duration is 260 µs at 24 fps (0.5 x
520 µs). This results in a reference of < 330 µs as this fixed limit matches all frame rates when searching for high and low bits:
– If ConstantTime > 330 µs, the transitions include a low bit (0). (“duration long”)
– If ConstantTime < 330 µs, the two transitions measured could be part of a triple identifying a high bit (1). If the next

period is < 330 µs, too, the high bit (1) is identified. (“duration short”)

5 | Analysing the bitstream

To identify a bit as 1, the Even variable is set to TRUE at the first detection of “duration short”. If Even still is TRUE, as a
“duration long” is detected, an error occurs (FrameError), because the number of consecutive ocurrences of “duration short”
must always be even. Therefore a high bit (1) can only be identified, if a low bit (0) has occurred before. With First_BitZero_
Reach
, the detection of a high bit (1) is started only, if a low bit (0) has already been detected before.
The detected bits are stored to the array Tab_TimeCodeFrame which contains the sequence of bits detected in the timecode
signal.

6 | Extracting the bits

As the timecode frame consists of 80 bits, the next step to extract a valid frame is going through the array Tab_
TimeCodeFrame
to find the bit sequence of the SyncWord: If the SyncWord sequence is detected behind position 80 in the
array, a valid frame can be extracted to LastTimeCodeFrame. From here the information can be decoded to TimeCodeFrame
with table 2 to read the information inside.
To prevent overflow of the array TimeCodeFrame, an error is set in Index_Tab_TimeCodeFrame_Error if more than 300
timecode bits are detected without a SyncWord sequence.

New Automation Technology

BECKHOFF

8

For application notes see disclaimer on the last page

Advertising