On Sun, May 17, 2009 at 12:32 AM, solarwind wrote: > After hours of research, I was unable to find a suitable realtime, > multi-master/peer-to-peer network protocol for RS485. So I made my > own. Cool! Networking is a lot of fun, with frequent bouts of frustration. 1. Don't be scared of implementing a collision sensing network (CSMA/CD) - though many preach against it, it's very cheap and easy to implement, and extraordinarliy robust for peer-to-peer networks. It has downsides, such as poor utilisation (without time slicing you generally only get 80-90% network utilization) and interesting difficulties once you get into very large or long networks. But it's worth investigating and considering, given that the vast majority of today's computers use it in the form of ethernet, and cars in the form of CAN. I think it's funny that it's one of the more popular methods, but so many are against it. Cheap & robust generally wins over "technically ideal" solutions. You can run realtime over such a network (CAN does it, ethernet can do hard realtime if all the devices agree to certain terms of use, and there is a realtime ethernet standard). It depends on what exactly you mean by realtime - in general it simply means guaranteed latency, and you can get that with a properly designed CSMA/CD network. 2. Whatever you do, partition it from your program using a very well defined programming interface (API) of functions (initialize network functions, run network task, read packet, write packet, etc). This will enable you to A) rip out the network and drop in another network type without reprogramming your code and B) use your network code in any project. This will be important as you go along, especially if you plan to incorporate other media (radio, powerline, etc) 3. You say you haven't found a "suitable" network protocol but there is absolutely _nothing_ unique about the protocol you have designed. Reinventing the wheel is a fun pasttime, but is that really what you want to be spending your time on? If so, great, keep going. If not, take another hard look at existing solutions and incorporate one of them. If you still find it lacking you can always rip it out and put your own in later. -Adam -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist