CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

RS485 Modbus
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Fri Aug 27, 2021 10:13 am     Reply with quote

Absolutely Warday.
However he is setting the option USE_WITH_PC, and this overrides the
settings to force it to use INT_EXT, and a software UART.
_Why_ he is using this option, I have not really worked out,

This option is not wanted for most configurations. It is designed for
using the standard CCS demo where you want to connect the chip's
UART to a PC, and have this then talking to the RS485.
Warday



Joined: 21 May 2021
Posts: 11

View user's profile Send private message

PostPosted: Fri Aug 27, 2021 11:18 am     Reply with quote

Indeed. That's why I suggest replacing the demos initialization with your own as I show in the fix. (Delete the use with pc and use only what I needed). I saw different topics with this problem but with no solution (They fix it and then they do not reply with the fix). That’s why I post the solutions that I found. If someone have the same problem, he may know where to start. Thanks for all the comments. See you soon!
I will let this here to close the topic.


Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Sat Aug 28, 2021 2:53 am     Reply with quote

Absolutely.
I think he has persuaded himself, that because he is connecting to a
PC, he needs this setting. Wrong. This setting is only for a very specific
'demo' environment, where you have the PC connected to the PIC's
UART, to allow it to monitor the modbus being handled by the PIC.
If you are connecting a PC that is itself acting as a modbus master or
slave, you do not want this setting.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group