Peter, some answers appended below: Peter Neubert wrote: > > Hi All > > I need to build (With a PIC) a small device capable of monitoring equipment > in a factory. Each device shall be networked and connected to a central PC. > > The PC will then poll every device for information and status of the > equipment, and if necessary send orders to them (ON/OF, UP, Down, Increase > Temp, Open valve etc). It is possible/probable that as many as 500 devices > shall be connected to the same PC. > > My problem and questions are related to which network topology and what > protocol I should select: > I have looked at RS-485 and RS422 but I am really not sure at all? > > As far as I see, I will only need half duplex so I choose RS485, however I > must be able to poll the devices and return commands as fast as possible. > The response time is very important, as the equipment to monitor is very > valuable and could break down, if proper action is not taken immediately. > > I looked at the Maxim web site, and with the MAX1486, they promise Data > rates up to 12 Mbit and possible 256 transceivers per bus. I would then need > 2 segments to reach my 500 nodes, but that seems acceptable. > > My questions are, apart from any comments to the above: > > 1. Is RS484 a good choice A: it is designed for noisy environments, keep it shielded though if in a factory. > 2. What kind of protocol should I select A: the motorola 68hc11 series would be very easy for you to work with as it has an address mark wakeup feature + parity detect/generate inbuilt to the hardware usart. You will need to consider your PC software, it must be cabable of driving the port at your required speed. You should try to compact all data and general broadcast or "subgroup broadcast" where ever possible. > 3. What about buffering - Will I need a uart of some sort > 4. Is it possible to achieve data rates of 12 Mbit with a PIC 16F84 A: if you REALY need this speed then go for the pic 17c752/6 series, or another manufacturers RISC based chip with hardware UART, a "bit banging routine" on a PIC16F84 is probably good only up to about 50k baud range, even then it will have virtually no time for other things. Also, asynchronous recieve typically splits recieved bits into smaller sampling periods which could raise the generating frequency from 12 Mbit to perhaps 96 Megahertz ! > 5. What else should I look out for? The PIC or other chip of your choice has as much intelligence as you put into it. Rather than spending lots of time programming the PC to COMMAND ALL PICs, instead delagate time critical decisions to the PICs(make this bit work !). The PICs may be attached to more than one piece of equipment, thus saving on network addresses. Have you got a plan of action for WHEN these sensors or linking cable goes off line ? ( Make the local addresses as autonomous as possible ! ) > > Any help in any form would be greatly appreciated > > Cheers > Peter Neubert > neubert@bow.intnet.mu