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

need help in protocol implementation

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



Joined: 27 Mar 2007
Posts: 33

View user's profile Send private message

need help in protocol implementation
PostPosted: Thu Apr 26, 2007 10:30 am     Reply with quote

Hi everyone,

I wish to design a network with 485 network(rs232 function). I am facing difficulty to design the protocol.

protocol format : <start><address><dataLength><data><cs>

any idea? appeciate if some one can provide snippet code/ example working code.

thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Apr 26, 2007 11:43 am     Reply with quote

Use the search page.

Search for: serial protocol

Here is a long thread about it:
http://www.ccsinfo.com/forum/viewtopic.php?t=25980&highlight=serial+protocol
funmix



Joined: 27 Mar 2007
Posts: 33

View user's profile Send private message

PostPosted: Thu Apr 26, 2007 6:17 pm     Reply with quote

Hi PCM,

Thanks for reply. Any example code to refer? i have read the thread, but i got no idea how to start.
jds-pic



Joined: 17 Sep 2003
Posts: 205

View user's profile Send private message

PostPosted: Mon Apr 30, 2007 1:22 pm     Reply with quote

funmix wrote:
Hi have read the thread, but i got no idea how to start.


you start by defining how the nodes on the rs485 bus interact.

e.g.
is the protocol polled master/slave or peer-to-peer?
if the latter, how are collisions detected?
are the packets fixed or variable size?
if variable, what is the maximum size packet?
what is the allowable packet latency?
how are transmission errors detected and handled?
what happens if a node can't respond immediately?

asking for code when you have not defined even a simple set of requirements is just going to lead to a lot of confusion and round-and-round question/answer posts.

reread the entire thread that PCM linked to above and reread the document i authored and then posted in that thread.
http://losdos.dyndns.org:8080/public/pic-uC/cbus-protocol-spec-draft-rev1.pdf

consider the benefits and drawbacks of the example implementation i wrote. how is it similar to what you need? how is it different from what you need?

jds-pic
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