I have implemented Modbus RTU slave in PIC12F1840. My problem is I have not implemented detection of start of message in the slave device. Any guidance on how to implement it?

  • \$\begingroup\$ It may be useful to you that Realterm can generate Modbus CRC's. Might help you with testing. \$\endgroup\$ – Henry Crun May 2 '18 at 7:10
  • \$\begingroup\$ How come Realterm can be useful to me ? \$\endgroup\$ – Nimit Vachhani May 5 '18 at 4:54
  • \$\begingroup\$ It can send you test packets and generate the CRC. It can display the (binary) that you are sending \$\endgroup\$ – Henry Crun May 5 '18 at 4:55
  • \$\begingroup\$ Actually i have that kind of software that shows the packets being sent and received over the serial line. Well now i am getting the clear idea of detecting the RTU frame start and end. I am thinking for 3.5 and 1.5 char delay detection. The problem that arises is how to calculate 3.5 char delay interms of milli seconds or micro seconds. My standard communication parameters are 9600 baud, 8 Data bits, 1 stop bit and none partiy. \$\endgroup\$ – Nimit Vachhani May 5 '18 at 4:58

According to Modbus protocol, there should be silent intervals of at least 3.5 character times. Character times can be calculated based on the baudrate of serial port.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.