Device and method for transmitting control information within a data communication via a serial interface
Patent Information
- Application Number
- DE102017110890
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2017-05-18
- Publication Date
- 2025-10-30
- Estimated Expiration
- 2037-05-18
Smart Images

Figure 00000008_0000 
Figure 00000008_0001 
Figure 00000009_0000
Abstract
Description
[0001] The invention relates to a device and a method for transmitting control information within a data communication via a serial interface.
[0002] Various components of processor-controlled systems communicate with each other via interfaces. Certain conventions must be followed to ensure error-free data communication.
[0003] To achieve a predetermined data rate, a fixed reference frequency is usually generated in both the transmitter and receiver using an oscillator. However, the reference frequencies (and thus the effective data rates) of the transmitter and receiver can sometimes differ slightly, leading to data transmission errors. To avoid this problem, start and stop bits are used. The receiver resynchronizes at the beginning of each new character. When the line is idle, it monitors it until it detects the rising edge (e.g., from logical level "1" to logical level "0") of a start bit. This point in time can be used as the initial trigger, and subsequently, the line is polled or sampled once at predetermined time intervals for each expected bit of the current character. The receiver sets the polling times so that they fall in the middle of each bit.Data bit 0 is therefore queried 1.5 bit times after the beginning edge of the start bit, data bit 1 2.5 bit times after the beginning edge of the start bit, and so on. When the stop bit is reached, the receiver starts "running freely" again and waits for the next start bit.
[0004] The stop bit is necessary to ensure a predetermined logical level on the transmission line. If the last bit of a character were at the logical level "0", the receiver would be unable to distinguish this last bit from a potentially immediately following start bit of the next character. Therefore, every start bit (e.g., logical level "1") must always be preceded by an opposite level (e.g., logical level "0"). This is ensured by the stop bit. Since the line maintains the same level in its idle state, this method can also be used after extended transmission pauses. Because the receiver operates approximately synchronously with the transmitter only for the duration of a single character, and this synchronization is lost at the end of each character, this transmission method is called asynchronous operation.
[0005] Stop bits can also be used to provide a delay for the receiving device to process the last received characters. For this reason, stop bits with a length of 1.5 or 2 bits are also used.
[0006] In addition to the data bits, a so-called parity bit can also be transmitted. This bit enables simple error checking. If even parity is used, the sender sets the parity bit to the logical level "1" if the character to be transmitted has an odd number of set bits with a logical level of "1". With an even number of set bits, the parity bit is set to the logical level "0". The receiver then checks, according to the same rule, whether the logical level of the received parity bit correctly reflects the parity of the received data bits. Therefore, if one of the data bits has been corrupted during transmission, this can be detected at the receiver.
[0007] An example of such an asynchronous serial interface is the Universal Asynchronous Receiver Transmitter (UART) interface, which is an electronic circuit for implementing digital serial interfaces. This can be either a standalone electronic component (e.g., a UART chip or module) or a functional block of a more highly integrated component (e.g., a microcontroller). The UART interface is used to send and receive data over a data line and is a standard for serial interfaces on personal computers (PCs) and microcontrollers. The interface is also very common in industrial applications with various interface types (e.g., RS-232 or ELA-485).
[0008] In the UART interface, data is transmitted as a serial digital data stream with a fixed frame consisting of a start bit, five to a maximum of nine data bits, an optional parity bit for error detection, and a stop bit. To allow the receiver synchronization time with the clock of the received data, the stop bit can be extended to 1.5 or 2 times the normal transmission time of a bit.
[0009] A UART interface is typically implemented as a communication component in microcontrollers or computers, as a standalone integrated circuit, as a sub-function in chipsets, in the form of hardware description languages for integration into field-programmable gate arrays (FPGAs), or as a so-called "software UART," which exists only as a program sequence and directly controls specific input / output pins. The data to be transmitted or received is usually supplied to the UART in parallel form, for example, via a CPU-external bus.
[0010] In controlled devices, the control information (e.g., trigger pulse) often needs to be transmitted as quickly as possible to minimize the delay between the transmission of the control information and the triggering or activation of the controlled device. For example, a lighting device can be controlled by the trigger of a camera device. The required fast trigger pulse is conventionally transmitted via an additional line, which increases complexity and space requirements.
[0011] To minimize complexity and size, it would therefore be desirable to be able to transmit fast trigger pulses or other control information without an additional line, for example, if data communication via only one line between two microcontrollers (camera and lighting) using a standard UART protocol is already provided.
[0012] US patent 2017 / 0075852 A1 discloses a host device implemented as an integrated circuit, which can communicate with a variety of peripherals via a general-purpose input / output (GPIO) module and an I12C / I13C bus. To save on connection pins and improve communication with the numerous peripherals networked with the host device, a so-called virtual GPIO interface (VGI) with FSM automaton function (VGI FSM) is proposed, in which individual GPIO signals are converted into shared I3C messages. For transmission, VGPIO frames are proposed that begin with a start bit and a start header and combine GPIO signals from various peripherals into a data payload, the bit positions of which can be located on the receiving end using a mapping table.
[0013] Furthermore, DE 10 2016 219 347 A1 discloses a control unit, in particular for a motor vehicle, wherein the control unit comprises a processing unit configured to periodically transmit data frames to at least one peripheral unit controllable by means of a control signal via a serial bus. The processing unit is configured to insert initial data characterizing the control signal into each data frame.
[0014] The invention is based on the objective of providing an interface by means of which control information can be transmitted with low delay via the serial data line.
[0015] This problem is solved according to the invention by a device according to claims 1 and 2, a camera device according to claim 9, a lighting device according to claim 11, a method according to claims 12 and 13, and a computer program according to claim 15.
[0016] Accordingly, control information (e.g., a trigger pulse) is received and inserted or integrated into the data stream at a predetermined bit position immediately after the start bit of a character following the moment the control information is received and before the stop bit of the character. On the receiver side—that is, at the controlled device—the start bit of a character in the data stream is detected, and the control information is extracted from the data stream at a predetermined bit position of the character immediately after the detected start bit. The transmission of the control information thus uses at least one bit position of a character in the data stream, allowing the standard communication of the serial interface, with all its advantages, to continue to be used, and enabling significantly faster execution of a command (or several commands) determined by the control information.By connecting an additional input port to the data stream, the delay time (latency) until the control information is available at the receiver can be significantly reduced, since the transmission of the control information can already take place during the next character being transmitted.
[0017] According to a first advantageous refinement, the control information can be inserted, for example, by means of a coupling unit at the first bit position after the start bit of the character in the data stream. This enables a simple implementation for the fastest possible transmission of the control information. Specifically, the control information can be recognized on the receiving end after only 2 bits (start bit + 1st data bit of the character), and not only after 10 bits (i.e., not only after the complete transmission of the next character in the data stream). This allows the transmission time for the control information to be reduced, for example, from 87 µs to approximately 18 µs.
[0018] According to a second advantageous embodiment, the control information can have a length of one bit. In this simplest embodiment, exactly one device at the other end of the data line can be controlled using only one character bit of the data stream.
[0019] According to a third advantageous refinement, the control information can specify a trigger command to activate a controlled device. This enables low-latency triggering. Accordingly, for example, a standard UART communication interface can be provided with an additional input connection (input pin) for faster processing of a trigger command.
[0020] According to a fourth advantageous embodiment, the control information can have a length of at least two bits, and the control information includes address information for addressing a controlled device starting from the second bit. This measure allows even multiple devices to be controlled via a serial interface using only one data line, whereby the currently controlled device can be selected via the address information also transmitted in the data stream (e.g., using an address decoder).
[0021] According to a fifth advantageous embodiment, the camera device can be operated as a master device with regard to the serial transmission of control information. This allows the camera device to use the serial interface for the rapid control of a lighting function.
[0022] The components of the devices proposed for solving the aforementioned problem can be implemented individually or collectively as discrete circuits, integrated circuits (e.g., application-specific integrated circuits (ASICs)), or programmable circuits (e.g., field-programmable gate arrays (FPGAs)). In particular, the camera device can incorporate an FPGA as a central component with extended interface functions. Furthermore, the steps of the method claims can be implemented as a software program or software routine for controlling the processor of a microcontroller to execute them.
[0023] The present invention will now be explained in more detail with reference to preferred embodiments and the figures in the drawings. These show: Fig. 1 a schematic block diagram of a serial data transmission system for communication between a camera device and a lighting device according to a first embodiment; Fig. 2 schematic time diagrams with signal waveforms of a serial digital data transmission; Fig. 3 a schematic block diagram of a transmitting transmission unit according to a second embodiment; and Fig. 4 a schematic block diagram of a receiving-side transmission unit according to the second embodiment.
[0024] The following embodiments describe a fast and simplified method for controlling a lighting device or system using a camera via a UART interface implemented by a microcontroller. Specifically, it is proposed to extend a standard serial communication interface (e.g., UART) with short, and therefore fast, commands that are detected by an additional input pin. Since only one communication line is available, the camera is preferably operated as the master. Communication in these embodiments takes place via a UART interface because it is a widely used standard interface and this protocol is already integrated into many microcontrollers, thus eliminating the need for separate programming.
[0025] Fig. Figure 1 shows a schematic block diagram of a serial data transmission system for data communication with an integrated control mechanism between a camera device 10 (such as an industrial camera for surveillance purposes) and a lighting device 20 (such as a controllable light source with LED (Light Emitting Diode) 27) according to a first embodiment. It is noted that in Fig. Only those components are shown that appear suitable for explaining the functionality of the first embodiment. Further components for other or supplementary functions are not shown for the sake of simplicity.
[0026] The camera device 10 comprises a programmable logic gate (FPGA) 14, which is programmed according to the desired functionalities of the first embodiment. The circuit 14 includes a trigger generation unit 13, which, in response to a manual and / or program-controlled and / or sensor-controlled triggering function, outputs a trigger word with a binary control command B as a trigger signal to a UART interface function 15, which is also implemented in the circuit 14. Furthermore, the integrated UART interface function 15 is supplied with binary data D from a microcontroller (µC) 11, which is also integrated in the circuit 14, for output via the UART interface, or it forwards externally received data D to the microcontroller 11.
[0027] According to the first embodiment, the UART interface function 15 is operated in such a way that the microcontroller 11 and the trigger generation device 13 can use the UART interface function 15 independently and selectively. For this purpose, the microcontroller 11 can, for example, be caused to release the UART interface function 15 by means of an enable signal F supplied to it (e.g., by the trigger generation device 13), so that it can be used by the trigger generation device 13.
[0028] The control command B for the trigger, etc., is therefore not inserted into existing data of the microcontroller 11. Instead, the trigger generation device 13 automatically instructs the UART interface function 15 to send the trigger word along with the control command B by supplying it with the trigger word. The trigger word contains the corresponding bits for triggering the event (e.g., the start bit and the first bit of the control command B). The remaining bits can be unused or, for example, contain additional information defined at an earlier time (e.g., "Light, please send error status").
[0029] The microcontroller 11 is controlled by the application of the enable signal F so that it enables the UART interface function 15 for the transmission of control information (e.g., trigger) at the correct time. The transmission system is then in a control mode, meaning that no data communication takes place, so that control information can be transmitted immediately at any time. If this were not the case, the control information would always have to be inserted into the next data byte, and waiting times would occur.
[0030] The trigger word with control command B generated by the trigger device 13 is therefore inserted after the serial data stream of the binary data D has been enabled, so that the resulting serial output bit stream of the UART interface includes a data word with integrated control command B.
[0031] The circuit 14 is connected via the UART interface function to a multi-purpose interface, such as a General Purpose Input / Output interface (GPIO), as a contact connection of the camera device 10, whose behavior as an input or output interface can be programmed as desired via the circuit 14.
[0032] The data D, including the integrated control command B, output via the multi-purpose interface can be transmitted as a serial data stream via a data line 100 to the lighting device 20. There, the data D is fed to a UART interface function 25 integrated into a microcontroller 21 and subjected to suitable processing (e.g., for brightness or color control of the LED 27, etc.). Prior to this, the integrated control command B is separated from the data stream by a suitable extraction or branching function and fed to an input / output interface 22 of the microcontroller 21. This extraction or branching function can also be controlled by the enable signal F or a signal derived from it, such that the control command is fed to the input / output interface 22. According to a control program of the microcontroller 21, the received control command B then activates the desired function (e.g.,Switching the LED 27) of the lighting device 20 on and / or off.
[0033] The following is a more detailed explanation of exemplary signal waveforms generated by the serial interface and the manner in which the control command B is integrated, with reference to Fig. 2.
[0034] Fig. Figure 2 shows schematic timing diagrams with signal waveforms of a serial digital data transmission. The asynchronous serial data stream, as used, for example, by the UART interface function 15 in Fig. 1 generates binary levels (e.g., logic levels "0" and "1"). The upper diagram in Fig. Figure 2 shows a binary data stream and the lower diagram in Fig. Figure 2 shows the inverted voltage levels (+ / -15V) on an interface according to the RS-232 standard.
[0035] A special feature of serial interfaces is that, in the aforementioned asynchronous mode, no dedicated clock signal is required on a transmission line. Instead, the receiver synchronizes itself via the switching edges of the start and stop bits of the characters in the data stream, as well as the set baud rate (which in this case corresponds to the bit rate). Since the start of a transmission with the start bit can occur at any time, this serial interface is called asynchronous. To ensure synchronization, the number of transmittable bits is limited. With a longer data stream, synchronization could be lost, leading to misinterpretations of the data stream and thus to a faulty transmission.
[0036] Since the shortest message (data word or character consisting of a start bit, stop bit, and 8 data bits, including the most significant bit (MSB7) and the least significant bit (LSB0)) in the UART protocol is 10 bits long, transmission at the maximum possible data rate of 115 kBaud takes approximately 87 µs, without taking into account the Fig. The two parity bits shown. This delay (latency) until the transmission of the next character is too long for some applications.
[0037] By coupling an additional input connection (input pin) to the data stream in the UART interface function 15 in Fig. 1. The control command B (e.g., the trigger signal) can be received by the receiver (lighting device 20) after only 2 bits (start bit + 1st data bit). Fig. 1) are recognized. This reduces the transmission time for control command B to approximately 18 µs.
[0038] Optionally, further instructions can be transmitted by using and evaluating additional bits (e.g., the following 2nd data bit, 3rd data bit, etc.), but the latency then increases by approximately 9µs each time.
[0039] Alternatively, the first data bit could indicate the control command B, and the following two bits could specify the address of the device to be controlled. This would then allow control (e.g., triggering) of four devices (addresses "00", "01", "10", and "11") with a latency of 4 bits (36 µs).
[0040] Fig. Figure 3 shows a schematic block diagram of a transmit-side command transmission unit according to a second embodiment, in which the control command B is inserted directly into a data word at a bit position reserved for this purpose. This can be achieved by appropriately adjusting the bit width of the data words. Enabling the UART interface function 15 is therefore no longer necessary, as it can be used simultaneously by the trigger generation device 13 and the microcontroller 11.
[0041] The data stream supplied by the microcontroller 11, consisting of consecutive characters from start bit ST, stop bit SP and eight data bit positions, is fed to an encoder (COD) 122, which is used, for example, in the UART interface function 15 in Fig. The encoder 122 has an additional input connection for a control command B, whose active binary value (e.g., logic level "1") is inserted into the data stream after the start bit of the immediately next character when it is detected at a predetermined data bit position (here: bit position 2 or the first data bit). The predetermined bit position can be set, for example, by an optional programming information P. Thus, immediately after the detection of an active control command B, the output of the encoder 122 is as follows: Fig. 3 depicted character patterns 200, which is fed to the data line 100 for controlling the lighting device.
[0042] Fig. 4 a schematic block diagram of a receiver-side command transmission unit according to the second embodiment.
[0043] For example, from coder 122 in Fig.The character pattern 200, generated and transmitted via data line 100 with an integrated control command, is fed in parallel to a detector (DET) 222 and a demultiplexer or extractor 221, configured as a controlled switch, on the receiving side. The extractor 221 has a data output for the data D and a control output for the control command B, which can be selectively connected to the input data stream by means of the switch, depending on a control signal supplied by the detector 222. As soon as the detector 222 detects a start bit ST of a character in the received data stream, it controls the extractor 221 in a timely manner so that it is activated at the predetermined bit position of the control command B (here: bit position 2 or 1), which can also be optionally set here by the programming information P.(Data bit with a length of 1 bit) connects the data stream to the control output for the duration of one or more data bits (depending on the design of the control command B), so that the control command B - if present - is extracted and fed to the control output for further processing (e.g. triggering the lighting device).
[0044] It is noted that the present invention is not limited to the embodiments described above. Rather, numerous modifications are possible within the scope of the following claims. In particular, the present invention is not limited to data communication with integrated control between a camera device and a lighting device, nor to a UART interface. Other serial interfaces can, of course, be used in the same way. The present invention can be used in connection with any serial data transmission between a device suitable for control and a controllable device. Furthermore, the number and position of the control bits within a character of the serial data stream are in no way restricted.
[0045] In summary, a device and a method for the rapid transmission of control information in a serial data stream using a serial interface have been described, wherein the control information is inserted into the data stream at a predetermined bit position immediately after the start bit of a character in the data stream following the time of reception of the control information and before the stop bit of the character. On the receiving side, the start bit of the character is detected, and the control information is extracted from the data stream at the predetermined bit position of the character immediately after the detected start bit.
Claims
[1] Device for transmitting control information (B) in a serial data stream using a serial interface, the device comprising: - a receiving port for receiving the control information (B) for a controlled device (20), and - a coupling unit (122) for receiving the data stream for the controlled device (20), wherein the data stream has start and stop bits for synchronization, wherein at the beginning of each new character it is resynchronized based on the start bit and when the stop bit is reached it starts running freely again and waits for the next start bit, and for inserting the control information (B) into the data stream (D) at a predetermined bit position immediately after a start bit of a character of the data stream following the time of receipt of the control information and before the stop bit of the character. [2] Device for receiving control information (B) in a serial data stream using a serial interface, the device comprising: - a detector unit (222) for detecting a start bit of a character of the data stream for the controlled device (20), wherein the data stream has start and stop bits for synchronization, wherein at the beginning of each new character, resynchronization is performed based on the start bit, and upon reaching the stop bit, free running resumes and the system waits for the next start bit, and - an extraction unit (221) for extracting the control information (B) for the controlled device (20) from the data stream (D) for the controlled device (20) at a predetermined bit position of the character of the data stream immediately after the detected start bit in response to the detected start bit. [3] Device according to claim 1, wherein the coupling unit (15) is configured to insert an entire character together with the control information (B) into the data stream after enabling a further receive port for receiving data of the data stream from a data source (11). [4] Device according to claim 1, wherein the coupling unit (15; 122) is configured to insert the control information (B) at the first bit position after the start bit of the character of the data stream. [5] Device according to claim 1 or 2, wherein the control information (B) has a length of one bit. [6] Device according to claim 5, wherein the control information (B) specifies a trigger command to activate a controlled device. [7] Device according to claim 1 or 2, wherein the control information (B) has a length of at least two bits, and wherein the control information (B) from the second bit onwards includes address information for addressing a controlled device. [8] Device according to one of the preceding claims, wherein the serial interface is a Universal Asynchronous Receiver Transmitter (UART) interface. [9] Camera device with a device according to claim 1, wherein the control information serves to control a lighting. [10] Camera device according to claim 9, wherein the camera device is operated as a master device with respect to the serial transmission of the control information. [11] Lighting device with a device according to claim 2, wherein the control information serves to control a lighting of the lighting device. [12] Method of transmitting control information (B) in a serial data stream using a serial interface, comprising the steps: - Inserting start and stop bits for receiver-side synchronization into the serial data stream of a controlled device (20), wherein at the beginning of each new character, resynchronization is performed based on the start bit, and upon reaching the stop bit, free running resumes and the system waits for the next start bit. - Receiving the control information (B) for the controlled device (20) and the data stream for the controlled device (20) at a coupling unit (122), and - Insertion of the control information (B) into the data stream (D) by the coupling unit (122) at a predetermined bit position immediately after a start bit of a character of the data stream following the time of receipt of the control information and before the stop bit of the character. [13] Method of receiving control information (B) in a serial data stream using a serial interface, comprising the steps: - Inserting start and stop bits for receiver-side synchronization into the serial data stream for a controlled device (20), wherein at the beginning of each new character, resynchronization is performed based on the start bit, and upon reaching the stop bit, free running resumes and waits for the next start bit, - Capturing a start bit of a character of the data stream for the controlled device (20), and - Extracting the control information (B) for the controlled device (20) from the data stream (D) for the controlled device (20) at a predetermined bit position of the character of the data stream immediately after the detected start bit in response to the detected start bit. [14] Method according to claim 12, wherein an entire character together with the control information (B) is inserted into the data stream after a further receive port has been enabled to receive data of the data stream from a data source (11). [15] Computer program for storing on a data carrier and for causing a computer device to perform the method according to claim 12 or 13 when the computer program is executed on the computer device.
Citation Information
Patent Citations
Control device, in particular control device for a motor vehicle
DE102016219347A1
Input / output signal bridging and virtualization in a multi-node network
US20170075852A1