Electronic equipment and communication methods
The electronic device uses serial data with variable start bit widths to dynamically detect baud rates, addressing inefficiencies in existing serial communication by enabling high-speed, error-free communication without manual settings.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- YOKOGAWA ELECTRIC CORP
- Filing Date
- 2024-12-27
- Publication Date
- 2026-07-09
Smart Images

Figure 2026115414000001_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to an electronic device and a communication method.
Background Art
[0002] Serial communication is widely used as a method for data transmission between devices. In this serial communication, it was necessary to match communication protocols such as the baud rate in advance on the transmission side and the reception side. In contrast, a communication method has been proposed in which the baud rate is discriminated on the reception side and data is received. For example, a communication method has been proposed in which the reception side specifies the baud rate based on a signal transmitted in advance from the transmission side.
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] However, in the above prior art, since signal exchange is performed in advance, there is a problem that it takes time to start communication.
[0005] Therefore, this disclosure proposes an electronic device and a communication method for performing serial communication at high speed.
Means for Solving the Problems
[0006] The electronic device of this disclosure includes serial data for serial communication including a start bit, a plurality of data bits, and a stop bit, wherein leading data composed of the start bit and the leading bit of the plurality of data bits is configured to have a width twice the bit width based on the baud rate of the serial communication, and a transmission unit that transmits serial data in which the bit width of the start bit in the leading data varies according to the value of the leading bit.
[0007] Furthermore, the electronic device of this disclosure comprises serial data for serial communication including a start bit, a plurality of data bits, and a stop bit, wherein the leading data consisting of the start bit and the leading bit of the plurality of data bits is configured to have a width twice the bit width based on the baud rate of the serial communication, and a first detection unit that detects the baud rate of the serial communication based on the bit width of the start bit of serial data whose bit width of the start bit in the leading data differs depending on the value of the leading bit, and a receiving unit that receives the serial data and acquires the plurality of data bits based on the detected baud rate. [Brief explanation of the drawing]
[0008] [Figure 1] This figure shows an example of the configuration of an electronic device according to the first embodiment of this disclosure. [Figure 2] This figure shows an example of the configuration of the communication unit according to the first embodiment of this disclosure. [Figure 3] This diagram shows the structure of conventional serial data as an example. [Figure 4] This figure shows an example of the configuration of serial data according to the first embodiment of this disclosure. [Figure 5A] This figure shows an example of a clock signal according to the first embodiment of this disclosure. [Figure 5B] This figure shows an example of a clock signal according to the first embodiment of this disclosure. [Figure 6] This figure shows an example of the processing procedure for transmission according to the first embodiment of this disclosure. [Figure 7] This figure shows an example of the processing procedure for receiving data according to the first embodiment of this disclosure. [Figure 8] This figure shows an example of the configuration of an electronic device according to the second embodiment of this disclosure. [Figure 9] This figure shows another example of the configuration of an electronic device according to the second embodiment of this disclosure. [Modes for carrying out the invention]
[0009] Embodiments of this disclosure will be described in detail below with reference to the drawings. The description will be in the following order. In each of the following embodiments, the same parts will be denoted by the same reference numerals to avoid redundant descriptions. 1. First Embodiment 2. Second Embodiment
[0010] (1. First Embodiment) [Electronic device configuration] Figure 1 is a diagram showing an example configuration of an electronic device according to the first embodiment of this disclosure. The diagram shows a field device 20, such as a measuring instrument, placed in a factory or the like, and a controller 10 that controls the field device 20. The controller 10 and the field device 20 communicate data with each other using serial communication.
[0011] The controller 10 comprises a control unit 11 and a communication unit 12. The communication unit 12 performs serial communication. This communication unit 12 transmits and receives data with the communication unit 22 of the field device 20 via a serial communication line 30. The control unit 11 controls the communication unit 12. The control unit 11 outputs data to be transmitted to the communication unit 12. The control unit 11 also receives data transmitted from the field device 20 from the communication unit 12.
[0012] The field device 20 comprises a control unit 21, a communication unit 22, a sensor 23, and a recorder 24. The communication unit 22 performs serial communication. This communication unit 22 transmits and receives data with the communication unit 12 of the controller 10 via a serial communication line 30. The sensor 23 senses the target object. This sensor 23 could be, for example, a thermometer or a pressure gauge. The recorder 24 records the sensing results of the sensor 23. The control unit 21 controls the entire field device 20. The control unit 21 also outputs data to be transmitted to the communication unit 22. The control unit 21 also receives data transmitted from the controller 10 from the communication unit 22.
[0013] Note that the controller 10 and the field device 20 are an example of the "electronic device" of the present disclosure.
[0014] FIG. 2 is a diagram showing a configuration example of the communication unit according to the first embodiment of the present disclosure. This figure is a block diagram showing a configuration example of the communication unit 12. The communication unit 12 includes a transmission unit 121, a reception unit 122, a clock signal generation unit 124, a bit width detection unit 125, a baud rate detection unit 126, and a start bit detection unit 127. Note that the communication unit 22 can have the same configuration as the communication unit 12.
[0015] The transmission unit 121 performs transmission by serial communication. This transmission unit 121 generates serial data for serial communication and transmits it via the transmission line 31 of the serial communication line 30. The transmission unit 121 generates serial data based on the transmission data from the control unit 11.
[0016] This serial data includes a start bit, a plurality of data bits, and a stop bit. For example, the serial data is configured by arranging a start bit, a plurality of data bits, and a stop bit in this order. In the serial data, the start bit and the first bit among the plurality of data bits are referred to as the start data. This start data is configured to have a width twice the bit width based on the baud rate of the serial communication, and the bit width of the start bit varies according to the value of the first bit. Also, when the start bit and the first bit have the same value, the value of the first bit is inverted and stored in the start data. Based on the bit width of this start bit, the baud rate can be detected on the reception side. Details of the serial data will be described later. Also, the transmission unit 121 transmits the serial data in synchronization with the clock signal supplied from the clock signal generation unit 124.
[0017] The clock signal generation unit 124 generates a clock signal for communication and supplies it to the transmission unit 121 and the reception unit 122. Note that the clock signal generation unit 124 generates a clock signal based on the baud rate detected by the baud rate detection unit 126 described later and supplies it to the reception unit 122. Details of the clock signal will be described later.
[0018] The reception unit 122 performs reception by serial communication. This reception unit 122 receives the above-described serial data via the reception line 32 of the serial communication line 30. The reception unit 122 performs reception based on the clock signal supplied from the clock signal generation unit 124. The reception unit 122 also includes a register 123. This register 123 corresponds to a reception buffer, and the received data is temporarily stored therein. The reception unit 122 outputs the received data stored in the register 123 to the control unit 11. The register 123 can be configured by, for example, a FIFO (First-In First-Out).
[0019] The bit width detection unit 125 detects the bit width of the start bit among the serial data transmitted by the reception line 32. The detected bit width is output to the baud rate detection unit 126 and the start bit detection unit 127. Note that the bit width detection unit 125 is an example of the "third detection unit" of the present disclosure.
[0020] The baud rate detection unit 126 detects the baud rate of serial communication based on the bit width of the start bit. This baud rate detection unit 126 detects the baud rate based on the bit width from the bit width detection unit 125. Note that the baud rate detection unit 126 is an example of the "first detection unit" of the present disclosure.
[0021] The leading bit detection unit 127 detects the value of the leading bit of the data bits based on the bit width of the start bit. In the serial communication of this disclosure, there is a one-to-one correspondence between the bit width of the start bit and the value of the leading bit. Therefore, the value of the leading bit can be detected from the bit width of the start bit. The detected value of the leading bit is stored in the register 123 of the receiving unit 122. Note that the leading bit detection unit 127 is an example of the "second detection unit" of this disclosure.
[0022] [Conventional serial data structure] Figure 3 shows the structure of conventional serial data as a comparative example. This figure represents serial data compliant with RS232C. The serial data in this figure represents the case where the baud rate is 1 Mbps, there are 8 data bits, there is 1 stop bit, and there is no parity bit. The start bit is 1 bit. In this figure, "START" and "STOP" represent the start bit and stop bit, respectively. Also, "D0" - "D7" represent the data bits. "D0" and "D7" correspond to the least significant bit and most significant bit, respectively. In the serial data in this figure, the start bit, stop bit, and 1 data bit have the same width. To receive this serial data, it is necessary to obtain the baud rate used during transmission.
[0023] [Serial data structure] Figure 4 shows an example of the configuration of serial data according to the first embodiment of this disclosure. Similar to Figure 3, this figure shows the case where the baud rate is 1 Mbps, there are 8 data bits, there is 1 stop bit, and there is no parity bit. As mentioned above, the start bit and the leading bit "D0" constitute the leading data. This leading data is configured to have a width (2 μs) that is twice the bit width (1 μs) based on the baud rate (1 Mbps). The two lower parts of the figure are enlarged views of the leading data portion. When the value of "D0" is "1", that is, when the start bit and the leading bit have different values, the bit width of the start bit is equal to the bit width based on the baud rate.
[0024] On the other hand, when the value of "D0" is "0", that is, when the start bit and the leading bit have the same value, the bit width of the start bit will be different from the bit width based on the baud rate. In the example shown in the figure, the bit width of the start bit will be longer than the bit width based on the baud rate. Here, if we represent the bit width based on the baud rate as X and the extension of this start bit as α, then in the example shown in the figure, X = 1 μs and α = 0.25 μs. When the bit width of the start bit is 1 μs or 1 μs + α, the baud rate is 1 Mbps. Note that when the start bit and the leading bit have the same value, the value of the leading bit is inverted and stored. Thus, the serial data of this disclosure has a configuration in which the ratio of the start bit and the leading bit in the leading data differs depending on the value of the leading bit.
[0025] Since this serial data is transmitted, the receiving side can determine the baud rate based on the bit width of the start bit. The baud rate detection unit 126 in Figure 2 detects the baud rate based on the bit width of the start bit. The leading bit detection unit 127 in Figure 2 detects the value of the leading bit based on whether the bit width of the start bit is 1 μs or 1 μs + α. The receiving unit 122 then captures the data bits from "D1" onward based on the clock signal derived from the detected baud rate and stores them in the register 123.
[0026] Note that the baud rate can be set to other values. For example, if the baud rate is 500kbps (X=2μs), α can be set to 0.5μs. If the baud rate is 250kbps (X=4μs), α can be set to 1μs. In this way, it is possible to use a baud rate where X+α is not the same value as X in other baud rates.
[0027] Figure 5A shows an example of a clock signal according to the first embodiment of the present disclosure. The figure shows the clock signal supplied by the clock signal generation unit 124 to the transmission unit 121. The lower part of the figure shows the waveform of the clock signal. The upper part of the figure shows the serial data output by the transmission unit 121. As shown in the figure, the transmission unit 121 sequentially outputs the leading data, data bits, and stop bits to the transmission line 31 in synchronization with the rising edge of the clock signal.
[0028] Figure 5B is a diagram showing an example of a clock signal according to the first embodiment of the present disclosure. The diagram shows the clock signal supplied by the clock signal generation unit 124 to the receiving unit 122. The lower part of the diagram shows the waveform of the clock signal. The upper part of the diagram shows the signal on the receiving line 32. As shown in the diagram, the receiving unit 122 captures "D1" to "D7" of the data bits in synchronization with the rising edge of the clock signal and stores them in the register 123. As mentioned above, the data bit "D0" is detected by the leading bit detection unit 127 and stored in the register 123. When "D0" to "D7" are present, the receiving unit 122 outputs the data stored in the register 123 as received data to the control unit 11.
[0029] [Communication Method] Figure 6 is a diagram showing an example of the processing procedure for transmission according to the first embodiment of this disclosure. First, transmission data is input from the control unit 11 to the transmission unit 121 (step S101). Next, the transmission unit 121 determines whether the value of the leading bit of the transmission data is "0" (step S102). If the value of the leading bit is not "0" (step S102, No), the process proceeds to step S104. On the other hand, if the value of the leading bit is "0" (step S102, Yes), the transmission unit 121 inverts the value of the leading bit (step S103) and proceeds to step S104. In step S104, the transmission unit 121 generates serial data including the transmission data and transmits it (step S104).
[0030] Figure 7 shows an example of the processing procedure for receiving data according to the first embodiment of this disclosure. First, the leading bit detection unit 127 detects the bit width of the start bit (step S111). Next, the baud rate detection unit 126 detects the baud rate based on the bit width of the start bit (step S112). Next, the leading bit detection unit 127 detects the leading bit (i.e., the value of the leading bit) based on the bit width of the start bit (step S113). Next, the receiving unit 122 receives serial data based on the detected baud rate (step S114). Next, the receiving unit 122 obtains received data from the received serial data (step S115) and outputs it to the control unit 11.
[0031] The configurations of the transmitting unit 121 and the receiving unit 122 in this disclosure are not limited to this example. For example, the transmitting unit 121 may generate serial data including a parity bit. Furthermore, this parity bit may be the leading bit. In addition, the bit width of the start bit in the serial data may be X or X-α. Also, in the serial data, if the start bit and the leading bit have the same value, the bit width of the start bit in the leading data may be made equal to the bit width based on the baud rate of serial communication.
[0032] Conventional technologies using RS232C-compliant serial data required the controller 10 and field device 20 to manually set the same baud rate before communication in order to match the communication speed. Alternatively, commands for setting the baud rate had to be exchanged between the controller 10 and field device 20 as part of the initialization process. The former method has the problem of requiring the effort of setting the baud rate in advance, such as by writing setting values to an external switch or internal register of the device. The latter method has the problem of requiring time for the initialization process before communication. By using the transmitter 121 and receiver 122 of this disclosure, these problems are resolved. In addition, there is the effect of eliminating the need for corrective work due to baud rate setting errors.
[0033] Furthermore, with the conventional technology described above, if it is necessary to change to a lower baud rate due to unstable communication caused by transmission distance or noise, it is necessary to stop the communication midway and readjust the baud rate settings on the controller 10 and field device 20. In contrast, with the transmitting unit 121 and receiving unit 122 of this disclosure, it is only necessary to change the baud rate on the controller 10 side (transmitting side), thus shortening the period during which communication is interrupted.
[0034] In this way, by using serial data that includes leading data consisting of a start bit and a leading bit for communication, the receiving side can detect the baud rate based on the width of the start bit. Furthermore, the serial data of this disclosure can have the same bit length as conventional serial data. As a result, signals for detecting the baud rate are not required, and high-speed communication can be performed.
[0035] (2. Second Embodiment) A variation of the electronic device of the first embodiment described above will now be explained.
[0036] [Electronic device configuration] Figure 8 is a diagram showing an example configuration of an electronic device according to the second embodiment of this disclosure. Similar to Figure 1, this figure shows a controller 10 and field devices 20. The controller 10 in this figure differs from the controller 10 in Figure 1 in that it performs serial communication with multiple field devices 20 (field devices 20a, 20b, 20c). Thus, the controller 10 and field devices 20 can also be connected in a one-to-many configuration. Note that the controller 10 and field devices 20a-20c can communicate at different baud rates. For example, since communication over long distances is more stable at lower speeds, it is possible to communicate with field devices 20 near the controller 10 at a high baud rate and with field devices 20 far away at a low baud rate.
[0037] Figure 9 shows another example of the configuration of an electronic device according to a second embodiment of the present disclosure. This figure, like Figure 1, shows a controller 10 and a field device 20. The controller 10 in this figure has only a transmitting unit 121, and the field device 20 in this figure has only a receiving unit 122, which is different from the controller 10 and field device 20 in Figure 1. In this case, the controller 10 only transmits, and the field device 20 only receives.
[0038] Furthermore, the effects described herein are merely illustrative and not limiting, and other effects may also occur.
[0039] Some examples of the combinations of technical features that will be disclosed are listed below. (1) A transmission unit that transmits serial data for serial communication, which includes a start bit, a plurality of data bits, and a stop bit, wherein the leading data, consisting of the start bit and the leading bit of the plurality of data bits, is configured to have a width twice the bit width based on the baud rate of the serial communication, and the bit width of the start bit in the leading data differs depending on the value of the leading bit. Electronic devices equipped with the following features. (2) The electronic device according to (1) above, wherein the transmitting unit transmits serial data in which the bit width of the start bit and the leading bit differs when the start bit and the leading bit have the same value. (3) The electronic device according to (1), wherein the transmitting unit transmits the serial data stored in the leading data after the value of the leading bit is inverted when the start bit and the leading bit are the same value. (4) The electronic device according to any one of (1) to (3), wherein the transmitting unit transmits serial data in which the bit width of the start bit in the leading data is equal to the bit width based on the baud rate of the serial communication when the start bit and the leading bit have different values. (5) The leading bit is the least significant bit of the data bit, as described in any of (1) to (4) above. (6) The aforementioned data bits include parity bits, The leading bit is the parity bit. The electronic device described in any of (1) to (4) above. (7) A first detection unit detects the baud rate of serial communication based on the bit width of the start bit of serial data, which includes a start bit, a plurality of data bits, and a stop bit, wherein the leading data, consisting of the start bit and the leading bit of the plurality of data bits, is configured to have a width twice the bit width based on the baud rate of the serial communication, and the bit width of the start bit in the leading data differs depending on the value of the leading bit. A receiving unit that receives the serial data based on the detected baud rate and acquires the plurality of data bits. Electronic devices equipped with the following features. (8) The serial data is an electronic device according to (7) above, wherein the bit width of the start bit and the leading bit differs when the start bit and the leading bit have the same value. (9) The electronic device described in (7) above, wherein the serial data is stored in the leading data after the value of the leading bit is inverted when the start bit and the leading bit are the same value. (10) The serial data is an electronic device according to any one of (7) to (9) above, wherein, when the start bit and the leading bit have different values, the bit width of the start bit in the leading data is equal to the bit width based on the baud rate of the serial communication. (11) The leading bit is the least significant bit of the data bit, as described in any of (7) to (10) above. (12) The aforementioned data bits include parity bits, The leading bit is the parity bit. The electronic device described in any of (7) to (10) above. (13) The system further includes a second detection unit that detects the value of the leading bit based on the bit width of the start bit, The receiving unit acquires data bits other than the leading bit. The electronic equipment described in (7) above. (14) The system further includes a third detection unit for detecting the bit width of the start bit, The first detection unit detects the baud rate of the serial communication based on the detected bit width. The electronic equipment described in (7) above. (15) A serial data for serial communication comprising a start bit, a plurality of data bits, and a stop bit, wherein the leading data consisting of the start bit and the leading bit of the plurality of data bits is configured to have a width twice the bit width based on the baud rate of the serial communication, and serial data is transmitted in which the bit width of the start bit in the leading data differs depending on the value of the leading bit. A communication method that includes this. (16) Serial data for serial communication, comprising a start bit, a plurality of data bits, and a stop bit, wherein the leading data, consisting of the start bit and the leading bit of the plurality of data bits, is configured to have a width twice the bit width based on the baud rate of the serial communication, and the baud rate of the serial communication is detected based on the bit width of the start bit of the serial data, where the bit width of the start bit in the leading data differs depending on the value of the leading bit. The process involves receiving the serial data based on the detected baud rate and obtaining the plurality of data bits. A communication method that includes this. [Explanation of Symbols]
[0040] 10 Controllers 12, 22 Communications Department 20, 20a, 20b, 20c Field Equipment 121 Transmitter 122 Receiving Unit 125-bit width detection unit 126 Baud rate detection unit 127 Leading bit detection unit
Claims
1. A transmission unit that transmits serial data for serial communication, which includes a start bit, a plurality of data bits, and a stop bit, wherein the leading data, consisting of the start bit and the leading bit of the plurality of data bits, is configured to have a width twice the bit width based on the baud rate of the serial communication, and the bit width of the start bit in the leading data differs depending on the value of the leading bit. Electronic devices equipped with these features.
2. The electronic device according to claim 1, wherein the transmitting unit transmits serial data in which the bit width of the start bit and the leading bit differs when the start bit and the leading bit have the same value.
3. The electronic device according to claim 1, wherein the transmitting unit transmits the serial data stored in the leading data after inverting the value of the leading bit when the start bit and the leading bit have the same value.
4. The electronic device according to claim 1, wherein the transmitting unit transmits serial data in which the bit width of the start bit in the leading data is equal to the bit width based on the baud rate of the serial communication when the start bit and the leading bit have different values.
5. The electronic device according to any one of claims 1 to 4, wherein the leading bit is the least significant bit of the data bit.
6. The aforementioned data bits include parity bits, The leading bit is the parity bit. The electronic device according to any one of claims 1 to 4.
7. A first detection unit detects the baud rate of serial communication based on the bit width of the start bit of serial data, which is serial data for serial communication including a start bit, a plurality of data bits, and a stop bit, wherein the leading data consisting of the start bit and the leading bit of the plurality of data bits is configured to have a width twice the bit width based on the baud rate of the serial communication, and the bit width of the start bit in the leading data differs depending on the value of the leading bit. A receiving unit that receives the serial data based on the detected baud rate and acquires the plurality of data bits. Electronic devices equipped with these features.
8. The electronic device according to claim 7, wherein the serial data has different bit widths for the start bit and the leading bit when the start bit and the leading bit have the same value.
9. The electronic device according to claim 7, wherein the serial data is stored in the leading data after the value of the leading bit is inverted when the start bit and the leading bit have the same value.
10. The electronic device according to claim 7, wherein, in the case where the start bit and the leading bit of the serial data have different values, the bit width of the start bit in the leading data is equal to the bit width based on the baud rate of the serial communication.
11. The electronic device according to any one of claims 7 to 10, wherein the leading bit is the least significant bit of the data bit.
12. The aforementioned data bits include parity bits, The leading bit is the parity bit. The electronic device according to any one of claims 7 to 10.
13. The system further includes a second detection unit that detects the value of the leading bit based on the bit width of the start bit, The receiving unit acquires data bits other than the leading bit. The electronic device according to claim 7.
14. The system further includes a third detection unit for detecting the bit width of the start bit, The first detection unit detects the baud rate of the serial communication based on the detected bit width. The electronic device according to claim 7.
15. A serial data for serial communication comprising a start bit, a plurality of data bits, and a stop bit, wherein the leading data consisting of the start bit and the leading bit of the plurality of data bits is configured to have a width twice the bit width based on the baud rate of the serial communication, and serial data is transmitted in which the bit width of the start bit in the leading data differs depending on the value of the leading bit. A communication method that includes this.
16. Serial data for serial communication, including a start bit, a plurality of data bits, and a stop bit, wherein the leading data, consisting of the start bit and the leading bit of the plurality of data bits, is configured to have a width twice the bit width based on the baud rate of the serial communication, and the baud rate of the serial communication is detected based on the bit width of the start bit of the serial data, where the bit width of the start bit in the leading data differs depending on the value of the leading bit. The process involves receiving the serial data based on the detected baud rate and obtaining the plurality of data bits. A communication method that includes this.