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 support@ccsinfo.com

rs485 one master multislave communication

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Kwaku



Joined: 02 Jul 2020
Posts: 1
Location: Student

View user's profile Send private message

rs485 one master multislave communication
PostPosted: Thu Jul 02, 2020 10:36 pm     Reply with quote

Can someone please provide me with a sample code for one master multiple slave code ?
temtronic



Joined: 01 Jul 2010
Posts: 9081
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Jul 03, 2020 4:21 am     Reply with quote

CCS provides the 'drivers' for RS485 as well as an example. Located in the EXAMPLES folder.
As to how you use RS485, that's really up to you to decide. It's been around for at least 3 decades and there are 1,000s of ways to cut code for one master- several slaves.
Start with a master and ONE slave, be sure the hardware conforms to the RS485 standard, then get them to work 100%. Once that works THEN add one more slave, get that system working, then add another slave......
Do NOT start with a system with 20 or 64 or 100 slaves !
bkamen



Joined: 07 Jan 2004
Posts: 1611
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Sun Jul 05, 2020 12:15 am     Reply with quote

temtronic wrote:
Do NOT start with a system with 20 or 64 or 100 slaves !



Aww... Where's your sense of adventure!?!?

Very Happy Very Happy
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
temtronic



Joined: 01 Jul 2010
Posts: 9081
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Jul 05, 2020 4:36 am     Reply with quote

well... back in the dinosaur days of hardcopy databooks and dialup modems, MaximIC sent me 200 sample pieces of the 'new' MAX487 so I could PROVE you could have 128 slaves on a bus....
... it took a week and LOTS of pots of coffee but.. yes, thier claim was TRUE. Over a 1,000' of wire with dozens of slave 'modules' ,here, there, everywhere.
I swear they were breeding overnight,as there had to be more than 128 on the bus!
The test lasted for about week and of course proved the weakness of all serial busses like RS485, RS232, one-wire, etc. namely cut one wire and it's dead. I've only found one viable option for that 'problem' and it's been rockstable for 3+ decades.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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