Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
The file port.h (it is different for each architecture), it has something like
#define RTS_PIN PD2
#define RTS_DDR DDRD
#define RTS_PORT PORTD
If I understood correctly, you need to turn on the RTS pin, so in theory it should be turned on by hardware when data is received in the send buffer, only if your UART module on the MK supports RS-485 mode.
I also somehow used freemodbus only on dsPic33, I had to manually turn on the pin. That is, I checked the buffer for NON-emptiness and turned on the pin. After sending, I turned it off already in the handler, it seems)
By chance, no one had modbus libraries for dsPIC33 left, at least examples ...
Otherwise, I downloaded freemodbus-v1.5.0, dragged raw materials from BARE into the project and fell into a stupor ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question