I connected PIN C3 to Led to debug, my code stuck at "if(modbus_kbhit())", I replace it by code "while(!modbus_kbhit()) " but it still did not run. Modbus_diagnostics_rsp(MODBUS_SLAVE_ADDRESS,modbus_rx.func,data) #define MODBUS_SERIAL_RX_ENABLE PIN_C5 // Controls RE pin for RS485 #define MODBUS_SERIAL_ENABLE_PIN PIN_C5 // Controls DE pin for RS485 #define MODBUS_SERIAL_RX_PIN PIN_C7 // Data receive pin #define MODBUS_SERIAL_TX_PIN PIN_C6 // Data transmit pin #define MODBUS_SERIAL_TYPE MODBUS_RTU //use MODBUS_ASCII for ASCII mode #define MODBUS_SERIAL_INT_SOURCE MODBUS_INT_RDA #define MODBUS_PROTOCOL MODBUS_PROTOCOL_SERIAL I tried to send data from pic to computer using modbus RTU, I used modbus poll and I can't receive anything. Please do not post bug Reports on this forum. FAQ Forum Help Official CCS Support Search Register Profile Log in to check your private messages Log inĬCS does not monitor this forum on a regular basis.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |