Datavideo HDR-40/50 422 Protocol Reference V1.2

Datavideo HDR-40/50 422 Protocol Reference V1.2
Datavideo HDR-40/50 422 Protocol Reference V1.2
1.Interface Overview





Conforming to EIA RS-422A.
Full duplex communications channel is utilized.
Data is transmitted asynchronously, bit serial, word serial with data exchange between devices.
Standard transmission rate on the interface bus is 38400 bits per seconds (bps)
The data word utilized by the interface system is as follows :
START
BIT

D0
D1
D2
D3
D4
D5
D6
D7
PARITY
(ODD)
STOP
BIT
1 Start bit + 8 Data bits + 1 Parity bit + 1 Stop bit. Odd Parity
ODD parity : The total of “1”s in D0+D1+ . . . D7+PARITY equals an odd number.
1
2.Command Block Format
The data communication is composed of the CMD-1/DATA COUNT byte, the CMD-2 byte, optional DATA bytes
and the CHECKSUM byte. Commands are transmitted in order from the MSB (Most Significant Byte) to the LSB
(Least Significant Byte). This means that when using the examples in this manual, the order in which the bytes are read
is the same order in which they are transmitted. When the DATA COUNT nibble is 0, no DATA bytes are transmitted
or required (the CMD-1/DATA COUNT byte, CMD-2 byte and CHECKSUM byte are still transmitted). When the
DATA COUNT nibble is not 0, the number of DATA bytes transmitted must correspond with the DATA COUNT.
These bytes are inserted between the CMD-2 byte and CHECKSUM byte.
COMMAND BLOCK FORMAT
The data communication between the controller and the device is performed as follows:
Name
CMD-1
Data
Count
Nibble
MSN
LSN
Size
CMD-2
1 Byte
1 Byte
Data 0~15
(per Data Count)
0..15 Byte(s)

MSN stands for Most Significant Nibble (4 bits)

