DNA/DNR-IRIG-650 IRIG Timing Layer
Chapter 3
27
Programming with the Low Level API
Tel: 508-921-4600
www.ueidaq.com
Vers:
4.6
Date: March 2019
DNx-IRIG-650 Chap3x.fm
© Copyright 2019
United Electronic Industries, Inc.
<tcsize>
should be set to accommodate all characters in the timecode (for
example IRIG-B has 100 characters in the code).
Decoded data is represented as follows:
The second function
DqAdv650GetTimeRegisters()
returns content of
sixteen time registers as an array of sixteen uint32’s:
ret = DqAdv650GetTimeRegisters(hd, devn, time_regs);
printf("--TREGx S10:%x M/S:%x H:%x D:%x SBS:%x Y:%x\n",
time_regs[0], time_regs[1], time_regs[2], time_regs[3],
time_regs[4], time_regs[5]);
The structure of the time registers (
TREG)
is:
The Firmware takes care of setting proper parameters for the analog input part
of the Time Decoder based on the timecode parameters selected. One other
function available to advanced users is:
int DqAdv650SetAMZCMode(int hd, int devn, uint32 flags, int
zc_adjust)
This function can override calculated setting made by the firmware. It needs to
be called after
DqAdv650SetTimecodeInput()
with the
CT650_IN_DISABLED
flag, but before enabling layer input with
DqAdv650Enable()
.
Bit
Name
Description
Reset
state
31-2
SP_RSV
For first two characters – “Special bits”:
Character 0 : layer’s timestamp bits [29:0] (in 10us intervals)
Character 1 : phase delay of the input (bits [29:0])
For all other characters - reserved
0
1-0
CHAR
Decoded characters
CT650_CHAR_IDLE=0
Idle character (0% duty cycle)
CT650_CHAR_POS=1
Position Identifier (80% duty cycle typical)
CT650_CHAR_ZERO=2
Logic “0” (20% duty cycle typical)
CT650_CHAR_ONE=3
Logic “1” (80% duty cycle typical)
0
Address
Register
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
0x2100
TREG0
BCD 1/10s of the seconds
BCD 1/100s of the seconds
0x2104
TREG1
BCD Minutes
BCD Seconds
0x2108
TREG2
SBS[16]
DL flag
Leap year
BCD Hours
0x210C
TREG3
BCD days
0x2110
TREG4
Straight Binary Seconnds (SBS) [15:0]
0x2114
TREG5
0x2118
TREG6
0x211C
TREG7
0x2120
TREG8
0x2124
TREG9
0x2128
TREG10
0x212C
TREG11
0x2130
TREG12
Phase delay MSB
(value of the CT650_DBCNT)
0x2134
TREG13
Phase delay LSB
(value of the CT650_DBCNT)
0x2138
TREG14
Timestamp MSB
(value of the layer's timestamp register)
0x213C
TREG15
Timestamp LSB
(value of the layer's timestamp register)