Communication method, device thereof and communication circuit
A communication method and technology of a communication device, applied in the field of communication, can solve the problems of complex structure and high cost, and achieve the effect of simplifying the port structure and reducing the cost.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0034] see image 3 , which shows the communication method in Embodiment 1 of the present invention, which can be applied to a processing unit, and the processing unit is provided with at least one IO port. The communication method can be realized by software and / or hardware. The communication method Specifically include:
[0035] Step S01, presetting the communication baud rate, and obtaining the data bit length according to the communication baud rate;
[0036] Step S02, detecting the start bit signal received by the IO port, the start bit signal is sent by the RS485 transceiver unit, and the start bit signal includes an edge signal and a level signal;
[0037] Step S03, if it is judged that the edge signal is a falling edge signal, and the low level duration of the level signal exceeds the data bit length, then set the IO port as a serial port, and configure the serial port as a positive phase take over;
[0038] Step S04, if it is judged that the edge signal is a rising...
Embodiment 2
[0045] Embodiment 2 of the present invention also proposes a communication method. The difference between the communication method in this embodiment and the communication method in Embodiment 1 is that after the step of judging that the edge signal is a falling edge signal, it further includes:
[0046] Judging that the low level duration of the level signal does not exceed the data bit length, then continue to set the IO port to the edge receiving mode.
[0047] It should be understood that when the edge of the start bit is a falling edge, but the low-level duration of the level signal of the start bit does not exceed the set data bit length, it means that the currently analyzed start bit signal is an interference signal , not the start bit of a real valid signal, the low level duration of the level signal of the start bit of a real valid signal should be equal to the set data bit length, so the processing unit chooses to keep the IO port in the edge receiving mode to Discar...
Embodiment 3
[0052] Embodiment 3 of the present invention also proposes a communication method. The difference between the communication method in this embodiment and the communication method in Embodiment 1 is that please refer to Figure 5 After the step of setting the IO port as a serial port, the communication method in this embodiment further includes:
[0053] Step S11, detecting the communication identification byte received by the serial port based on the start bit signal;
[0054] Step S12, judging whether the communication identification byte is correct; when it is judged that the communication identification byte is correct, then execute step S13; when it is judged that the communication identification byte is incorrect, then execute step S14;
[0055] Step S13, configuring the serial port in a transceiver mode.
[0056] Step S14, reconfiguring the IO port to an edge receiving mode.
[0057] In this embodiment, after the positive phase or negative phase signal is correctly ide...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


