Home > Back-end >  About 485 polling logic
About 485 polling logic

Time:12-28

Recently, using 485 as a state of control and polling, encountered a problem now,
State polling is regularly polling, implemented using the timer interrupt, namely host regularly send inquiry instruction to from the machine, and from the machine reply to the corresponding state,
Controlled by computer serial debugging assistant sends commands, again by the host to send from machine,
Found at this time there will be a kind of situation, when the machine at the time of sending feedback data to the host, the host is also distributed control instruction, at this point, the machine could not receive the host sends the control command,
Here I am using 485 chip is MAX13485E chip, including enabling control of RX and TX, the two can make control is a high effective one is effective, the low level design boards are also the two can make an IO port to control, that is to say, now this chip can not send and receive at the same time,
Under the condition of without changing the hardware, can improve the software to the improvement of the situation?
Tried every time multiple respectively, before polling instructions sent waiting for the control is sent, and so on, but there's still a control instruction is invalid,
Through the oscilloscope observation, can also be found the failure reason is because from the machine control instruction is under a state of sending feedback data, so the control instruction is invalid,
Under normal circumstances the control instruction

Invalid control instruction in the TX mode
  • Related