LSN stands for Least Significant Nibble (4 bits)
Checksum
1 Byte
COMMAND CONTENTS
CMD-1:
This is the first (Most Significant) nibble of the first byte of the command. The DATA COUNT (below)
fills the lower (Least Significant) nibble. It (CMD-1) indicates the command or return group to which the command
belongs as per the table below
CMD-1
Function
Initiator
0x
System Control
Controller
1x
System Control Return
Device (HDR-40/50)
2x
Transport Control
Controller
4x
Preset And Select Control
Controller
6x
Sense Request
Controller
7x
Sense Return
Device (HDR-40/50)
Ex
DVR Control
Controller
Fx
DVR Return
Device (HDR-40/50)
DATA COUNT:
This is the second (Least Significant) nibble of the first byte of the command. The upper (Most Significant)
nibble is filled by the CMD-1 (above). It indicates the number of data bytes (0-15) that are required to be
inserted between the CMD-2 byte and the CHECKSUM byte.
2
CMD-2:
Designates the exact command within the section specified by CMD-1.
DATA 0..15:
If the command requires extended data, the DATA COUNT will be set to between 1 and 15 (a 0 indicates
that no extra data is required). These bytes will be placed here.
CHECKSUM:
This byte is used to check the data for communication errors. To calculate the checksum, each byte of the
command (CMD-1+DATA COUNT, CMD-2, and any DATA BYTES) are added together. The least
significant 8 bits (1 byte) are then truncated to create a 1-byte checksum.
I.e.: The command “61.0C.03” becomes
MSB
LSB
0110
0001
(=61)
0000
1100
(=0C)
+)
0000
0011
(=03)
0111 0001
(=70)
CHECKSUM = “70”
Therefore, the complete command is “61.0C.03.70”
3
3.Connector Pin Assignment
Interface : 9 pin D-Sub female
The RS-422 pin assignment of the Controller and HDR-40/50 is shown in the following table:
Signal
Controller
HDR-40/50
Pin
1
Frame Ground
Frame Ground
2
Receive A(RX-)
Transmit A(TX-)
3
Transmit B(TX+)
Receive B(RX+)
4
Transmit Common
Receive Common
5
Spare
Spare
6
Receive Common
Transmit Common
7
Receive B(RX+)
Transmit B(TX+)
8
Transmit A(TX-)
Receive A(RX-)
9
Frame Ground
Frame Ground
The RS-232 pin assignment of the Controller and HDR-40/50 is shown in the following table:
Signal
Controller
HDR-40/50
Pin
1
-
-
2
Receive (RX)
Transmit (TX)
3
Transmit (TX)
Receive (RX)
4
-
-
5
GND
GND
6
-
-
7
-
-
8
-
-
9
-
-
4
4.Communication Protocol
1.
All communications between the CONTROLLER and the DEVICE will be under the direct supervision of the
CONTROLLER.
When the DEVICE (HDR-40/50) receives the COMMAND from CONTROLLER, the following COMMAND
is returned.
•
ACK:
In case that the DEVICE receives a COMMAND not requiring data
•
COMMAND+DATA:
In case that the DEVICE receives a COMMAND requiring data
•
NAK+ERROR DATA:
In case that a communication error is detected or an undefined
COMMAND is received
2.
The CONTROLLER must not transmit additional COMMAND blocks to a DEVICE (HDR-40/50) prior to
response to a previous COMMAND block.
3.
The CONTROLLER must transmit of bytes in a COMMAND block for with intervals less than 10
milliseconds. If a DEVICE (HDR-40/50) detects an interruption of a byte in a COMMAND block that exceeds
10 milliseconds, it executes a TIME-OUT error sequence, voids the receiving COMMAND block, and transmit
a NAK (TIME OUT).
4.
When a DEVICE (HDR-40/50) receives a COMMAND block from the CONTROLLER, the DEVICE must
transmit a response within 9 milliseconds. Therefore if the CONTROLLER cannot receive the appropriate
response from the DEVICE within 10 milliseconds after transmitting the COMMAND block the
CONTROLLER detects a communication error, and must execute an appropriate process.
5.
When a DEVICE (HDR-40/50) detects a communication error, it must immediately transmit a NAK to the
CONTROLLER. (The content of an error is shown on the COMMAND tables.) When the CONTROLLER
receives a NAK, if must immediately stop transmission of the block. The DEVICE must not accept a
subsequent command within 10 milliseconds after that (except NAK-UNDEFINED command) and must
execute a necessary process.
5
5.Command Table (without Checksum byte)
Command
Name
Response
Name
10h 01h
Acknowledge (ACK) – command succeeded
12h 11h
Device Return
11h 12h
Negative Acknowledge (NAK) – command failed
00h 11h
Device Type Request
12h 11h
Device Type Response
20h 00h
Stop
10h 01h
ACK
20h 01h
Play
10h 01h
ACK
20h 02h
Record
10h 01h
ACK
20h 10h
Fast Forward
10h 01h
ACK
2xh 13h
Shuttle Forward
10h 01h
ACK
21h 13h 00h
Pause
10h 01h
ACK
20h 20h
Fast Rewind
10h 01h
ACK
2xh 23h
Shuttle Rewind
10h 01h
ACK
40h 50h
Next Track
10h 01h
ACK
40h 51h
Previous Track
10h 01h
ACK
40h 54h
Delete Current Track
10h 01h
ACK
40h 62h
Enable HDD mode
10h 01h
ACK
41h 52h nnh mmh
Select Track (Track 01 ~ 99)
10h 01h
ACK
42h 52h nnh mmh
Select Track (Track 001 ~ 999)
10h 01h
ACK
41h 53h nnh
Select Video Input Source
10h 01h
ACK
41h 61h nnh
Select Audio Input Source
10h 01h
ACK
61h 0Ch 01h
Current Time Sense
74h 04h
Current Time
61h 20h
Status Sense
7xh 20h
Current Status
E0h 01h
Get Length of Current Track
F4h 01h
Length of Track
E0h 02h
Video Control Data Sense
F1h 02h
Video Control Data
E0h 03h
Audio Control Data Sense
F1h 03h
Audio Control Data
E0h 04h
Current Track Number Data Sense (Track 01 ~ 99)
F1h 04h
Track Number (BCD)
E0h 05h
Current Track Number Data Sense (Track 001 ~ 999) F2h 05h
Track Number (BCD)
E6h 06h
Current Encode Bit Rate Sense
F1h 06h
Bit Rate
E2h 10h 01h nnh
Set Loop Play
10h 01h
ACK
10h 01h
ACK
E3h 10h AAh 55h 01h Format Hard Disk
6
6.Detailed Description of Commands
00h 11h : DEVICE TYPE REQUEST
Send: 00h 11h 11h
Return: 12h 11h B0h 11h E4h (HDR-40/50)
7
20h 00h : STOP
Send: 20h 00h 20h
Return: 10h 01h 11h
20h 01h : PLAY
Send: 20h 01h 21h
Return: 10h 01h 11h
20h 02h : RECORD
Send: 20h 02h 22h
Return: 10h 01h 11h
20h 10h : FAST FORWARD
Send: 20h 10h 30h
Return: 10h 01h 11h
2xh 13h : SHUTTLE FORWARD
Send: 21h 13h 01h 35h
Return: 10h 01h 11h
21h 13h 00h : PAUSE
Send: 21h 13h 00h 34h
Return: 10h 01h 11h
20h 20h : FAST REWIND
Send: 20h 20h 40h
Return: 10h 01h 11h
2xh 23h : SHUTTLE REWIND
Send: 21h 23h 01h 45h
Return: 10h 01h 11h
8
40h 50h : NEXT TRACK
Send: 40h 50h 90h
Return: 10h 01h 11h
40h 51h : PREVIOUS TRACK
Send: 40h 51h 91h
Return: 10h 01h 11h
40h 54h : DELETE CURRENT TRACK
Send: 40h 54h 94h
Return: 10h 01h 11h
40h 62h : ENABLE HDD MODE
Send: 40h 62h A2h
Return: 10h 01h 11h
41h 52h NNh : SELECT TRACK NUMBER (Track 01 ~ 99)
NN = Track Number
Send: 41h 52h 01h 94h (Select Track 1)
Return: 10h 01h 11h
Send: 41h 52h 10h A3h (Select Track 16)
Return: 10h 01h 11h
42h 52h NNh MMh : SELECT TRACK NUMBER (Track 001 ~ 999)
NN = Track Number (Hex) % 100h
MM = Track Number (Hex) / 100h
Set track number to 900(384h):
NN = 384h % 100h = 84h (quotient)
MM = 384h / 100h = 03h
Send: 42h 52h 84h 03h 1Bh (Select Track 900)
Return: 10h 01h 11h
Set track number to 168(A8h):
NN = A8h % 100h = A8h (quotient)
MM = A8h / 100h = 00h
Send: 42h 52h A8h 00h 3Ch (Select Track 168)
Return: 10h 01h 11h
9
10
41h 53h NNh : SELECT VIDEO INPUT SOURCE
NN = Video Source, 1 = SDI, 2 = Decode MPEG-2
Send: 41h 53h 01h 95h (SDI input)
Return: 10h 01h 11h
Send: 41h 53h 02h 96h (Decode MPEG-2)
Return: 10h 01h 11h
41h 61h NNh : SELECT AUDIO INPUT SOURCE
NN = Audio Source, 0 = Analog audio, 1 = SDI Embedded Audio
Send: 41h 61h 00h A2h (Analog audio input)
Return: 10h 01h 11h
Send: 41h 61h 01h A3h (SDI Embedded Audio)
Return: 10h 01h 11h
11
61h 0Ch 01h : CURRENT TIME SENSE
Send: 61h 0Ch 01h 6Eh
Return: 74h 04h 01h 02h 03h 04h 82h (Time code 04:03:02:01)
61h 20h : STATUS SENSE
DATA-1 Most Significant Nibble = 1st status data byte number to be returned
DATA-1 Least Significant Nibble = number of status data bytes to be returned
Send: 61h 20h 03h 84h (return data byte 0, 1, and 2)
Return: 73h 20h 00h 81h 80h 94h
Send: 61h 20h A1h 22h (return the current track number)
Return: 71h 20h 99h 2Ah (Current track number is 99)
12
E0h 01h : TRACK LENGTH SENSE
Send: E0h 01h E1h
Return: F4h 01h 29h 41h 56h 00h B5h (Track Length 00:56:41:29)
E0h 02h : VIDEO CONTROL DATA SENSE
1 = SDI, 2 = Decode MPEG-2
Send: E0h 02h E2h
Return: F1h 02h 01h F4h (SDI Input)
Send: E0H 02h E2h
Return: F1h 02h 02h F5h (Decode MPEG-2)
E0h 03h : AUDIO CONTROL DATA SENSE
0 = Analog audio, 1 = SDI Embedded Audio
Send: E0h 03h E3h
Return: F1h 03h 00h F4h (Analogue Input)
E0h 04h : CURRENT TRACK NUMBER SENSE
Send: E0h 04h E4h
Return: F1h 04h 17h 0Ch (Current Track Number is 17<BCD>)
E0h 05h : CURRENT TRACK NUMBER SENSE (Track 001 ~ 999)
Send: E0h 05h E5h
Return: F2h 05h 17h 01h 0Fh (Current Track Number is 117 <BCD>)
E0h 06h : CURRENT ENCODE BIT RATE SENSE
Send: E0h 06h E6h
Return: F1h 06h 3Ch 33h (I-Frame Only = Disable, Current Bit Rate = 60Mbps)
E2h 10h 01h NNH: Set Loop Play
NN = Disable (00h) or Enable (01h)
Send: E2h 10h 01h 00h F3h (Disable Loop Play)
Return: 10h 01h 11h
Send: E2h 10h 01h 01h F4h (Enable Loop Play)
Return 10h 01h 11h
13
E3h 10h AAh 55h 01h : Format Hard Disk
Send: E3h 10h AAh 55h 01h F3h
Return: 10h 01h 11h
14
7.Return Data
10h 01h : ACK
When a command from the CONTROLLER is received normally, the DEVICE returns this
command as acknowledgment.
11h 12h : NAK
When a communication error is detected or an undefined COMMAND is received, the
DEVICE returns this command as not-acknowledgment.
BIT-7 to BIT-0 of DATA-1 will be set in accordance with the contents.
[DATA-1]
BIT-7
BIT-6
BIT-5
BIT-4
BIT-3
BIT-2
BIT-1
BIT-0
TIME OUT
FRAMING
ERROR
OVERRUN
ERROR
PARITY
ERROR
INHIBIT
CHECKSUM
ERROR
SOFTWARE
OVERRUN
UNDEFINED
COMMAND
12h 11h : DEVICE TYTPE
The “00h 11h : DEVICE TYPE REQUEST” command is used for asking the specifications
of the HDR-40/50 used as DEVICE. When the DEVICE receives this command, it attaches
2-bytes specification data to “12h 11h : DEVICE TYPE” and sends the information to the
CONTROLLER.
HDR-40/50: 12h 11h B0h 11h
15
74h 04h : Current Time Code (BCD)
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Data 0
0
0
Data 1
0
Tens of Seconds
Seconds
Data 2
0
Tens of Minutes
Minutes
Data 3
0
Tens of Frames
0
Tens of Hours
Send: 61h 0Ch 01h 6Eh
Return: 74h 04h 01h 02h 03h 04h 82h (Time code 04:03:02:01)
16
Bit 1
Frames
Hours
Bit 0
F4h 01h : Length of Current Track (BCD)
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Data 0
0
0
Data 1
0
Tens of Seconds
Seconds
Data 2
0
Tens of Minutes
Minutes
Data 3
0
Tens of Frames
0
Bit 1
Bit 0
Frames
Tens of Hours
Hours
Send: E0h 01h E1h
Return: F4h 01h 29h 41h 56h 00h B5h (Track Length 00:56:41:29)
F1h 04h : Current Track Number (BCD) (Track 01 ~ 99)
Bit 7
Data 0
Bit 6
Bit 5
Bit 4
Bit 3
Tens of Track Number (BCD)
Bit 2
Bit 1
Bit 0
Track Number (BCD)
Send: E0h 04h E4h
Return: F1h 04h 17h 0Ch (Current Track Number is 17 <BCD>)
F2h 05h : Current Track Number (BCD) (Track 001 ~ 999)
Bit 7
Bit
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Data 0
Tens of Track Number (BCD)
Track Number (BCD)
Data 1
0
Hundreds of Track Number (BCD)
Send: E0h 05h E5h
Return: F2h 05h 17h 01h 0Fh (Current Track Number is 117 <BCD>)
F1h 06h : Current Bit Rate
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Data 0 I-Frame Only
Current Encode Bit Rate (Hex)
Bit 7, I-Frame Only : 0 = Disable, 1 = Enable
Bit 6 ~ Bit 0 : Current Encode Bit Rate (Hex)
Send: E0h 06h E6h
Return: F1h 06h 1Eh 15h (I-Frame Only Disable, Current Bit rate = 30Mbps)
Send: E0h 06h E6h
Return: F1h 06h B2h A9h (I-Frame Only Enable, Current Bit rate = 50Mbps)
If I-Frame Only is enable then Bit Rate will be fixed at
HD: 100Mbps, SD: 50Mbps
17
Bit 0
8.Status return data
7xh 20h :
Bit 7
Data 0
Bit 6
Bit 5
Busy
Bit 4
Bit 3
Bit 2
Stop
Data 2
Shuttle
Bit 0
Record
Play
Hardware
Error
Disk Out
Data 1
Bit 1
Eject
Rewind
Fast
Forward
Reverse
Still
Data 3
Data 4
Data 5
Data 6
Lamp
Still
Lamp
Forward
Lamp
Reverse
Data 7
Data 8
Disk Full
Data 9
HDV
Type
Track is not
empty
(Rec.
Inhibit)
HDV
Monitor
GPI
Mode
GPI
Loop Play
Function
Data 10
Tens of Track Number(BCD) 0~9
Track Numbers(BCD) 0~9
Data 11
0
Hundreds of Track Number (BCD) 0~9
Data 10
Data 13
Data 14
SDI
Embedded
Analogue
Audio
Data 15
18
Decode
MPEG-2
Encode
SDI
Data-0
BIT-2 HARDWARE ERROR
This bit will set to 1 when a hardware error occurs in the device.
BIT-5 DISK OUT
The removable media is not present in the device.
BIT-7 BUSY
This bit is set to 1 if the device is currently unable to accept motion commands. Sense
commands will be accepted.
Data-1
BIT-0 PLAY
This bit will be set to 1 when the device goes into the PLAY mode.
BIT-1 RECORD
This bit will set to 1 when the device goes into the REC mode.
BIT-2 FAST FORWARD
This bit will be set to 1 when the device goes into the FAST FORWARD mode.
BIT-3 REWIND
This bit will be set to 1 when the device goes into the FAST REWIND mode.
BIT-4 EJECT
This bit will be set to 1 when the device EJECTs hard disk.
BIT-5 STOP
This bit will be set to 1 when the device is in STOP mode.
Data-2
BIT-1 STILL
This bit will be set to 1 when the device is paused and displays the current frame.
BIT-2 REVERSE
19
This bit will be set to 1 when the device is outputting its material in reverse of the the
normal order. When moving in the normal direction, it will be 0.
BIT-5 SHUTTLE
This bit will be set to 1 when the device goes into SHUTTLE command mode.
Data-6
BIT-4 LAMP REVERSE
This bit will be set to 1 when the device is searching backwards.
BIT-5 LAMP FORWARD
This bit will be set to 1 when the device is searching forwards.
BIT-6 LAMP STILL
This bit will be set to 1 when the device has finished searching.
Data-8
BIT-0 TRACK IS NOT EMPTY (REC INHIBIT)
If this bit is set to 1, record command will be ignored. (it is not an empty track)
BIT-4 DISK FULL
Set to 1 if the device has reached the end of hard disk.
Data-9
BIT-0 Loop Play Status
If this bit is set to 1, Loop Play is enable
BIT-1 GPI Function
0: RECORD/RECORD PAUSE
1: PLAY/PLAY PAUSE
BIT-2 GPI Mode
0: Edge/Pulse Trigger
1: Level Trigger
BIT-3 HDV Monitor
0: Disable
1: Enable
20
BIT-4 HDV Type
00: 1080 59i
01: 1080 50i
10: 720 59p
11: 720 50p
Data-10
BIT-0 ~ 3
TRACK NUMBER
Track number in BCD.
BIT-4 ~ 8
TENS OF TRACK NUMBER
Tens of Track number in BCD
Data-11
BIT-1 ENCODE SDI
This bit will be set to 1 if the device is encoding SDI source.
BIT-2 DECODE MPEG-2
This bit will be set to 1 if the device is decoding MPEG-2.
BIT-4 ANALOGUE AUDIO
This bit will be set to 1 if the audio input source is analogue.
BIT-5 SDI EMBEDDED
This bit will be set to 1 if the audio input source is SDI embedded audio.
21
Revision History:
Rev.
Description
Date
FP Rev.
MB Rev.
1.0
1.
Initial release
1.1
1.
Add Delete Current Track
Jan-19-2010
V1.2.0
V1.2.24
1.
Change Status Sense Data-11 (current video/audio
source) to Data-14.
Add support track number up to 999.
New Set Track Number (42h 52h) command to
support 999 tracks.
New Current Track Number Sense (E0h 05h)
command to support 999 tracks.
New Current Encode Bit Rate Sense (E0h 06h).
New Format Disk (E3h 10h AAh 55h 01h)
command.
New Set Loop Play (E2h 10h 01h) command.
Loop Play Status Sense, Data[9].bit-0
GPI Function Status Sense, Data[9].bit-1
GPI Mode Status Sense, Data[9].bit-2
HDV Monitor Status Sense, Data[9].bit-3
HDV type Status Sense, Data[9].bit-4,5
Oct-20-2010
V1.4.0
V1.2.27
2.
3.
4.
1.2
5.
6.
7.
8.
9.
10.
11.
12.
V1.0.0
22
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising