DNA/DNR-IRIG-650 IRIG Timing Layer
Chapter 3
25
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.
The time code always starts with two
position
identifiers (rarely used legacy
timecodes use a single position identifier which can be accommodated by
setting input
mode
with the
CT650_IN_P0_ONLY
flag). The Time Decoder waits
until two position identifiers come one after another and then begin decoding
symbols one by one.
The
command
field identifies which type of character is expected to be received
in this position. Following characters are valid for input:
CT650_VAL_NOP 0
// 000 - NOP, go to the next
// character in the message
CT650_VAL_01 4
// 100 - "0" or "1" is expected,
// copy to target register
CT650_VAL_P 5
// 101 - Px marker is expected
CT650_VAL_0 6
// 110 - "0" is expected
CT650_VAL_1 7
// 111 - "1" is expected
The
Bit
field can be one of the following:
#define BCD_NoP_b() (0)
//No operation for BCD section
#define BCD_SEC100_b(B) ((B))
// 1/100 of a second
#define BCD_SEC10_b(B) ((B)+8)
// 1/10 of a second
#define BCD_SEC_b(B) ((B))
// seconds
#define BCD_MIN_b(B) ((B)+8)
// minutes
#define BCD_HOUR_b(B) ((B))
// hours
#define BCD_DAYS_b(B) ((B))
// days
#define BCD_YEAR_b(B) ((B))
// year
#define BCD_LEAPYR_b() ((8))
// leap year flag
#define BCD_DLFLAG_b() ((9))
// DL flag
// SBS_SEC_b(B): 17th SBS second bit is stored in TREG2/BIT15
#define SBS_SEC_b(B) (((B)<=15)?(B):(15))
#define CF_NoP_b() (0)
// No operation for CF section
#define SBS_NoP_b() (0)
// No operation for SBS section
The
Bit
field defines the bit position in the time registers (TREGs) table where
this data is stored.
The
Register
field defines in which register the data is located:
#define BCD_NoP_r() (0)
// No operation for BCD section
#define BCD_SEC100_r(B) ((0))
// 1/100 of a second
#define BCD_SEC10_r(B) ((0))
// 1/10 of a second
#define BCD_SEC_r(B) ((1))
// seconds
#define BCD_MIN_r(B) ((1))
// minutes
#define BCD_HOUR_r(B) ((2))
// hours
#define BCD_DAYS_r(B) ((3))
// days
#define BCD_YEAR_r(B) ((5))
// year
#define BCD_LEAPYR_r() ((2))
// leap year flag
#define BCD_DLFLAG_r() ((2))
// No operation for CF section
#define SBS_SEC_r(B)
// SBS seconds register
#define CF_NoP_r() (0)
// No operation for CF section
#define SBS_NoP_r() (0)
// No operation for SBS
section