cancel
Showing results for 
Search instead for 
Did you mean: 

communication through rs485 modbus protocol

bharti sharma
Associate II
Posted on July 10, 2017 at 11:07

Hi, My question is i want to communicate through uart between  stm32f030 board  and inverter ,I am using rs485 converter to TTL board.communication has done through modbus protocol.Driver enable pin is high data will transmit and when pin is low data will receive, I am unable to write code in receiving mode using modbus protocol , I have attached file ,so please help me.

1 REPLY 1
Gudgel.boB
Senior
Posted on July 13, 2017 at 09:19

I would set the direction of the RS485 to receive unless your UART is transmitting and make sure it stays in the transmitting mode until the end of the stop bit of your transmitted byte or until the end of your modbus packet, whichever is longer.  I am not all that great at modbus over RS485 but I am working on similar code myself.

boB