MODBUS Implementation

shashank2388 wrote on Friday, May 24, 2013:

Greetings everybody!!

I am trying to implement MODBUS in PIC24FJGB on FreeRTOS. I am doubtful about how to implement inter character delay and inter frame delay in MODBUS using FreeRTOS. I have already implemented RS485 on FreeRTOS. Does anyone has example of MODBUS implemented on FreeRTOS? Can anyone suggest something?

Thanking you in advance! :slight_smile:

davedoors wrote on Friday, May 24, 2013:

How short are the delays required, and how accurate do the delays need to be. For example, if the delay needed to be 1ms does it matter if it is greater than 1ms so long as it is not shorter than 1ms? How would you implement the delays without an RTOS?

mqn wrote on Thursday, March 24, 2016:

Hi Shashank
Hope you are still around and you manged to implement you modbus as I am just embarking on the same course. I am using a PIC24F and need to implement RTU. I want to know how to implimented the character recieve and transmit timings required in modbus from within FreeRtos.
I assume, for the RX, it is a matter of notifying the RX task from the UART rx interrupt and looking at time passed since last recieved. If you could share the RTOS level code to do this I would be very greatfull.